NVIDIA: Failed to initialize the GLX module

Another fallout from the dbus adventure: After I had othalla up and running again, I noticed that the graphic performance was really bad. Playing movies wasn’t moving at all, it was more like a slideshow.

Xorg.0.log said:

[  4978.363] (EE) NVIDIA(0): Failed to initialize the GLX module; please check in your X 
[  4978.363] (EE) NVIDIA(0):     log file that the GLX module has been loaded in your X 
[  4978.363] (EE) NVIDIA(0):     server, and that the module is the NVIDIA GLX module.  If 
[  4978.363] (EE) NVIDIA(0):     you continue to encounter problems, Please try 
[  4978.363] (EE) NVIDIA(0):     reinstalling the NVIDIA driver.

Strange… Turns out X loaded the xorg glx module from /usr/lib/xorg/modules/extensions instead the right one from /usr/lib/nvidia/xorg. No idea why, but adding:

Section "Files" 
    ModulePath      "/usr/lib/nvidia/xorg"
    ModulePath      "/usr/lib/xorg/modules"
...
EndSection

to xorg.conf before the regular path /usr/lib/xorg/modules fixed it.