Fedora won't boot after proprietary Nvidia driver install

When I first installed fedora I downloaded the noveou drivers. My computer has been acting extremely crazy in recent weeks with it randomly freezing up so I decided to install the proprietary ones instead from rpm fusion to see if that would help change anything. What might be the issue is I forgot to turn off the noveou drivers before rebooting and now the fedora logo won’t even show up on the boot screen. I was wondering if forgetting to disable the noveou drivers is the cause and if so how I would go about disabling them. I was reading this link but the instructions seems to be outdated.

Edit: I’m able to boot as far as to see the GRUB screen where I can pick which fedora version I want to boot

Fedora 38 Gnome
Desktop PC
Intel i7 7900k cpu
NVIDIA GTX 1080 gpu

It is not easy to figure out what you have done. Which version of Fedora are you using? Is your system a laptop or desktop, and if a laptop, which technology to switch between integrated and discrete graphics does it use? It would be useful to mention which Nvidia GPU you have.

The link you used is very old. Blindly following random suggestions without understanding them is a fast route to a non-working system.

If you install Fedora 38 on a machine with Nvidia graphics you should get nouveau without needing to download drivers, and when you install the Nvidia drivers from the rpmfusion-nonfree site it will disable nouveau. To install non-free Nvidia drivers, ollow the current instructions from the rpmfusion site.

Ok cool. What’s preventing it from starting up then? It happened after I rebooted from the driver install.

George asked for more information, and you have provided none.

We need more info to even be able to start with an answer.

You said it won’t boot but did not describe what is actually happening.

This is not really informative, though it seems grub is actually working.
What happens next? Totally black screen? Something else?

Will the computer boot from a live install media USB device?
What command was used to install the drivers?
Did you wait at least 5 minutes after installing the drivers before you rebooted?

There are ways to recover but more information is necessary.

1 Like

What happens next? Totally black screen? Something else?
It goes completely black, no fedora logo or circle loading icon either.

Will the computer boot from a live install media USB device?
Haven’t tried it yet.

What command was used to install the drivers?
sudo dnf update and sudo dnf install and maybe unsure if I also did sudo dnf install xorg-x11-drv-nvidia-cuda

Did you wait at least 5 minutes after installing the drivers before you rebooted?
Unsure, my pc has some extreme random freezes the longer I keep it on and it froze again so I turned it off from the power button. I do this like 5+ times a day now but this last shutdown I wasn’t able to log back in

With that info it seems a good idea to try booting from the live install media, then while booted that way do more troubleshooting. The repeated freezes are symptoms of other problems that need to be worked out as well.

Does it freeze when booted to the live media or only when booted to the installed system? That will be worth knowing and may guide steps going forward.

I’ll give the live one a try but in the meantime doing this from the rpm fusion link got it to boot back up " Switching between nouveau/nvidia

With recent drivers as packaged with RPM Fusion, it is possible to switch easily between nouveau and nvidia while keeping the nvidia driver installed. When you are about to select the kernel at the grub menu step. You can edit the kernel entry, find the linux boot command line and manually remove the following options “rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1”. This will allow you to boot using the nouveau driver instead of the nvidia binary driver. At this time, there is no way to make the switch at runtime."

While it was booting with deleting those lines I saw this come up if it has any meaning:

I overlooked that option to allow the nouveau drivers to load :+1:

Now that it is booted then please post the following
dnf list installed '*nvidia*'. Also mokutil --sb-state

The failed message above is immaterial for 99+% of nvidia users. The nvidia-powerd service only applies to a limited set of nvidia GPUs in specific laptop configs and otherwise is just an alert for the majority of us. Ignore it.
If you do not want that message to appear during boot then a simple sudo systemctl disable nvidia-powerd.service will make it disappear.

Installed Packages
akmod-nvidia.x86_64                                                                                                      3:530.41.03-1.fc38                                                                                 @rpmfusion-nonfree
kmod-nvidia-6.3.6-200.fc38.x86_64.x86_64                                                                                 3:530.41.03-1.fc38                                                                                 @@commandline     
kmod-nvidia-6.3.7-200.fc38.x86_64.x86_64                                                                                 3:530.41.03-1.fc38                                                                                 @@commandline     
nvidia-gpu-firmware.noarch                                                                                               20230515-150.fc38                                                                                  @updates          
nvidia-settings.x86_64                                                                                                   3:530.41.03-1.fc38                                                                                 @rpmfusion-nonfree
xorg-x11-drv-nvidia.x86_64                                                                                               3:530.41.03-1.fc38                                                                                 @rpmfusion-nonfree
xorg-x11-drv-nvidia-cuda-libs.x86_64                                                                                     3:530.41.03-1.fc38                                                                                 @rpmfusion-nonfree
xorg-x11-drv-nvidia-kmodsrc.x86_64                                                                                       3:530.41.03-1.fc38                                                                                 @rpmfusion-nonfree
xorg-x11-drv-nvidia-libs.x86_64                                                                                          3:530.41.03-1.fc38                                                                                 @rpmfusion-nonfree
xorg-x11-drv-nvidia-power.x86_64                                                                                         3:530.41.03-1.fc38                                                                                 @rpmfusion-nonfree


bash: mok-util: command not found...

My typo. Should have been mokutil --sb-state. I fixed it above.

SecureBoot enabled

I think I tried turning off Secure Boot from BIOS before making this post but that didn’t do anything either. Though not sure if there was more steps I needed to do then just turning it off.

Ok, The nvidia drivers cannot load when secure boot is enabled unless they have been signed.

It is simple to sign them so if you wish to use secure boot then do the following.

  1. Follow the steps in /usr/share/doc/akmods/README.secureboot to create the key and import it into the bios.
  2. Once you have rebooted then dnf remove kmod-nvidia-6.3.7-200.fc38.* followed by akmods --force to rebuild that package which contains the driver modules.
  3. Once that command returns you to the prompt verify that the package has been installed by repeating the ‘dnf list’ command used above and if the package removed is now back then it should have the signed modules.
  4. Reboot again to load the modules

Now the command lsmod | grep nvidia should return several lines showing the nvidia drivers loaded into the kernel.

If not then we can check the kernel command line with cat /proc/cmdline to see what else may be the issue.

There are 2 options in the kernel command line that may or may not have an affect. They work for me and for some others. It seems recent versions of the packages from rpmfusion have dropped these options from the command line with nvidia drivers but some seem to need them (singly or together)
nvidia-drm.modeset=1 initcall_blacklist=simpledrm_platform_driver_init

I read the README but it’s really confusing to understand. What commands do I need to enter into the terminal to complete the instructions?

I think I messed up even more now. I created a password following the README and now I cant even boot when editing the grub menu either.

Edit: The blacklist noveaou driver comes up twice now in GRUB so editing it out twice gets me back in.

It didn’t show up after I did dnf list or even dnf list kmod-nvidia-6.3.7-200.fc38.*

Now the command lsmod | grep nvidia should return several lines showing the nvidia drivers loaded into the kernel.

Nothing happens when I type that command in. It goes back to a new ordinary line on the terminal

Sorry to hear that.
First to verify or fix the signing key. You probably do not need a password except during the second step.
One may verify the current status with

You can confirm the enrollment of the new keypair once the system
rebooted with:
 `mokutil --list-enrolled | grep Issuer`
or with:
 `mokutil --test-key /etc/pki/akmods/certs/public_key.der`

as is shown at the bottom of the README.

If you wish to generate a new key and start over then use
sudo /usr/sbin/kmodgenca -a -f
Once that is done then repeat the import step for the new key with
sudo mokutil --import /etc/pki/akmods/certs/public_key.der and use a simple password that will only be needed when rebooting and actually importing the key into the bios.
The reboot process must follow these steps (again from the README)

- Rebooting the system is needed for MOK to enroll the new public key.
- On next boot MOK Management is launched and you have to choose
  "Enroll MOK".
- Choose "Continue" to enroll the key or "View key 0" to show the keys
  already enrolled.
- Confirm enrollment by selecting "Yes".
- You will be invited to enter the password generated above.
  WARNING: keyboard is mapped to QWERTY!
- The new key is enrolled, and system ask you to reboot.

NOTE the WARNING above. If the keyboard is not a QWERTY keyboard as is used standard in the us and your keyboard language is different when the OS is booted then this step in the bios may not provide a proper password for the import.

Then verify that the key has been enrolled as above and at the end of the readme.

Finally we should be able to fix the driver issue with
sudo dnf remove '*nvidia*' --exclude nvidia-gpu-firmware
followed by
sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda
then wait at least 5 minutes.
check that the drivers are all installed with dnf list installed '*nvidia*' and verify the kmod-nvidia package is installed with the kernel version in the package name.

You did not show the result of cat /proc/cmdline, and that seems it may be important as well.

When all done you should see something like this.

[user1@eagle ~]$ mokutil --sb-state
SecureBoot enabled

[user1@eagle ~]$ lsmod | grep nvidia
nvidia_drm             94208  6
nvidia_modeset       1519616  8 nvidia_drm
nvidia_uvm           3227648  2
nvidia              61693952  388 nvidia_uvm,nvidia_modeset
video                  73728  1 nvidia_modeset

[user1@eagle ~]$ mokutil --list-enrolled | grep Issuer
        CN=Fedora Secure Boot CA
                CA Issuers - URI:https://fedoraproject.org/wiki/Features/SecureBoot
        Issuer: O=eagle.home.domain, OU=eagle.home.domain/emailAddress=akmods@eagle.home.domain, L=None, ST=None, C=US, CN=eagle.home.domain-3731337192

Note that the last one listed is my own PC with the self-generated key.

I did sudo /usr/sbin/kmodgenca -a -f
followed by sudo mokutil --import /etc/pki/akmods/certs/public_key.der
then sudo dnf remove '*nvidia*' --exclude nvidia-gpu-firmware
then sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda
waited 5+ min then dnf list installed '*nvidia*' I saw it there
But when I do lsmod | grep nvidia nothing shows up

Also here is the output of cat /proc/cmdline BOOT_IMAGE=(hd1,gpt2)/vmlinuz-6.3.8-200.fc38.x86_64 root=UUID=7a08bf71-5402-427f-a07b-90ebc76cdca4 ro rootflags=subvol=root rd.driver.blacklist=nouveau modprobe.blacklist=nouveau rd.luks.uuid=luks-5dee9348-f3db-4021-8f7a-a5ba289fc61b rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau

mokutil --list-enrolled | grep Issuer shows Issuer: CN=Fedora Secure Boot CA CA Issuers - URI:https://fedoraproject.org/wiki/Features/SecureBoot Issuer: O=fedora, OU=fedora/emailAddress=akmods@fedora, L=None, ST=None, C=US, CN=fedora-1567284010

and sudo mokutil --test-key /etc/pki/akmods/certs/public_key.der shows /etc/pki/akmods/certs/public_key.der is already enrolled

Also check the output of rpm -qi kmod-VirtualBox-$(uname -r)

Maybe it only showed up after a reboot but I see it now, doing lsmod | grep nvidia shows

nvidia_drm             94208  12
nvidia_modeset       1519616  4 nvidia_drm
nvidia_uvm           3227648  0
nvidia              61693952  281 nvidia_uvm,nvidia_modeset
video                  73728  1 nvidia_modeset

Following those steps allowed me to boot back in with NVIDIA proprietary drivers enabled so thank you to everyone that helped get this fixed.