A little while ago I did a system update that ended up breaking my graphics driver. I could still log in and use my computer fine, but anything requiring extensive use of OpenGL now doesn’t work.
After a few hours of troubleshooting, I’ve narrowed the problem down to the driver’s libglx. I found these lines in my /var/log/Xorg.0.log:
(II) LoadModule: "glx"
(II) Loading /usr/lib64/xorg/modules/extensions/libglx.so
(II) Module glx: vendor="X.Org Foundation"
compiled for 1.17.2, module version = 1.0.0
ABI class: X.Org Server Extension, version 9.0
...]
(EE) NVIDIA(0): Failed to initialize the GLX module; please check in your X
(EE) NVIDIA(0): log file that the GLX module has been loaded in your X
(EE) NVIDIA(0): server, and that the module is the NVIDIA GLX module. If
(EE) NVIDIA(0): you continue to encounter problems, Please try
(EE) NVIDIA(0): reinstalling the NVIDIA driver.
So, I did the suggested thing and reinstalled the NVIDIA driver. No go. Eventually, I manually set libgx by running:
Maybe, but I’ve reinstalled the NVIDIA driver several times, so I’d think it would have re-overwritten Mesa’s version by now.
I installed the x11-video-nvidiaG04 (and associated packages) from the NVIDIA Graphics Drivers repository at http://download.nvidia.com/opensuse/leap/42.1. I had to do one modification to /etc/init.d/boot.local to ensure it was using NVIDIA’s libglx when I first installed it, but after that it worked perfectly until the aforementioned system update. I’ve since undone that change to boot.local, since it doesn’t seem to be necessary anymore, and it breaks my system at this point anyway.
I have a GeForce GTX 960, and the G04 version is what zypper recommends when installed with “install-new-recommends”.
See, that’s what I thought too, but it doesn’t seem to log anything when that happens. I’ll try again to make sure that’s the case, but I’ve been trying to locate a specific error message for a while.
Managed to get a little more information about what’s happening. Here’s a link to my Xorg.0.log when it tries to load NVIDIA’s libglx: http://pastebin.com/5ACA7qcy
The odd thing is that nothing there stands out as an error to me.
That should set the libglx symlink properly on installation, and also install libGL in a way that it is not overwritten.
I had to do one modification to /etc/init.d/boot.local to ensure it was using NVIDIA’s libglx when I first installed it,
And what change exactly?
Such a thing should not be necessary.
I have a GeForce GTX 960, and the G04 version is what zypper recommends when installed with “install-new-recommends”.
Ok, that definitely is supported.
See, that’s what I thought too, but it doesn’t seem to log anything when that happens. I’ll try again to make sure that’s the case, but I’ve been trying to locate a specific error message for a while.
Well, you didn’t actually write what exactly is broken. You only wrote “that caused everything to die”.
So not even Xorg starts any more afterwards?
Otherwise there must be a log, unless you use gdm.
Can you at least post the Xorg log when using Xorg’s libglx then please?
Also, is nvidia-glG04 installed?
Maybe post a list of all installed nvidia packages:
Try to login to a simple desktop (IceWM e.g., that should be installed in any case), and run glxinfo (install Mesa-demo-x if that command is not found). Does that show an error?
Also maybe try to disable the intel chip in the BIOS settings/UEFI firmware if possible.
The change to boot.local was the following script, which I found somewhere online when I ran into issues the first time setting up:
mode=$(/sbin/lspci | egrep 'VGA|3D');
# Make shure we are in command of /usr/X11R6/lib
if -e /etc/ld.so.conf.d/nvidia-gfxGO*.conf ]; then
/bin/rm /etc/ld.so.conf.d/nvidia-gfxGO*.conf
fi
# Check graphics mode and take apropriate action
if `echo $mode | grep -c "Intel" ` -gt 0 ]; then
/usr/sbin/update-alternatives --set libglx.so /usr/lib64/xorg/modules/extensions/xorg/xorg-libglx.so
fi
if -e /usr/X11R6/lib64/libGL.so.1 ]; then
/bin/rm /usr/X11R6/lib64/libGL.so.1
fi
if -e /usr/X11R6/lib/libGL.so.1 ]; then
/bin/rm /usr/X11R6/lib/libGL.so.1
fi
if `echo $mode | grep -c "NVIDIA" ` -gt 0 ]; then
/usr/sbin/update-alternatives --set libglx.so /usr/lib64/xorg/modules/extensions/nvidia/nvidia-libglx.so
/sbin/ldconfig /usr/X11R6/lib64
/sbin/ldconfig /usr/X11R6/lib
fi
So you are using gdm?
Try switching to xdm then for now by setting DISPLAYMANAGER=“xdm” in /etc/sysconfig/displaymanager.
Then switch to IceWM by setting DEFAULT_WM=“icewm” in /etc/sysconfig/windowmanager, as GNOME likely won’t start either.
Then please post the output of “glxinfo”.
List of installed packages:
Ok. Should work then.
The change to boot.local was the following script, which I found somewhere online when I ran into issues the first time setting up:
This is intended to switch between the nvidia and intel driver.
It serves no purpose otherwise and might even break your system (as it removes the libGL.so.1 symlink and nvidia’s library overrides).
Do you have the file /etc/ld.so.conf.d/nvidia-gfxGO4.conf?
nvidia’s OpenGL cannot work otherwise.
And please post the content.
name of display: :0
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
X Error of failed request: GLXBadContext
Major opcode of failed request: 154 (GLX)
Minor opcode of failed request: 6 (X_GLXIsDirect)
Serial number of failed request: 46
Current serial number in output stream: 45
Huzzah! That did the trick. Thanks a lot for your help. Not entirely sure why those lines were commented out, but it’s entirely possible that I was following someone else’s (apparently bad) advice during initial setup.
I’m posting because this issue happened again after doing another system update. The two lines in /etc/ld.so.conf.d/nvidia-gfxG04.conf are once again commented out, so I’m going to un-comment them, run ldconfig, and hope that fixes it. But this means that something during the upgrade process is commenting out these lines, since I certainly didn’t do it.
I also managed to make this issue 100% reproducible. Re-installing the nvidia-glG04 package comments out the contents of /etc/ld.so.conf.d/nvidia-gfxG04.conf every time.
As explained in your bug report, the packages do comment out the contents of that file if they think you are using an Optimus system (to not break the Intel driver which is used to run the graphical session).
In your case this detection seems to be wrong then, and a bug report was the best thing to do (and yes, it is at the right place).
You could create your own file in /etc/ld.so.conf.d/ (e.g. /etc/ld.so.conf.d/mynvidia-gfxG04.conf, the exact name doesn’t matter but it has to end in .conf) with the uncommented content as workaround, to not having to edit the file after each nvidia update.