Struggling to Uninstall nVidia drivers, can't start xorg now

I have been trying to upgrade from LEAP 42.1 to Tumbleweed and thought it best to uninstall the proprietary Nvidia drivers before upgrading.

I followed the instructions on the wiki about how to uninstall the Nvidia drivers, but zypper/YaST cannot remove nvidia-glG04 - it just gets stuck at 5% and then after maybe 30 minutes gives a lot of errors. All the other nvidia packages from the nvidia repo have been removed.

Now when I boot, it hangs at Starting Locale. I can login (after pressing ctrl+alt_f1) in the command line and check the Xorg log which says:

"LoadModule: “glx”
Failed to load…
UnloadModule: “glx”
LoadModule: “nvidia”
Warning, couldn’t open module “nvidia
No drivers available”

That’s the jist of it. I’ve tried to switch to nouveau using yast from the command line but it didn’t seem to do much. I’m at a bit of a dead end at the moment, although I’m sure the solution isn’t going to be complicated.

And what errors?
Without the actual error messages one can only guess…

Try to run this, that should “fix” your system:

sudo /sbin/update-alternatives --remove libglx.so /usr/lib64/xorg/modules/extensions/nvidia/nvidia-libglx.so

If that doesn’t work/help, try this instead:

sudo /sbin/update-alternatives --set libglx.so /usr/lib64/xorg/modules/extensions/xorg/xorg-libglx.so

And remove the file /etc/ld.so.conf.d/nvidia-gfxG04.conf if it still exists.

Afterwards try to remove the package with:

sudo rpm -e --noscript nvidia-glG04

Oh, and you should remove /etc/X11/xorg.conf (the file, not the directory /etc/X11/xorg.conf.d/ ) if you have it, because it would instruct Xorg to load the nvidia driver which is not installed any more.

And, remove the blacklisting of the nouveau driver.

Sorry, I should have included that in the initial post. The error messages that appear are:
“error: rpmdb: damaged header #2924 retrieved – skipping.” which is repeated over and over again until I get the option to Abort, retry or ignore.

I do not have the directory update-alternatives so neither of these are possible, sadly.

Removed.

I get the following error when trying this:

error: “nvidia-glG04” specifies multiple packages:
error: rpmdbNextIterator: skipping h# 2924 blob size(47308): BAD, 8 + 16 * il(21) + dl(3840)
nvidia-glG04-367.35-25.1.x86_64

Looks like your rpm database is corrupted.
See below.

I do not have the directory update-alternatives so neither of these are possible, sadly.

What do you mean with that?
update-alternatives is a command.

Removed.

Ok, then your system should work with nouveau now, even with nvidia-glG04 installed.

I get the following error when trying this:

error: “nvidia-glG04” specifies multiple packages:
error: rpmdbNextIterator: skipping h# 2924 blob size(47308): BAD, 8 + 16 * il(21) + dl(3840)
nvidia-glG04-367.35-25.1.x86_64

As I wrote, the rpm database seems to be corrupted.
Run this:

sudo rpm --rebuilddb

Hopefully you can uninstall the package afterwards.
If you still get an error that ‘“nvidia-glG04” specifies multiple packages’, try this instead:

sudo rpm -e --allmatches nvidia-glG04

Ok I’ve managed to uninstall the nvidia driver, by using rpmdb --rebuild which seemed to solve that error. However, I still cant seem to get any graphical display.

Edit: After a few reboots it seems to be working… hopefully it stays that way!

Did you run the update-alternatives command?

Can you please post the file /var/log/Xorg.0.log then?

And does “startx” work? (you need to run it as root)
If not, please post the output (that is essentially the same as what normally goes to /var/log/Xorg.0.log, so that file would not be needed then)

Sorry, I just noticed that I made a mistake in those commands.

Run this instead and it should work:

sudo /usr/sbin/update-alternatives --remove libglx.so /usr/lib64/xorg/modules/extensions/nvidia/nvidia-libglx.so

or

sudo /usr/sbin/update-alternatives --set libglx.so /usr/lib64/xorg/modules/extensions/xorg/xorg-libglx.so

Uninstalling nvidia-glG04 should do that automatically, but not if you use “–noscripts”.

[EDIT]
Just saw that it’s working now anyway, so the above shouldn’t be necessary anymore. :wink:
[/EDIT]

Now that the original issue is sorted, there is still some graphic issue after upgrading to Tumbleweed unfortunately. On booting, after GRUB my monitors go dead and I get “No Input Signal” message box flashing up (just like you would get if you unplugged your monitors). Keys like numlock are still responsive but no other combination of keys does anything. Not sure why this is occurring currently…

Does /etc/modprobe.d/50-blacklist-nouveau.conf still exist? If not, remove it, run mkinitrd and reboot.

Just to follow-up so I don’t leave you hanging…:slight_smile:

In the end I reinstalled the latest Tumbleweed snapshot from scratch and it seems to be working fine now, with the exception that my secondary monitor isn’t being detected but that’s another issue for another time.

There is still definitely something a bit weird with Tumbleweed for my setup though - I had to enable nomodeset on the install to get the display to work so I could actually install the thing. Now that it’s installed I don’t need to manually enable nomodeset in GRUB to get it to work - maybe there is some issue with nouveau and newish Nvidia cards that I’m not aware of.

AFAIK, the nouveau driver is not included at all on the installation medium.
It likely uses the generic “modesetting” driver, which may work better or worse than nouveau.

Adding “nomodeset” will cause a fallback to fbdev or vesa.

OTOH, the boot options may be taken over from the installation to the installed system.
So check whether “nomodeset” is actually set already maybe.
Either look in YaST->System->Boot Loader->Kernel Parameters, or run:

cat /proc/cmdline

Or look into /var/log/Xorg.0.log what graphics driver is actually used.

AFAIK nouveau doesn’t support (yet) chips of the “Maxwell” generation and up.
So if your “hwinfo --gfxcard” shows something like:


Model: "nVidia GM1xxx [GeForce GTX xxxx]"

you have to install the proprietary driver.

Or use a generic fallback driver (fbdev or vesa) via “nomodeset”.

Another option may be to uninstall xf86-video-nouveau and use the generic “modesetting” driver.
As this still will use the nouveau kernel module and Mesa’s “nouveau” OpenGL driver, it may not even be a disadvantage, though it may just as well have the same problems.