Ubuntu – Parallel use of Intel and Nvidia (eGPU) driver / Not Hybrid!


I'm using Ubuntu 12.04 on a Lenovo X220 notebook with onboard Intel graphics.

I purchased a so called external PCIe GPU (GeForce GTX 560 Ti) which is connected via the card slot of my laptop.

Now I want to switch to the Nvidia driver on boot when the eGPU is connected. If it is not, I want to switch back to the intel driver.

I've written a little script doing the job: It places the nvidia xorg.conf on startup (on egpu) or removes it (on intel).

The problem is that the nvidia driver changes some libraries (and maybe more) so I can't use the intel driver. The following error message occurs in xorg.log:

(EE) Failed to initialize GLX extension (Compatible NVIDIA X driver not found)

My question is: Does anybody know how to switch back to the intel driver without completely removing the nvidia driver? Do I have to change some symlinks or something like this?

Best Answer

  • Ubuntu provides the Alternatives system which you can use to configure Nvidia or Intel (Mesa libGL) in this case.

    See my answer to No 3D support on Lenovo W520 with nVidia Optimus. You should run the mentioned update-alternatives and ldconfig commands before X is started.

  • Related Question