Nvidia Drivers Fail to Install

Hi All,

I’m running F40 beta and I’m having difficulties getting the Nvidia drivers (from the RPM repos) loaded on my system. Secure Boot is enabled and I’m dualbooting W11. For what it’s worth, the exact same issue occurs on F39.

I’ve tried following both the RPM Fusion how-to (& the Secure Boot how-to) as well as this blog post, which are mostly the same, to no success.

Prior to following the guide(s), I enable the RPM Fusion repositories.

My graphics card is a 4080 SUPER and it’s reliant on the 550.x drivers from Nvidia.

For completeness, here is a run through of what I’ve done. Apologies if I’ve missed anything, or provided irrelevant information - I’m still finding my feet with this.

  1. Installed the required tools

sudo dnf install kmodtool akmods mokutil openssl

  1. Generated a signing key
    sudo kmodgenca -a

  2. Enrolled in MOK, then rebooted
    sudo mokutil --import /etc/pki/akmods/certs/public_key.der

systemctl reboot

  1. Installed the Nvidia driver and waited 10-15 minutes for it to build

sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda

It looks like this is where the problems start. After waiting, modinfo shows no Nvidia module found.

modinfo -F version nvidia

modinfo: ERROR: Module nvidia not found.

Runing sudo akmods --force also shows the modules as failing to build.

Checking kmods exist for 6.8.4-300.fc40.x86_64             [  OK  ]
Building and installing nvidia-kmod                        [FAILED]
Building rpms failed; see /var/cache/akmods/nvidia/550.67-1-for-6.8.4-300.fc40.x86_64.failed.log for details

Hint: Some kmods were ignored or failed to build or install.
You can try to rebuild and install them by by calling
'/usr/sbin/akmods --force' as root.

Last 20 lines from that failed.log file:

550.67-1-for-6.8.4-300.fc40.x86_64.failed.log

024/04/08 21:48:40 akmodsbuild: 1375 | void uvm_tools_record_access_counter(uvm_va_space_t *va_space,
2024/04/08 21:48:40 akmodsbuild: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2024/04/08 21:48:40 akmodsbuild: /tmp/akmodsbuild.QYJ08LKV/BUILD/nvidia-kmod-550.67/_kmod_build_6.8.4-300.fc40.x86_64/nvidia-uvm/uvm_tools.c:2886:5: warning: no previous prototype for ‘uvm_tools_init’ [-Wmissing-prototypes]
2024/04/08 21:48:40 akmodsbuild: 2886 | int uvm_tools_init(dev_t uvm_base_dev)
2024/04/08 21:48:40 akmodsbuild: | ^~~~~~~~~~~~~~
2024/04/08 21:48:40 akmodsbuild: /tmp/akmodsbuild.QYJ08LKV/BUILD/nvidia-kmod-550.67/_kmod_build_6.8.4-300.fc40.x86_64/nvidia-uvm/uvm_tools.c:2947:6: warning: no previous prototype for ‘uvm_tools_exit’ [-Wmissing-prototypes]
2024/04/08 21:48:40 akmodsbuild: 2947 | void uvm_tools_exit(void)
2024/04/08 21:48:40 akmodsbuild: | ^~~~~~~~~~~~~~
2024/04/08 21:48:40 akmodsbuild: The bug is not reproducible, so it is likely a hardware or OS problem.
2024/04/08 21:48:40 akmodsbuild: make[3]: *** [scripts/Makefile.build:243: /tmp/akmodsbuild.QYJ08LKV/BUILD/nvidia-kmod-550.67/_kmod_build_6.8.4-300.fc40.x86_64/nvidia-uvm/nv-kthread-q.o] Error 1
2024/04/08 21:48:40 akmodsbuild: make[2]: *** [/usr/src/kernels/6.8.4-300.fc40.x86_64/Makefile:1939: /tmp/akmodsbuild.QYJ08LKV/BUILD/nvidia-kmod-550.67/_kmod_build_6.8.4-300.fc40.x86_64] Error 2
2024/04/08 21:48:40 akmodsbuild: make[1]: *** [Makefile:252: __sub-make] Error 2
2024/04/08 21:48:40 akmodsbuild: make[1]: Leaving directory ‘/usr/src/kernels/6.8.4-300.fc40.x86_64’
2024/04/08 21:48:40 akmodsbuild: make: *** [Makefile:85: modules] Error 2
2024/04/08 21:48:40 akmodsbuild: error: Bad exit status from /var/tmp/rpm-tmp.ed9bsL (%build)
2024/04/08 21:48:40 akmodsbuild:
2024/04/08 21:48:40 akmodsbuild: RPM build errors:
2024/04/08 21:48:40 akmodsbuild: Bad exit status from /var/tmp/rpm-tmp.ed9bsL (%build)
2024/04/08 21:48:40 akmodsbuild:
2024/04/08 21:48:40 akmods: Building rpms failed; see /var/cache/akmods/nvidia/550.67-1-for-6.8.4-300.fc40.x86_64.failed.log for details

Fedora sees my GPU, lspci | grep -i nvidia displays it.

The packages are definitely installed also. dnf list installed \*nvidia\


Installed Packages
akmod-nvidia.x86_64                      3:550.67-1.fc40      @rpmfusion-nonfree
nvidia-gpu-firmware.noarch               20240312-1.fc40      @updates-testing  
nvidia-modprobe.x86_64                   3:550.67-1.fc40      @rpmfusion-nonfree
nvidia-persistenced.x86_64               3:550.67-1.fc40      @rpmfusion-nonfree
nvidia-settings.x86_64                   3:550.67-1.fc40      @rpmfusion-nonfree
xorg-x11-drv-nvidia.x86_64               3:550.67-1.fc40      @rpmfusion-nonfree
xorg-x11-drv-nvidia-cuda.x86_64          3:550.67-1.fc40      @rpmfusion-nonfree
xorg-x11-drv-nvidia-cuda-libs.x86_64     3:550.67-1.fc40      @rpmfusion-nonfree
xorg-x11-drv-nvidia-kmodsrc.x86_64       3:550.67-1.fc40      @rpmfusion-nonfree
xorg-x11-drv-nvidia-libs.x86_64          3:550.67-1.fc40      @rpmfusion-nonfree
xorg-x11-drv-nvidia-power.x86_64         3:550.67-1.fc40      @rpmfusion-nonfree

Any advice here would be appreciated.

Please post the full content of that log as indicated in your error message from akmods.

Since your GPU is bleeding edge there may be issues with building the driver for it but without the full log (or at least the last 100 or more lines) we cannot tell why it failed.

We also should verify that the signing key was properly imported to bios which can be done with
mokutil --list-enrolled | grep Issuer then look to see if your key was properly imported.

However, the key is not the actual problem here since the output of the dnf command clearly shows the kmod-nvidia package was not created nor installed and akmods shows a failure in building the modules.

Thanks for the reply.

Since your GPU is bleeding edge there may be issues with building the driver for it but without the full log (or at least the last 100 or more lines) we cannot tell why it failed.

The full log file: 2024/04/09 01:01:47 akmods: Building RPM using the command '/usr/sbin/akmodsbuil - Pastebin.com

We also should verify that the signing key was properly imported to bios which can be done with
mokutil --list-enrolled | grep Issuer then look to see if your key was properly imported.

mokutil --list-enrolled | grep Issuer isn’t returning anything, but dropping the grep and running mokutil --list-enrolled is showing all of the keys I’ve enrolled.

How many keys have you created? Most users only need one for the current machine and the others would then be obsolete and take up space.

You said it shows the keys you created. The first key displayed should begin something like this, which is the official key that supports secure boot on fedora systems.

$ mokutil --list-enrolled
[key 1]
SHA1 Fingerprint: 2b:b0:10:e2:4d:94:c6:32:24:58:89:ba:aa:9e:d0:f3:d5:ef:1f:68
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number:
            22:39:af:04:13:0c:44:44:b3:f3:77:ed:be:1a:f7:86
        Signature Algorithm: sha256WithRSAEncryption
        Issuer: C=US, ST=Massachusetts, L=Cambridge, O=Red Hat, Inc., OU=Fedora Secure Boot CA 20200709, CN=fedoraca

Note there is a line that begins with Issuer so if the previous command mokutil --list-enrolled | grep Issuer returned nothing I would suspect that there may have been a typo in the command entered. Each key enrolled should return a line with that command.

How many keys have you created? Most users only need one for the current machine and the others would then be obsolete and take up space.

I have over 10, primarily due to distro-hopping and a few failed attempts at installing these drivers. There’s no reliance on these now I’ve settled on Fedora (pending Nvidia drivers), I can clear these out.

Note there is a line that begins with Issuer so if the previous command mokutil --list-enrolled | grep Issuer returned nothing I would suspect that there may have been a typo in the command entered. Each key enrolled should return a line with that command.

I suspect there’s an issue here. mokutil --list-enrolled | grep Issuer returns nothing for me, mokutil --list-enrolled returns the keys, but the format looks different to your example. It looks like a hash identifier of the key as well as the hostname of the system.

Just to confirm, Secure Boot is enabled.

user@fedora:~$ mokutil --sb-state
SecureBoot enabled

Then listing the enrolled keys.

user@fedora:~$ mokutil --list-enrolled
29f84d580c fedoraca
.. plus others

I just installed the nvidia drivers on my f40 test bed and this is what I now have there

$ dnf list installed \*nvidia\*
Installed Packages
akmod-nvidia.x86_64                                           3:550.67-1.fc40                       @rpmfusion-nonfree-nvidia-driver
kmod-nvidia-6.8.4-300.fc40.x86_64.x86_64                      3:550.67-1.fc40                       @@commandline                   
nvidia-gpu-firmware.noarch                                    20240312-1.fc40                       @fedora                         
nvidia-modprobe.x86_64                                        3:550.67-1.fc40                       @rpmfusion-nonfree-nvidia-driver
nvidia-settings.x86_64                                        3:550.67-1.fc40                       @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia.x86_64                                    3:550.67-1.fc40                       @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda-libs.x86_64                          3:550.67-1.fc40                       @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-kmodsrc.x86_64                            3:550.67-1.fc40                       @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-libs.i686                                 3:550.67-1.fc40                       @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-libs.x86_64                               3:550.67-1.fc40                       @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-power.x86_64                              3:550.67-1.fc40                       @rpmfusion-nonfree-nvidia-driver

For me it properly installed and created the kmod-nvidia package properly.

Maybe you should try removing the nvidia packages then reinstalling them.

  1. sudo dnf remove \*nvidia\* --exclude nvidia-gpu-firmware
  2. sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda
  3. Wait at least 5 minutes after step 2 completes then reboot.

I see this in the first 25 lines of that error log, so something is definitely corrupt in what was downloaded and used for the build.

2024/04/09 01:01:47 akmods: Building RPM using the command '/usr/sbin/akmodsbuild --kernels 6.8.4-300.fc40.x86_64 /usr/src/akmods/nvidia-kmod.latest'
/tmp/akmodsbuild.H5lGJUoU/BUILD/nvidia-kmod-550.67/_kmod_build_6.8.4-300.fc40.x86_64/nvidia/nv-ibmnpu.c:399:6: warning: no previous prototype for ‘nv_destroy_ibmnpu_info’ [-Wmissing-prototypes]
  399 | void nv_destroy_ibmnpu_info(nv_state_t *nv)
      |      ^~~~~~~~~~~~~~~~~~~~~~
/tmp/akmodsbuild.H5lGJUoU/BUILD/nvidia-kmod-550.67/_kmod_build_6.8.4-300.fc40.x86_64/nvidia/nv-ibmnpu.c:403:5: warning: no previous prototype for ‘nv_init_ibmnpu_devices’ [-Wmissing-prototypes]
  403 | int nv_init_ibmnpu_devices(nv_state_t *nv)
      |     ^~~~~~~~~~~~~~~~~~~~~~
/tmp/akmodsbuild.H5lGJUoU/BUILD/nvidia-kmod-550.67/_kmod_build_6.8.4-300.fc40.x86_64/nvidia/nv-ibmnpu.c:408:6: warning: no previous prototype for ‘nv_unregister_ibmnpu_devices’ [-Wmissing-prototypes]
  408 | void nv_unregister_ibmnpu_devices(nv_state_t *nv)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/akmodsbuild.H5lGJUoU/BUILD/nvidia-kmod-550.67/_kmod_build_6.8.4-300.fc40.x86_64/nvidia/nv-ibmnpu.c:428:5: warning: no previous prototype for ‘nv_get_ibmnpu_chip_id’ [-Wmissing-prototypes]
  428 | int nv_get_ibmnpu_chip_id(nv_state_t *nv)
      |     ^~~~~~~~~~~~~~~~~~~~~
/tmp/akmodsbuild.H5lGJUoU/BUILD/nvidia-kmod-550.67/_kmod_build_6.8.4-300.fc40.x86_64/nvidia/nv-ibmnpu.c:437:6: warning: no previous prototype for ‘nv_ibmnpu_cache_flush_numa_region’ [-Wmissing-prototypes]
  437 | void nv_ibmnpu_cache_flush_numa_region(nv_state_t *nv)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/akmodsbuild.H5lGJUoU/BUILD/nvidia-kmod-550.67/_kmod_build_6.8.4-300.fc40.x86_64/nvidia/nv.c:1236:23: warning: no previous prototype for ‘nv_get_num_dpaux_instances’ [-Wmissing-prototypes]
 1236 | NV_STATUS NV_API_CALL nv_get_num_dpaux_instances(nv_state_t *nv, NvU32 *num_instances)
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/akmodsbuild.H5lGJUoU/BUILD/nvidia-kmod-550.67/_kmod_build_6.8.4-300.fc40.x86_64/nvidia/nv-dma.c:293:6: warning: no previous prototype for ‘nv_load_dma_map_scatterlist’ [-Wmissing-prototypes]
  293 | void nv_load_dma_map_scatterlist(
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/akmodsbuild.H5lGJUoU/BUILD/nvidia-kmod-550.67/_kmod_build_6.8.4-300.fc40.x86_64/nvidia/nv-dma.c:489:23: warning: no previous prototype for ‘nv_dma_unmap_sgt’ [-Wmissing-prototypes]
  489 | NV_STATUS NV_API_CALL nv_dma_unmap_sgt(
      |                       ^~~~~~~~~~~~~~~~
/tmp/akmodsbuild.H5lGJUoU/BUILD/nvidia-kmod-550.67/_kmod_build_6.8.4-300.fc40.x86_64/nvidia/nv-caps.c:270:5: warning: no previous prototype for ‘nv_cap_procfs_init’ [-Wmissing-prototypes]
  270 | int nv_cap_procfs_init(void)
      |     ^~~~~~~~~~~~~~~~~~
make[2]: *** [/usr/src/kernels/6.8.4-300.fc40.x86_64/Makefile:1939: /tmp/akmodsbuild.H5lGJUoU/BUILD/nvidia-kmod-550.67/_kmod_build_6.8.4-300.fc40.x86_64] Error 2
make[1]: *** [Makefile:252: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/kernels/6.8.4-300.fc40.x86_64'
make: *** [Makefile:85: modules] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.GY8lsg (%build)
 
RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.GY8lsg (%build)

Thanks for doing that test.

I ran the following commands, then waited 10 minutes prior to rebooting:

sudo dnf remove \*nvidia\* --exclude nvidia-gpu-firmware

sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda

Unfortunately, no luck. The same issue issue when booting back up. Nvidia kernel module missing, falling back to nouveau

Log files again for completeness: 2024/04/09 16:12:05 akmods: Building RPM using the command '/usr/sbin/akmodsbuil - Pastebin.com

$ dnf list installed \*nvidia\*
Installed Packages
akmod-nvidia.x86_64                      3:550.67-1.fc40      @rpmfusion-nonfree
nvidia-gpu-firmware.noarch               20240312-1.fc40      @updates-testing  
nvidia-modprobe.x86_64                   3:550.67-1.fc40      @rpmfusion-nonfree
nvidia-persistenced.x86_64               3:550.67-1.fc40      @rpmfusion-nonfree
nvidia-settings.x86_64                   3:550.67-1.fc40      @rpmfusion-nonfree
xorg-x11-drv-nvidia.x86_64               3:550.67-1.fc40      @rpmfusion-nonfree
xorg-x11-drv-nvidia-cuda.x86_64          3:550.67-1.fc40      @rpmfusion-nonfree
xorg-x11-drv-nvidia-cuda-libs.x86_64     3:550.67-1.fc40      @rpmfusion-nonfree
xorg-x11-drv-nvidia-kmodsrc.x86_64       3:550.67-1.fc40      @rpmfusion-nonfree
xorg-x11-drv-nvidia-libs.x86_64          3:550.67-1.fc40      @rpmfusion-nonfree
xorg-x11-drv-nvidia-power.x86_64         3:550.67-1.fc40      @rpmfusion-nonfree

What kernels do you have installed?
dnf list installed kernel will answer that.

If you have the older 6.7.11 kernel the driver can be built for that kernel version and you can then run that kernel to have the nvidia drivers available.

I have seen several similar reports related to the 6.8.4 kernel, though it does not happen for me on my test bed. I would hate to install f40 bare bones on my main workstation and see this happen.

My main workstation is running f39 with the 6.8.4 kernel and has no issues with the nvidia driver.

$ dnf list installed *nvidia*
Installed Packages
akmod-nvidia.x86_64                                            3:550.67-1.fc39                      @rpmfusion-nonfree-nvidia-driver
kmod-nvidia-6.7.10-200.fc39.x86_64.x86_64                      3:550.67-1.fc39                      @@commandline                   
kmod-nvidia-6.7.11-200.fc39.x86_64.x86_64                      3:550.67-1.fc39                      @@commandline                   
kmod-nvidia-6.8.4-200.fc39.x86_64.x86_64                       3:550.67-1.fc39                      @@commandline                   
nvidia-gpu-firmware.noarch                                     20240312-1.fc39                      @updates                        
nvidia-modprobe.x86_64                                         3:550.67-1.fc39                      @rpmfusion-nonfree-nvidia-driver
nvidia-persistenced.x86_64                                     3:550.67-1.fc39                      @rpmfusion-nonfree-nvidia-driver
nvidia-settings.x86_64                                         3:550.67-1.fc39                      @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia.x86_64                                     3:550.67-1.fc39                      @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda.x86_64                                3:550.67-1.fc39                      @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda-libs.i686                             3:550.67-1.fc39                      @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda-libs.x86_64                           3:550.67-1.fc39                      @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-kmodsrc.x86_64                             3:550.67-1.fc39                      @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-libs.i686                                  3:550.67-1.fc39                      @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-libs.x86_64                                3:550.67-1.fc39                      @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-power.x86_64                               3:550.67-1.fc39                      @rpmfusion-nonfree-nvidia-driver



$ uname -r
6.8.4-200.fc39.x86_64

I’m running 6.8.4 - nothing prior to 6.8.0 installed.

$ dnf list installed kernel
Installed Packages
kernel.x86_64                6.8.0-0.rc6.49.fc40                @anaconda       
kernel.x86_64                6.8.4-300.fc40                     @updates-testing
$ uname -r
6.8.4-300.fc40.x86_64

You are running fc40, but your post is labelled #f39. Please show us ls -l /usr/src/akmods and dnf info --releasever=40 info akmod-nvidia xorg-x11-drv-nvidia --nogpgcheck.

You are running fc40, but your post is labelled #f39.

I didn’t initially notice this when the tags were generated, however the issue does also occur for me on F39. Thanks for pointing it out.

An update… this is very strange, the modules are now compiled.

$ modinfo -F version nvidia
550.67

I had an issue with my machine failing to post after a Windows update. I power cycled my PC which triggered me having to re-run the BIOS setup. I did that, booted into Fedora and noticed it was taking a while to get past the boot screen (which now makes sense…).

After another reboot, there was no fallback to nouveau. I ran nvidia-smi which to my surprise, produced an output.

My BIOS settings are intact (Secure Boot and such) - I’m at a lost as to what could have been the trigger for the modules to finally compile. I’ve tried this many times, with many reboots.

1 Like

It is important to remember that the nvidia drivers are locally compiled on your system. That means that ANY interruption immediately after a kernel or driver update may interfere with the proper construction of the drivers.

Whether that interruption is manually or automatically generated by software does not matter.
This link refers and also provides a recovery method.

This could be a MS screwup, but in that case there should be many reports on Windows forums that can be found using the update details.

It can also be a “pre-fail” symptom from hardware nearing death – maybe just a bad CMOS backup coin battery, but could be many things. Review your recovery planning.

Appreciate that link and the support you’ve offered in this thread, thank you.

Are you aware of anything within BIOS that could cause an issue with modules being built during boot? Each time I’ve tried to install these drivers previously, it’s been on a fresh install of Fedora with no other third party packages installed.

It seems too coincidental to me that the modules would finally build after I run the setup process again in my BIOS. I’ll do some testing around this either way!

It can also be a “pre-fail” symptom from hardware nearing death – maybe just a bad CMOS backup coin battery, but could be many things. Review your recovery planning.

Absolutely, I’ll be keeping an eye on this - thank you.

:after mok utils key and setting up key try this after, sudo dnf install kernel-headers kernel-devel dkms

then- sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda

you could wait a little bit, thats a fancy brand new card, I just got fed up with a nvidia 3060, fancy 16 times supported with all the so called blinky lights and sounds and threw it right back in the box after a month and bought a radeon 6600. At least it just works very well and when booting into the proxmox (debian)that works . I figured out later that my motherboard boots to an automatic mode for an onboard graphics, supposively when you plug in the dedicated GPU card it is suppose to work set or not. Then when i set it to dedicated mode PCI something the radeon started be finally to run steam.
With the nvidia card whenever there was a new kernel the bios screen would lock up and would have to hold the power off button like a 6 year old, turn it back on it was ok. Im sure it was because did not turn off automatic GPU bios mode. I’m through with the nvidia card, maybe if the machine is a dedicated Fedora system with One M.2 and only then my MOBO config will also support the 16 times feature.

An update on this after some more testing.

I decided to flash my BIOS to the latest version, which cleared my enrolment keys (not an issue for me) and try again on both F39 and 40.

Going back through the key enrolment process and installing the Nvidia drivers, in the exact same way as mentioned in the thread, worked perfectly on F39. Great stuff.

For F40 beta, I’m looking for some guidance as it hasn’t been as straight forward and I believe it’s due to kernel versions.

If I’m using the 6.8.5-301 kernel, the steps work and modinfo -F version nvidia will display the driver version. That’s great too, but using this kernel results in only one monitor being usable and a change to my resolution. Presumably I need to do something here to force Fedora to use my graphics card?

Kernels 6.8.6-300 and 6.8.0-0 both fail to load the Nvidia driver (modinfo also returns an error), but do allow me to fallback to nouveau.