Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try to choose a supported gpu on PRIME devices
- Loading branch information
1 parent
58e50a7
commit fb349c8
Showing
3 changed files
with
16 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ | |
import tools.helpers.mount | ||
import tools.helpers.http | ||
import tools.helpers.ipc | ||
import tools.helpers.gpu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import glob | ||
import os | ||
import tools.helpers.props | ||
|
||
unsupported = ["nvidia"] | ||
|
||
def getDriNode(args): | ||
for node in glob.glob("/dev/dri/renderD*"): | ||
dev = os.path.basename(node) | ||
driver = tools.helpers.props.file_get(args, "/sys/class/drm/{}/device/uevent".format(dev), "DRIVER") | ||
if driver not in unsupported: | ||
return node | ||
return "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters