I have an optimus laptop, so both intel and nvidia cards. It has worked fine for years (running 12.04) using bumblebee. Yes, I know there are better options by now, but it works fine.

Problem is, for various reasons I needed the CUDA 6 toolkit, which means an external install. Unsurprisingly, it squashed my GLX library.

Currently the nvidia hardware works fine, but the Intel hardware (that is, my xserver on :0) can't successfully load GLX. I would hazard a guess that perhaps it has something to do with the intel xorg initialization log containing

[    77.269] (II) LoadModule: "glx"
[    77.269] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[    77.277] (II) Module glx: vendor="NVIDIA Corporation"
[    77.277]    compiled for 4.0.2, module version = 1.0.0
[    77.277]    Module class: X.Org Server Extension
[    77.469] (EE) Failed to initialize GLX extension (Compatible NVIDIA X driver not found)

dpkg -S agrees that /usr/lib/xorg/modules/extensions/libglx.so "belongs" to xserver-xorg-core, so I'm reasonably sure that a forced reinstall of that package would put libglx.so back to the "correct" version. The only problem is that that would break the nvidia side.

Intel doesn't use an xorg.conf, Nvidia uses one via bumblebee.

Is there a way that I can get these two drivers to coexist in peace?


You might try to restore the original /usr/lib/xorg/modules/extensions/libglx.so from xserver-xorg-core Install xserver-xorg-core. That's what I did in a similar situation. Here's how:

  1. First confirm that it has indeed been replaced by the nvidia install:

    debsums xserver-xorg-core | grep libglx.so

    If it shows FAILED, it means that it has actually been replaced, and you could try to restore the original.

  2. To restore the original, first find the .deb filename for your installed package:

    apt-cache show xserver-xorg-core | grep Filename: | head -1

    It should show something like this:

    Filename: pool/main/x/xorg-server/xserver-xorg-core_1.7.6-2ubuntu7.12_i386.deb
  3. Locate where you can download that file from, and download it. (Usually a Google search on the filename, marked with ^^^^^^ below, is enough.) Save it on /tmp.

  4. Extract the needed file from the package:

    cd /tmp
    dpkg --fsys-tarfile xserver-xorg-core_1.7.6-2ubuntu7.12_i386.deb | tar xvf - ./usr/lib/xorg/modules/extensions/libglx.so
  5. Rename the file you are about to replace (just in case you need it later):

    mv /usr/lib/xorg/modules/extensions/libglx.so /usr/lib/xorg/modules/extensions/libglx.so.orig-20140914
  6. Copy the original file to its correct place:

    mv ./usr/lib/xorg/modules/extensions/libglx.so /usr/lib/xorg/modules/extensions/libglx.so
  7. Restart your X (logging out and back in from my graphics session was enough here).

  8. Run glxgears (or your preferred GLX program) to confirm everything is dandy now.

The above is tested and working on my oldie Ubuntu 10.04 desktop (no Unity for me), should work on your 12.04 install too if you follow the indicated procedure for finding out the .deb package name (which will be different than mine).

  • Does not work ubuntu 14.04 LTS – Pdksock May 15 '16 at 7:39
  • The question is asking if the xorg and nvidia versions of glx can coëxist. This answer doesn't answer that question. – bb94 May 20 '18 at 7:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.