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.
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
# 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
if -e /usr/X11R6/lib64/libGL.so.1 ]; then
if -e /usr/X11R6/lib/libGL.so.1 ]; then
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
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.
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.