[ubuntu-x] Hybrid graphics detection
evan at ebroder.net
Mon Oct 31 18:36:39 UTC 2011
At the hybrid graphics session today, we discussed how we could detect
which GPU was actively being used in a hybrid graphics configuration.
I have some code that I've been using to do this, using libpciaccess.
It's based on the code that X itself uses to pick which drivers to
load at startup, so it likely suffers from some of the issues we
discussed in the session. But it does seem to work for nVidia Optimus,
which is the only hybrid graphics system I have access to.
I'm currently using the following Upstart job when either
nvidia-current or fglrx are installed:
start on starting gdm
if [ "$(hybrid-detect)" = "integrated" ]; then
update-alternatives --set gl_conf /usr/lib/mesa/ld.so.conf
Both of these are a bit rough around the edges, and would definitely
need some tuning before being adapted by Ubuntu in general.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1809 bytes
Desc: not available
More information about the Ubuntu-x