What to do when GLX stops working with Nvidia

Share your own howto's etc. Not for support questions!

What to do when GLX stops working with Nvidia

Postby dbbolton » 2010-10-31 00:49

Note: this applies to the Nvidia installer method. If you used the Debian method, you should not have this problem.

I've had this happen several times, and like a dope, I usually just re-install the nvidia driver. But after actually reading the log files, I found an easier solution.

In my case, the problem always happens when the xserver-xorg-core package is updated. This package includes the file:
Code: Select all
/usr/lib/xorg/modules/extensions/libglx.so


However, Nvidia uses this name as a symbolic link to
Code: Select all
/usr/lib/xorg/modules/extensions/libglx.so.XXX.YY


where XXX and YY are given by the current driver version. So, when the package is updated, it overwrites the symbolic link with an actual file, and GLX applications will try to use that file instead of Nvidia's.

My solution is simply to move the "bad" file and recreate the symbolic link:
Code: Select all
su root

mv /usr/lib/xorg/modules/extensions/libglx.so /usr/lib/xorg/modules/extensions/libglx.so.orig
ln -s /usr/lib/xorg/modules/extensions/libglx.so.XXX.YY /usr/lib/xorg/modules/extensions/libglx.so

exit


After re-establishing the link, you will need to restart X to get GLX working again.
Last edited by dbbolton on 2010-11-29 05:10, edited 3 times in total.
GitHub | zsh docs in Letter PDF

Telemachus wrote:Put down the CGI.
User avatar
dbbolton
 
Posts: 2133
Joined: 2007-06-20 08:17
Location: Iapetus

Re: What to do when GLX stops working with Nvidia

Postby canci » 2010-11-04 18:56

Good work. But doesn't this only happen when installing nvidia manually? IIRC the Debian drivers should do this automatically. Or not?
The problem is nvidia's own implementation of libgl which conflicts.
I ken hez kinvulf beck? I ken hez riesnible modereyshn? Kthnxbai!

No need to discuss this topic? Offended by this signature? Remove it:

Mez wrote:You can easily just disable viewing signatures

Click here - and set "Display Signatures" to No
User avatar
canci
 
Posts: 1705
Joined: 2006-09-24 11:28
Location: Bosnia & Herzegovina

Re: What to do when GLX stops working with Nvidia

Postby dbbolton » 2010-11-04 22:04

canci wrote:Good work. But doesn't this only happen when installing nvidia manually? IIRC the Debian drivers should do this automatically. Or not?
The problem is nvidia's own implementation of libgl which conflicts.


Yes, this only applies to those who use the Nvidia installer. I forgot to mention that.
GitHub | zsh docs in Letter PDF

Telemachus wrote:Put down the CGI.
User avatar
dbbolton
 
Posts: 2133
Joined: 2007-06-20 08:17
Location: Iapetus

Re: What to do when GLX stops working with Nvidia

Postby lbm » 2010-12-14 07:26

Nice, thanks. Will give this a try when it happens for me again!

Nice, confirmed as working :)
Last edited by lbm on 2010-12-14 17:07, edited 1 time in total.
User avatar
lbm
 
Posts: 480
Joined: 2009-05-16 09:24
Location: Denmark

Re: What to do when GLX stops working with Nvidia

Postby secipolla » 2010-12-14 11:32

Yep, this happens all the time and we don't notice anything until we need GLX. Good to know.
secipolla
 
Posts: 1127
Joined: 2010-06-21 14:20

Re: What to do when GLX stops working with Nvidia

Postby dbbolton » 2011-01-03 15:49

I got sick of typing the version number by hand, so I wrote a script that fixes the symbolic link (it chooses the latest version of all available Nvidia GLX plugin files in this directory)

https://github.com/dbbolton/scripts/blo ... ia_glx_fix
GitHub | zsh docs in Letter PDF

Telemachus wrote:Put down the CGI.
User avatar
dbbolton
 
Posts: 2133
Joined: 2007-06-20 08:17
Location: Iapetus

Re: What to do when GLX stops working with Nvidia

Postby EddieB » 2011-12-03 17:42

Thanks ... this solved it ... :-)

Gotta look into the 'Debian Way ' for persistence though ... DRY ...
"The Problem is Your Not Grokking Debian ... "
User avatar
EddieB
 
Posts: 51
Joined: 2011-11-07 03:07

Re: What to do when GLX stops working with Nvidia

Postby secipolla » 2011-12-03 21:38

Although I wrote 'good to know' above, I kept reinstalling the driver after an xserver-xorg-core update :P Must remember next time.
Another tip is when updating libgl1-mesa-glx. It also breaks GLX for the NVIDIA driver and has an even easier solution:
Code: Select all
# rm /usr/lib/i386-linux-gnu/libGL.so.1*
secipolla
 
Posts: 1127
Joined: 2010-06-21 14:20

Re: What to do when GLX stops working with Nvidia

Postby snowape » 2012-01-28 21:20

Thanks for posting this.
snowape
 
Posts: 10
Joined: 2012-01-18 20:03

Re: What to do when GLX stops working with Nvidia

Postby stevepusser » 2012-01-28 23:07

You may also try the alternatives system:

Code: Select all
su -c 'update-alternatives --config libGL.so'
su -c 'update-alternatives --config libglx.so'


The diverted libraries are the open MESA versions, so you want to undo the diversions (symlinks)
so the symlinks point back to the Nvidia OpenGL libraries.

I get warnings when compiling programs against the diverted libs (MESA) on my Intel system,
but they don't seem to affect anything when others use my packages.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Krita 3.3.2.1, Pale Moon 27.6.0, Audacity 2.2.0, mpv 0.27.0, Corebird 1.7.1, Firefox 57.0, SMPlayer 17.11.2
User avatar
stevepusser
 
Posts: 8938
Joined: 2009-10-06 05:53

Re: What to do when GLX stops working with Nvidia

Postby gwc » 2013-05-04 13:09

Thanks for this useful post, this resolved my GLX issue. :mrgreen:
gwc
 
Posts: 45
Joined: 2012-11-27 21:38


Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable