I've got a laptop with two graphics cards - integrated graphics card (on i5-430M processor) and Radeon 5730. I sometimes switch from the integrated card (which is not that energy-consuming) to Radeon for some work with OpenGL. I do this in BIOS, nothing that the operating system would be involved in.
The problem is, the integrated card has its OpenGL lib intalled in
/usr/lib/x86_64-linux-gnu/mesa/libGL.so.1, but the external card has its in
/usr/lib/fglrx/libGL.so.1 (gets installed along with AMD drivers). When I installed both of the libraries my system chose the one with newer version of OpenGL (the one from
fglrx folder) and GUI under the integrated card looked awful as it wasn't supported by this library. On the other hand, if I uninstall the Radeon drivers, my system reverts to the old
mesa OpenGL, but Radeon uses this library too and I only get OpenGL 1.4 (which is not sufficient for my purposes).
Is there any way in Linux to have two OpenGL libraries and selectively change which one will be loaded on startup? I wouldn't mind a solution where I would have to restart the system for the changes to take place.