New install can't boot after uninstalling nVidia driver

Hi

This week I installed Fedora 36 in dual boot on my desktop computer. (I used 36 because 37 wouldn’t boot from the live install USB stick, probably because of this?)

F36 worked fine, so I wanted to upgrade to 37. The installation completed but now I can’t boot. I see GRUB, then select Fedora and then I get a black screen.

I tried Ctrl+Alt+F1 but it doesn’t work: The screen stays black.

I read somewhere that I could edit the GRUB entry and remove rhgb quietto see more infos. It does start booting and it stops at this step:
[2.0097] i915 000:00:02.0: enabling device (0006 -> 0007)
(I don’t know what it means)
I don’t see any errors, it’s mostly messages about the various USB things plugged in.

I know I could just reinstall Fedora, but I’d like to learn how to troubleshoot these kind of issues. (I’m fairly capable in Linux but not in boot stuff). Any help is welcomed!

Notes:

  • The computer is an Alienware X51 R2 with a Nvidia GTX 1060 graphics card.
  • I’m dual booting. The other OS is Windows 10.
  • Secure boot is ON, but turning it OFF doesn’t help.
  • Windows boots and work fine.
  • My /home is on a home partition (not shared with any other OS)
  • Not sure if it’s relevant but one of the thing I did prior to my not-booting issue is to install the nvidia drivers. It didn’t work and there was some warning about EFI or Secure Boot (i don’t remember) so I uninstalled it.

Does it boot when you pick an older kernel in GRUB? What if select your Intel GPU as the primary GPU in BIOS, does that help?

1 Like

See also: Howto/NVIDIA - RPM Fusion

Desktop machine, with the system trying to load the i915 driver but you said you have an nvidia 1060 GPU.

Does your motherboard have onboard video as well as the nvidia GPU card?
If so then it seems it may be trying to use the intel GPU and since it cannot (either due to bios settings or no monitor attached) it errors there.

This sounds like the problem many had with nvidia and kernels 6.1.5 & 6.1.6 when using nvidia and encryption. The black screen prevented seeing the password prompt on the screen though they could still continue the boot by entering the password and pressing enter. That seems to have been resolved by kernel 6.1.7.

Are you using encryption? What kernel is presently installed?
How did you “uninstall” the nvidia drivers? It sounds as if the modules were not fully removed, which is why I ask this question.

To do a clean uninstall of the nvidia drivers (when installed from rpmfusion) I recommend
sudo dnf remove '*nvidia*' --exclude=nvidia-gpu-firmware which does remove everything related but leaves the necessary firmware package for the nvidia GPU.

Additionally, for the secure boot comment:

Nvidia drivers initially will not load due to secure boot enabled. They have to be signed if you wish to use secure boot and how to do that is here.
https://rpmfusion.org/Howto/Secure%20Boot?highlight=(\bCategoryHowto\b)

How did you install the nvidia drivers? It should have been done as noted by @vgaetera above if you planned to do updates to your system without manually reinstalling the nvidia drivers. If installed from rpmfusion then the method above will automatically sign the newly built modules for each update.

I must note though, that for modules already installed they will not be signed unless removed and reinstalled. New updates to the kernel will get the signed modules automatically.

If the nvidia drivers were installed directly from the nvidia site then the removal and signing methods are different.

2 Likes

No, they all fail at the same step, even the one called 0-rescue.

I don’t seem to have this option.

Yes, but the HDMI port is unaccessible (blocked by plastic built into the case). I could possibly try to break that plastic if you really think this is the only way, but I would prefer to keep the case in its original state :sweat_smile:

I don’t know. What kind of encryption do you mean? How would I verify? My SSD is not encrypted and neither is my home partition, if that’s what you meant.

  • 6.1.7-200.fc37.x86_64 37 Workstation Edition
  • 6.1.7-100 (…)
  • 5.17.5-300 (…)
  • 0-rescue-c347ce(…)eabf 36 Workstation

I tried them all and none have worked.

I installed using the Software app. At the bottom, there’s a Drivers section and there was 2 nvidia drivers available. I’m not entirely sure, I think I installed the first one, then the second one. The later gave me an error and I realized it was just an older version so I ignored it. (it didn’t installed)
I vaguely remember seeing some error, so I just uninstalled the driver also using the graphical Software app.

I would like to try that, but right now I can’t boot so I don’t know how to reach a terminal :sweat_smile: Any tips for me to reach a terminal?

In case it useful, here’s where it stops during boot:

And here are the GRUB commands for the first entry in the GRUB menu:

It seems you installed and then removed the proprietary nvidia driver, but you kept nouveau (the opensource nvidia driver) disabled. Remove everything after ro from the boot command line (that means rhgb quiet rd.driver.blacklist=.. modprobe... nvidia... initcall...) and try to boot.

If that doesn’t work, replace rhgb quiet with 3, that should boot into runlevel 3, meaning a text mode with networking. If the problem is with a graphical session, this should allow you to log in.

I’d say the problem is very possibly related to your nvidia card and the driver swaps you performed. (Next time you buy hardware, try to pick anything else then Nvidia, the user experience is terrible with Nvidia. AMD and Intel work out of the box.).

1 Like

It worked!!! I was able to reach the login screen, login and use the desktop environment normally! Thanks a lot!

Now, unfortunately, the change is not permanent. If I reboot, I still get the black screen after GRUB. Looking at the GRUB command, I see that rd.driver.blacklist=nouveauand everything else you told me to remove is still present. How would I make this change permanent?

To make the change permanent edit /etc/default/grub and remove the unwanted parts from the GRUB_CMDLINE_LINUX so it ends with rhgb quiet"
Then run sudo grub2-mkconfig -o /boot/grub2/grub.cfg
Once that is done then reboot.

It worked! I can now launch Linux from GRUB with no issue!

One little detail though: the “ro” was not present in the original file (etc/default/grub) before I edited it. If I add it like you suggest, then when I look at the command in GRUB after a reboot, I see “ro ro rhgb quiet” (“ro” is there twice). So I edited the line in the file to: GRUB_CMDLINE_LINUX="rhgb quiet" (no “ro”).

I must say i’m really impressed with the level of expertise and dedication from this community so far! That’s a huge plus for Fedora! :+1:

Haha! Yeah, I noticed that… That computer was bought years ago with the intent of being a Windows-only gaming device. For sure I’ll keep this in mind for future acquisitions :wink:

1 Like

Some seem to struggle with nvidia, some do not. It mostly seems to be personal perception from what I have seen.

Many right now are having similar problems with the newer AMD GPUs so go figure.

In any case, it is always wise to wait for some time after a new device is released to ensure support is stabilized for it before purchasing. This applies across the board for all devices, not just the GPUs.

tldr:
The problem was not caused by the update to Fedora 37 but by an incomplete uninstall of the nvidia drivers.

The solution:

  1. in Grub, press e to edit the Fedora entry that doesn’t boot.
  2. Locate the line that starts with linux and have “ro rhgb quiet”. Remove “rhgb quiet” and everything after in that line (careful not to remove the line underneath that starts with “initrd”.
  3. Press Ctrl+X or F10 to boot
  4. This should let you boot normally, but isn’t a permanent solution. Proceed to part 2.

If it didn’t work, then your problem is different and you shouldn’t proceed to part 2. Start a new thread instead :slight_smile:

Part 2: Making it permanent:

  1. In terminal: sudo cp /etc/default/grub /etc/default/grub-backup(make a copy just in case)
  2. sudo nano /etc/default/grub to edit the file
  3. Remove the unwanted parts from the line that starts with GRUB_CMDLINE_LINUX, so that it ends with rhgb quiet". Again, careful not to delete the lines under, and do not delete “rhgb quiet”.
  4. Save and exit
  5. Run sudo grub2-mkconfig -o /boot/grub2/grub.cfg
  6. Reboot
  7. You should now be able to boot normally.

Maybe a moderator could edit the title of this thread to something like “Can’t boot after uninstalling nvidia drivers” ?