Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

What to do when GLX stops working with Nvidia

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
User avatar
dbbolton
Posts: 2129
Joined: 2007-06-20 08:17
Location: Iapetus

What to do when GLX stops working with Nvidia

#1 Post by dbbolton »

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
canci
Global Moderator
Global Moderator
Posts: 2502
Joined: 2006-09-24 11:28
Has thanked: 136 times
Been thanked: 136 times

Re: What to do when GLX stops working with Nvidia

#2 Post by canci »

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.
Image Stable / Asus VivoBook X421DA / AMD Ryzen 7 3700U / Radeon Vega Mobile Gfx (Picasso) / 8 GB RAM / 512GB NVMe

READ THIS:

* How to Post a Thread Here
* Other Tips and Great Resources

User avatar
dbbolton
Posts: 2129
Joined: 2007-06-20 08:17
Location: Iapetus

Re: What to do when GLX stops working with Nvidia

#3 Post by dbbolton »

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
lbm
Posts: 494
Joined: 2009-05-16 09:24
Location: Denmark

Re: What to do when GLX stops working with Nvidia

#4 Post by lbm »

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.

secipolla
Posts: 1127
Joined: 2010-06-21 14:20

Re: What to do when GLX stops working with Nvidia

#5 Post by secipolla »

Yep, this happens all the time and we don't notice anything until we need GLX. Good to know.

User avatar
dbbolton
Posts: 2129
Joined: 2007-06-20 08:17
Location: Iapetus

Re: What to do when GLX stops working with Nvidia

#6 Post by dbbolton »

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
EddieB
Posts: 51
Joined: 2011-11-07 03:07

Re: What to do when GLX stops working with Nvidia

#7 Post by EddieB »

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

Gotta look into the 'Debian Way ' for persistence though ... DRY ...
"The Problem is Your Not Grokking Debian ... "

secipolla
Posts: 1127
Joined: 2010-06-21 14:20

Re: What to do when GLX stops working with Nvidia

#8 Post by secipolla »

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*

snowape
Posts: 10
Joined: 2012-01-18 20:03

Re: What to do when GLX stops working with Nvidia

#9 Post by snowape »

Thanks for posting this.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: What to do when GLX stops working with Nvidia

#10 Post by stevepusser »

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.
MX Linux packager and developer

gwc
Posts: 45
Joined: 2012-11-27 21:38

Re: What to do when GLX stops working with Nvidia

#11 Post by gwc »

Thanks for this useful post, this resolved my GLX issue. :mrgreen:

Post Reply