Saturday, July 16, 2011

The Case of the Broken OpenGL Extensions

Like a good boy I did my apt-get update / apt-get upgrade the other day and thought everything was ok.  It pulled down some x.org updates and a new nvidia-current (yes, running Ubuntu with some development ppa's).  Upon rebooting I noticed compositing in kwin had stopped.  I thought maybe the sequence of updates had messed something up because there was one xorg update that came in after nvidia-current. 

So I ran glxinfo and log and behold I had no GL extensions whatsoever.  Hrm, this is a problem I thought.  I also ran nvidia-settings to see what it said and the OpenGL tab also said nothing was there.  Did a quick web check and no one else was reporting problems with the version of the nvidia driver I had.

I then did a quick ldd `which glxinfo` to see what was up, thinking that one of the xorg updates might have sneaked in some mesa configs.  Sure enough, glxinfo was pulling libGL.so from mesa instead of the nvidia binary.  I looked in /etc/ld.so.conf.d and found a i386-linux-gnu_GL.conf file that indeed placed mesa in ldconfig's path higher than the nvidia one.  A quick rm i386-linux-gnu_GL.conf and restarting of X fixed things.

The moral of the story is, if you're like me and have the xorg edgers ppa installed and have suddenly lost OpenGL acceleration, check your /etc/ld.so.conf.d dir.

No comments:

Post a Comment