NVIDIA drivers not working - "Module nvidia not found."

Yes! No worries, I’m just as concerned as you are - I’ve backed up my EFI files ahead of time, and I’m trying my best to look into things as we go. I’m just a little lost as to why this isn’t working, haha

Meant to post this, whoops. I did look through this and couldn’t find anything unusual here. Note that I also removed my old/unused arch and rEFInd boots prior to this.

➜ ~ efibootmgr 
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0001,0000,0019,001A,001B,001C,001D,001E,001F,0020,0021,0022,0023,0024
Boot0000* Windows Boot Manager
Boot0001* GRUB
Boot0010  Setup
Boot0011  Boot Menu
Boot0012  Diagnostic Splash Screen
Boot0013  Lenovo Diagnostics
Boot0014  Regulatory Information
Boot0015  ThinkShield secure wipe
Boot0016  Startup Interrupt Menu
Boot0017  Rescue and Recovery
Boot0018  MEBx Hot Key
Boot0019* USB CD
Boot001A* USB FDD
Boot001B* NVMe0
Boot001C* NVMe1
Boot001D* ATA HDD0
Boot001E* ATA HDD1
Boot001F* USB HDD
Boot0020* PXE BOOT
Boot0021* HTTPS BOOT
Boot0022* LENOVO CLOUD
Boot0023  Other CD
Boot0024  Other HDD
Boot0025* IDER BOOT CDROM
Boot0026* IDER BOOT Floppy
Boot0027* ATA HDD
Boot0028* ATAPI CD

I just reran the installation and saw this here:

  Running scriptlet: grub2-common-1:2.06-53.fc36.noarch                                                                                                                                                                                   14/14 
Generating grub configuration file ...
Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
done

After waiting a couple minutes, my efibootmgr output still looks unchanged, unfortunately, with the same fallback:

➜ ~ uname -r
5.17.5-300.fc36.x86_64

This prompted me to poke around in the GRUB Advanced options, and I stumbled upon the other loaders there! I feel pretty foolish for not doing this before, but it’s something :)

Oddly enough, though, it gives me launch options for every kernel besides 5.19.8, despite the latest kernel being available in /boot/loader/entries/. I also see a vmlinuz and an initramfs for this kernel in /boot (as well as the symvers and System.map), so the kernel install looks normal here, at least. I’ll do a reinstall to make sure.

Currently, the default option in GRUB is booting from the rescue kernel for some reason.

I tried reinstalling the latest kernel, but it doesn’t show up in GRUB for some reason. However, I was able to launch the (slightly older) 5.19.7 kernel, and it looks like NVIDIA graphics initialized under my older akmod installation. The nvidia-settings menu is just blank, but it might just be misconfigured… But even if that’s not entirely working at the moment, this is something separate anyways, haha.

I still need to make it so my latest kernel boots instead of this one, but this is a start, at least!

If you can now boot to the 5.19.7 kernel, then when booted there you may want to run sudo dnf remove kernel*5.19.8* to erase everything related.

Follow that with a sudo dnf update --refresh and it should reinstall the latest kernel and reconfigure everything for it. I suspect it will also fix the nvidia modules for that kernel as well.

Finally, if you choose you can remove any of the (many) unnecessary entries and change the efi boot order with efibootmgr. man efibootmgr or efibootmgr --help should give you info on how to do that.

1 Like

Hmm… After reinstalling the new kernel, it still doesn’t show 5.19.8 as a boot option in GRUB. The update was successful, although i don’t see the 5.19.8 kmod installed here.

➜ ~ dnf list installed "*nvidia*"
Installed Packages
kmod-nvidia-5.19.7-200.fc36.x86_64.x86_64                                                                             3:515.65.01-1.fc36                                                                              @@commandline             
nvidia-gpu-firmware.noarch                                                                                            20220815-139.fc36                                                                               @updates                  
nvidia-persistenced.x86_64                                                                                            3:515.65.01-1.fc36                                                                              @rpmfusion-nonfree-updates
nvidia-settings.x86_64                                                                                                3:515.65.01-1.fc36                                                                              @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia.x86_64                                                                                            3:515.65.01-1.fc36                                                                              @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-cuda.x86_64                                                                                       3:515.65.01-1.fc36                                                                              @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-cuda-libs.i686                                                                                    3:515.65.01-1.fc36                                                                              @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-cuda-libs.x86_64                                                                                  3:515.65.01-1.fc36                                                                              @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-libs.i686                                                                                         3:515.65.01-1.fc36                                                                              @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-libs.x86_64                                                                                       3:515.65.01-1.fc36                                                                              @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-power.x86_64                                                                                      3:515.65.01-1.fc36                                                                              @rpmfusion-nonfree-updates

That list does not show the akmod-nvidia package. Without it the new kmod-nvidia package will not be built on the system.
dnf install akmod-nvidia should fix that issue.

Sweet, I reinstalled it.

Would you happen to know if Nouveau normally gets blacklisted by the akmod-nvidia installation via dnf? I’m getting this error repeating in my kernel launch journal:

Sep 16 13:40:16 fedora kernel: NVRM: The NVIDIA probe routine was not called for 1 device(s).
Sep 16 13:40:16 fedora kernel: NVRM: This can occur when a driver such as: 
                               NVRM: nouveau, rivafb, nvidiafb or rivatv 
                               NVRM: was loaded and obtained ownership of the NVIDIA device(s).
Sep 16 13:40:16 fedora kernel: NVRM: Try unloading the conflicting kernel module (and/or
                               NVRM: reconfigure your kernel without the conflicting
                               NVRM: driver(s)), then try loading the NVIDIA kernel module
                               NVRM: again.
Sep 16 13:40:16 fedora kernel: NVRM: No NVIDIA devices probed.

I really appreciate your help!

What do you see now when you run dnf list installed *nvidia*

With added quotes because of zsh:

➜ ~ dnf list installed "*nvidia*"
Installed Packages
akmod-nvidia.x86_64                                                                                                   3:515.65.01-1.fc36                                                                              @rpmfusion-nonfree-updates
kmod-nvidia-5.19.7-200.fc36.x86_64.x86_64                                                                             3:515.65.01-1.fc36                                                                              @@commandline             
kmod-nvidia-5.19.8-200.fc36.x86_64.x86_64                                                                             3:515.65.01-1.fc36                                                                              @@commandline             
nvidia-gpu-firmware.noarch                                                                                            20220815-139.fc36                                                                               @updates                  
nvidia-persistenced.x86_64                                                                                            3:515.65.01-1.fc36                                                                              @rpmfusion-nonfree-updates
nvidia-settings.x86_64                                                                                                3:515.65.01-1.fc36                                                                              @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia.x86_64                                                                                            3:515.65.01-1.fc36                                                                              @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-cuda.x86_64                                                                                       3:515.65.01-1.fc36                                                                              @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-cuda-libs.i686                                                                                    3:515.65.01-1.fc36                                                                              @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-cuda-libs.x86_64                                                                                  3:515.65.01-1.fc36                                                                              @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-kmodsrc.x86_64                                                                                    3:515.65.01-1.fc36                                                                              @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-libs.i686                                                                                         3:515.65.01-1.fc36                                                                              @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-libs.x86_64                                                                                       3:515.65.01-1.fc36                                                                              @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-power.x86_64                                                                                      3:515.65.01-1.fc36                                                                              @rpmfusion-nonfree-updates

I investigated GRUB 2 a little bit further, and I was able to boot into the latest kernel specifically by generating a GRUB config from my live USB, with grub2-mkconfig, and then booting into 5.19.8 via the GRUB advanced options (again, it sets the default to the recovery vmlinuz for some reason). HOWEVER, I’m pretty sure it only reads the config from /boot/efi/grub/grub.cfg since changing it in /boot/grub2/grub.cfg had no effect. This version of GRUB is my old bootloader, while the GRUB 2 folder is what I presume should be my new one which the EFI is not booting to.

As I posted above, it seems like nouveau isn’t blacklisted, further suggesting that this old GRUB bootloader should be somehow removed in favor of the GRUB 2 at boot/efi/EFI/fedora/grubx64.efi… But I don’t know how to safely override it without making a boot entry, which didn’t work for me.

Here’s some other useful info:

➜ ~ nvidia-settings --verbose=all   

WARNING: NV-CONTROL extension not found on this Display.


ERROR: NVIDIA driver is not loaded

...
[nflx@fedora ~]$ efibootmgr -v
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0001,0000,0019,001A,001B,001C,001D,001E,001F,0020,0021,0022,0023,0024
Boot0000* Windows Boot Manager	HD(1,GPT,partition-uuid-goes-here,0x800,0x82000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...7................
Boot0001* GRUB	HD(1,GPT,other-partition-id-goes-here,0x800,0x82000)/File(\EFI\GRUB\grubx64.efi)
...
➜ ~ cat /sys/firmware/efi/efivars 
cat: /sys/firmware/efi/efivars: Is a directory

However: I just reran this command here with the right disk:

Instead of /dev/sda I had to run it with /dev/nvme0n1 because of the Windows 11 device naming scheme. Now it boots off of Fedora’s GRUB 2 with the right kernel options! :tada:

Now I just need to make it so that nouveau is blacklisted, because I still get the same graphics errors.

This indicates that the efibootmgr may be using the wrong grub with entry 0001
Mine desktop shows this for booting fedora

$ efibootmgr -v
BootCurrent: 0000
Timeout: 3 seconds
BootOrder: 0000,000D,000E
Boot0000* Fedora	HD(1,GPT,f899df8e-0177-45ba-a145-8a342ab3f83b,0x800,0x7d000)/File(\EFI\FEDORA\SHIMX64.EFI)

Booting to your fedora then using efibootmgr -c should give you an additional grub entry for booting fedora from the proper grub. It may be necessary to remove the one shown with entry 0001 before uefi can see the proper one.

On my laptop which dual boots on an nvme drive I get

$ efibootmgr -v
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000,0002,0006,0001,0003,0004
Boot0000* Fedora	HD(1,GPT,5d6a36e2-fe99-4228-9f22-5ce85ed07a2b,0x800,0x82000)/File(\EFI\FEDORA\SHIMX64.EFI)
Boot0001* UEFI:CD/DVD Drive	BBS(129,,0x0)
Boot0002* Windows Boot Manager	HD(1,GPT,5d6a36e2-fe99-4228-9f22-5ce85ed07a2b,0x800,0x82000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................

Note that the UUID is the same for both entries since I use the same drive and the same efi partition for both windows and fedora. That UUID is the partition uuid and not the file sytem uuid for the efi partition. It can be seen with lsblk -o PATH,FSTYPE,UUID,MOUNTPOINT,PARTUUID

To find out if nouveau is blacklisted post the output of cat /etc/default/grub and grep nouveau /boot/loader/entries/*.conf.
If it is blacklisted you should see the same in the kernel options with both outputs. Installing the nvidia driver with akmod-nvidia automatically blacklists the nouveau drivers for the kernel.

I was able to add a new entry with efibootmgr:

➜ ~ efibootmgr 
BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0002,0001,0000,0019,001A,001B,001C,001D,001E,001F,0020,0021,0022,0023,0024
Boot0000* Windows Boot Manager
Boot0001* GRUB
Boot0002* fedora
➜ ~ cat /etc/default/grub # I had to manually add this file
rdblacklist=nouveau

[nflx@fedora ~]$ sudo grep nouveau /boot/loader/entries/*.conf
[sudo] password for nflx: 
grep: /boot/loader/entries/*.conf: No such file or directory

It says here that I could try changing it in my kernel boot entry:

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.

For some reason though, these boot settings aren’t present in my GRUB 2 launch settings.

I could try backing up, then rebuilding my initramfs with settings in /etc/modprobe.d/blacklist-nouveau.conf, but I think this is probably too drastic? - This seems to be working fine out of the box for most people, anyways.

So I backed up my old initramfs and ran sudo dracut --regenerate-all, and I think it’s properly blacklisted now.

However, it black screens my DM on boot, even in the greeter.

Whether I get this working tonight or not, I’ll see if I can post more info here:

https://discussion.fedoraproject.org/t/fedora-36-black-screen/76499

TL;DR: Make sure you’re booting from the correct bootloader and kernel, then blacklist nouveau using a new initramfs.

I’ve booted into NVIDIA proprietary graphics properly! So here’s the full fix, at least for me. Here’s the TL;DR for anyone who is looking for their own fix.

Oddly enough, I had to skip the bootloader installation with Anaconda because it wasn’t detecting a stage1 device. I was working with a Windows 11 dual boot with Arch Linux booting from the rEFInd bootloader prior to this.

This error have had its own fix, but I decided to deal with the bootloader after the OS installation (as you may read in this topic), which was a bad mistake!

Because of these circumstances, I’d like to assume that my case ended up being sort of an edge case… Not sure, though.


By following this guide, I am NOT responsible for any damage you do to your system. I would recommend backing up everything in your /boot with your ESP partitions. Please do your own research.

Part 1: Adding EFI to /boot/efi

Verify that your EFI is mounted to /boot/efi.

If your EFI does not mount on startup:

  • Run lsblk -o PATH,FSTYPE,UUID,MOUNTPOINT
  • Find your EFI partition and copy its UUID.
  • Check your /etc/fstab and add this line (if not present):
UUID=REPLACE-WITH-ID          /boot/efi               vfat    umask=0077,shortname=winnt 1 1

(If you already have a line for your EFI and it’s not mounting, then something might be broken. You may want to troubleshoot this separately in that case.)

Once you’ve done this, verify your EFI is auto-mounting on boot by rebooting the machine.

Part 2: Bootloader Fix

This applies only to EFI partitions. You’ll need to do this step yourself if you’re not on a UEFI system.

To verify if you’ve booted off of an EFI system, use this:

➜ ~ cat /sys/firmware/efi 
cat: /sys/firmware/efi: Is a directory

I’m running on an NVIDIA Optimus laptop with a 1650 graphics card.

The real issue arose from my kernel version being mismatched, due to my bootloader pointing at the right kernel. I’ll spare you the details here (you can read above), but it took a while to figure out I was running Arch’s version of GRUB instead of Fedora’s GRUB 2 bootloader.

To verify that you’re running the correct version of GRUB on boot, run efibootmgr -v in your terminal of choice, and look for a boot entry that looks like this one:

➜ ~ efibootmgr -v
BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0002,0001,0000,0019,001A,001B,001C,001D,001E,001F,0020,0021,0022,0023,0024
Boot0000* Windows Boot Manager	HD(1,GPT,windows-boot-id-goes-here,0x800,0x82000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...7................
Boot0001* GRUB	HD(1,GPT,really-long-id-goes-here,0x800,0x82000)/File(\EFI\GRUB\grubx64.efi)
Boot0002* fedora	HD(1,GPT,another-very-long-id-here,0x800,0x82000)/File(EFI\fedora\grubx64.efi)

Note the paths at the end of each line. If it looks like this, then you’ve got a good boot going:
File(EFI\fedora\grubx64.efi)

If not, then please see this post on how I made my boot entry.

If you see the boot, then pay attention to the Boot000X ID to the left and compare it with the BootCurrent list. If the fedora boot isn’t the first ID on this list, then look into efibootmgr -o to switch your boot order so the fedora bootloader is listed first.

Part 3: Installing and using NVIDIA

By this point, your system should be closer to a relatively normal Fedora install! :tada:

To install graphics drivers for your GPU, See https://rpmfusion.org/Howto/NVIDIA#Installing_the_drivers, then reboot your system.

Now that the drivers are installed after a fresh reboot, run nvidia-settings. If you don’t see your GPU listed there, then your GPU isn’t active under your configuration.

There’s two ways to do this. There’s a way to boot NVIDIA graphics via GRUB, but it didn’t work for me, so I ended up rebuilding my initramfs files instead.
Please backup your /boot directory in case you need to roll back!

Firstly, create a new file called /etc/modprobe.d/blacklist-nvidia-nouveau.confand add the following contents:

blacklist nouveau
options nouveau modeset=0

Then, after backing up your system’s current initramfs files (/boot/initramfs-*), run sudo dracut --regenerate-all --force to rebuild those files with the current kernel settings.

Then reboot. If you’re seeing a black screen, see this post: https://discussion.fedoraproject.org/t/fedora-36-black-screen/76499/26?u=treeway7