Add GPU detection via libpci
Categories
(Core :: Graphics, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox85 | --- | fixed |
People
(Reporter: aosmond, Assigned: aosmond)
References
(Blocks 1 open bug, Regressed 1 open bug)
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
We should try to detect GPUs via libpci. This allows us to go from a Mesa DRI driver to a vendor ID, and from there to a device ID without relying upon GLX. This also allows us to detect secondary GPUs.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
There are a few scenarios in which we may have difficulty determining
the exact GPU that a user has with Linux/BSD. We might not have access
to the GLX_EXT_query_renderer extension, either because it is
unavailable, or because we don't want to use GLX and cause the OS to
spin up XWayland. We would also like to detect when the user has
multiple GPUs, as this may be useful when diagnosing issues (e.g. one
GPU is slaved to another for output to the display on a laptop).
Comment 2•4 years ago
|
||
This looks really good and a nice alternative to https://gitlab.freedesktop.org/mesa/mesa/-/issues/2976
I'll just double check we now correctly detect things on Wayland without Xwayland.
https://treeherder.mozilla.org/jobs?repo=try&revision=e405358b172ad9f35d589cc6c30eb218fd196351
Assignee | ||
Comment 3•4 years ago
|
||
I'd love to have the EGL extensions to do it properly, but this will work in a pinch with what we have today. I wanted it anyways to be able to detect multiple GPUs for bug 1675768.
Comment 4•4 years ago
|
||
Any EGL extension would still take month or years to be available everywhere, so this is a nice solution to get around that.
Comment 5•4 years ago
|
||
Great to see it happens! I'm going to have 2 AMD GPU system soon so I'll test it there. It may also helps with VA-API playback on correct GPU when multiple GPU are used.
Assignee | ||
Comment 6•4 years ago
|
||
Awesome, I'll be landing this once we hit 85 since we are in the soft freeze.
Pushed by aosmond@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bcb085493bbe Detect GPUs with libpci if available. r=rmader
Comment 8•4 years ago
|
||
bugherder |
Comment 9•4 years ago
|
||
we don't want to use GLX and cause the OS to spin up XWayland
Don't forget that to actually avoid spinning Xwayland up (when it is available), you would have to change the condition in fire_glxtest_process
, it is currently IsWaylandDisabled() || getenv("DISPLAY") || !wayland_egltest()
i.e. if there is a $DISPLAY
we go ahead with GLX and wake Xwayland up if it wasn't up already.
I can confirm that unset DISPLAY; ./mach run --temp-profile
does auto-enable WebRender for me now \o/
Updated•4 years ago
|
Updated•4 years ago
|
Updated•3 years ago
|
Description
•