sony-vaio-z-series team mailing list archive
-
sony-vaio-z-series team
-
Mailing list archive
-
Message #00451
Re: Better graphics card switching script
Norbert Preining schrieb:
Hi all,
I have experienced regular breakage of OpenGL programs due to the
following reason: Following the tutorial on switching graphics cards
we have
/usr/lib/libGL.so.1.INTEL (intel)
/usr/lib/libGL.so.185.NN.MM (nvidia)
The current code from the tutorial (switch-graphics init file) does:
ln -sf /usr/lib/libGL.so.1.INTEL /usr/lib/libGL.so.1
in the Intel case.
Now the problem is that 185 > 1, so calling ldconfig will revert that
change. So after running ldconfig we have
/usr/lib/libGL.so.1 -> libGL.so.185.NN.MM
although running Intel card.
I have changed the code as follows: In both cases we create a link
/usr/lib/libGL.so.100000 -> libGL.so.1.INTEL
or
/usr/lib/libGL.so.100000 -> libGL.so.185.NN.MM
and then a link
/usr/lib/libGL.so.1 -> libGL.so.10000
I think a permanent static link
/usr/lib/libGL.so.1 -> /usr/lib/libGL.so.100000
would be sufficient here. The 2 lines
ln -sf /usr/lib/libGL.so.100000 /usr/lib/libGL.so.1
could then be omitted from the script.
I'd also recommend not to use the name 'libGL.so.1.INTEL'. It looks
nice, but the next time you install a new nvidia driver, the installer
will consider this file an obsolete library and delete it without
asking. Simple names like NVIDIA, however, are left intact.
Regards,
Bernd
--
Bernd Eggink
http://sudrala.de
Follow ups
References