Nvidia kernel module missing, falling back to nouveau” after 6.1.x kernel updates

I updated my kernel to 6.1.9-200

but throughout the update process I was forced to logout of my current desktop session and couldn’t log back in

for reference, I was faced with this error
Unable to download updates: Cannot download Packages/k/kernel-devel- matched-6,1.8-200.fc37.x86_64.rpm: All mirrors were tried; Last error: Status code: 404

when trying to update from the software centre

so I tried performing the upgrade from the terminal instead.

in the end, I faced the error message that forced me to logout.

I rebooted the system to see this messageNvidia kernel module missing, falling back to nouveau

I was able to login and all that but the GPU driver now is the mesa one.

Checked the software centre and I saw that the driver is installed indeed.

but when I run modinfo -F version nvidia

I get
modinfo: ERROR: Module nvidia not found.

so now I don’t know what to do.

things I thought I could mention that might be important somehow

last time I faced this error message was when I enabled secureboot on my machine since I’m also running windows 11 “dual booted with my fedora”

I followed thishttps://rpmfusion.org/Howto/Secure%20Boot

and was able to get the drivers back and all was good

I don’t know if I should do it again upon every kernel update

It likely failed to build the nvidia kernel module for the 6.1.9 kernel.

You should be able to boot an older kernel. From there you can run sudo dnf distro-sync and sudo dnf reinstall kernel\*

Nothing about kernel version … Fedora follows Red Hat about Nvidia closed source propriety software, stay with Nouveau as they work or reinstall with RPM Fusion ressources. The first error message (unable to download …) happens sometimes when mirrors aren’t synchronized for any software update, package manager will try again until success or gives up …

1 Like

didn’t work, unfortunately.
Still on the same state.

I think this might be useful

when I run dnf list installed \*nvidia\*

I get

Installed Packages
akmod-nvidia.x86_64                                         3:525.85.05-1.fc37                    @rpmfusion-nonfree-nvidia-driver
kmod-nvidia-6.0.15-300.fc37.x86_64.x86_64                   3:525.60.11-1.fc37                    @@commandline                   
kmod-nvidia-6.0.18-300.fc37.x86_64.x86_64                   3:525.85.05-1.fc37                    @@commandline                   
kmod-nvidia-6.1.9-200.fc37.x86_64.x86_64                    3:525.85.05-1.fc37                    @@commandline                   
nvidia-gpu-firmware.noarch                                  20230117-146.fc37                     @updates                        
nvidia-settings.x86_64                                      3:525.85.05-1.fc37                    @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia.x86_64                                  3:525.85.05-1.fc37                    @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda-libs.x86_64                        3:525.85.05-1.fc37                    @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-kmodsrc.x86_64                          3:525.85.05-1.fc37                    @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-libs.i686                               3:525.85.05-1.fc37                    @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-libs.x86_64                             3:525.85.05-1.fc37                    @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-power.x86_64                            3:525.85.05-1.fc37                    @rpmfusion-nonfree-nvidia-driver

and when I run

dmesg | grep -iE 'secure|nouveau|nvidia'

I get

[    0.000000] Command line: BOOT_IMAGE=(hd0,gpt2)/vmlinuz-6.1.9-200.fc37.x86_64 root=UUID=0e4bdfd0-8702-4da3-942c-e31180651ed8 ro rootflags=subvol=root rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 initcall_blacklist=simpledrm_platform_driver_init rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 initcall_blacklist=simpledrm_platform_driver_init
[    0.000000] secureboot: Secure boot enabled
[    0.000000] Kernel is locked down from EFI Secure Boot mode; see man kernel_lockdown.7
[    0.013362] secureboot: Secure boot enabled
[    0.061406] Kernel command line: BOOT_IMAGE=(hd0,gpt2)/vmlinuz-6.1.9-200.fc37.x86_64 root=UUID=0e4bdfd0-8702-4da3-942c-e31180651ed8 ro rootflags=subvol=root rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 initcall_blacklist=simpledrm_platform_driver_init rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 initcall_blacklist=simpledrm_platform_driver_init
[    1.271642] integrity: Loaded X.509 cert 'Fedora Secure Boot CA: fde32599c2d61db1bf5807335d7b20e4cd963b42'
[    6.335370] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input21
[    6.335473] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input22
[    6.335504] input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input23
[    6.335542] input: HDA NVidia HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input24
[    7.413357] Bluetooth: hci0: Secure boot is enabled
[   53.417196] nouveau: detected PR support, will not use DSM
[   53.417219] nouveau 0000:01:00.0: enabling device (0000 -> 0003)
[   53.417355] nouveau 0000:01:00.0: NVIDIA GA106 (b76000a1)
[   53.524914] nouveau 0000:01:00.0: bios: version 94.06.36.00.3e
[   53.535107] nouveau 0000:01:00.0: fb: 6144 MiB GDDR6
[   53.540628] nouveau 0000:01:00.0: DRM: VRAM: 6144 MiB
[   53.540629] nouveau 0000:01:00.0: DRM: GART: 536870912 MiB
[   53.540630] nouveau 0000:01:00.0: DRM: BIT table 'A' not found
[   53.540631] nouveau 0000:01:00.0: DRM: BIT table 'L' not found
[   53.540631] nouveau 0000:01:00.0: DRM: TMDS table version 2.0
[   53.540632] nouveau 0000:01:00.0: DRM: DCB version 4.1
[   53.540632] nouveau 0000:01:00.0: DRM: DCB outp 00: 02813f66 04600020
[   53.540633] nouveau 0000:01:00.0: DRM: DCB outp 01: 04824f72 00020010
[   53.540634] nouveau 0000:01:00.0: DRM: DCB outp 02: 02802f56 04600010
[   53.540635] nouveau 0000:01:00.0: DRM: DCB outp 03: 02802f52 00020010
[   53.540635] nouveau 0000:01:00.0: DRM: DCB conn 02: 00010246
[   53.540636] nouveau 0000:01:00.0: DRM: DCB conn 03: 00020347
[   53.540636] nouveau 0000:01:00.0: DRM: DCB conn 04: 01000461
[   53.540905] nouveau 0000:01:00.0: DRM: MM: using COPY for buffer copies
[   53.850150] snd_hda_intel 0000:01:00.1: bound 0000:01:00.0 (ops nv50_audio_component_bind_ops [nouveau])
[   53.949733] nouveau 0000:01:00.0: DRM: allocated 1920x1080 fb: 0x200000, bo 000000003294cc4a
[   53.950994] nouveau 0000:01:00.0: [drm] fb1: nouveaudrmfb frame buffer device
[   53.951265] [drm] Initialized nouveau 1.3.1 20120801 for 0000:01:00.0 on minor 1

I don’t use secure boot but it looks like you have it enabled. Have you tried to disable secure boot and see if that works.

Many of us cannot use the nouveau drivers since they do not support many of the newer GPUs and also do not support hardware acceleration on the older GPUs.
Please stop with the negative comments.

He has been running with the nvidia drivers and secure boot enabled, so that is not the issue. It seems a problem with the drivers not getting built properly.

Thank you for the info.

I did not see the boot even attempt to load the nvidia drivers, so it seems they may have not been built properly (or the boot was done before they completed.) The output of the dnf list installed command shows the kmod-nvidia package was properly built and installed for the 6.1.9 kernel though, so have you tried another reboot to confirm the problem?

If another reboot still does not load the nvidia modules then the simplest fix may be to simply boot into an older kernel then remove and reinstall the newer kernel which should rebuild the nvidia modules for that kernel.

  1. boot to the older kernel
  2. sudo dnf remove kernel*6.1.9* to remove all the kernel packages of that version and the failed build of the nvidia drivers related.
  3. sudo dnf upgrade --refresh to reinstall the newer kernel.
    Wait at least 5 minutes after the kernel install completes, then reboot

If this sequence does not now load the nvidia modules when you boot please post back the new dmesg output as you previously did so we can check the results.

It is not normally necessary to repeat the steps for creating the secure boot keys for system built modules, but if the second try still fails then we will need to investigate further as to the cause.

You can verify if the key you previously imported into bios is still active with mokutil -l to list all the keys currently enrolled in the bios. man mokutil to see all that it is capable of doing for you.

The nvidia and cuda drivers are installed from rpmfusion using sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda after ensuring that the rpmfusion repos are enabled.

3 Likes

First of all, install dnfdragora and choose all modules for your existing kernel (such as: kernel-core + kernel-cross-headers + kernel-devel + kernel-headers + kernel-modules + kernel-modules-core + kernel-modules-extra + kernel-modules-internal + kernel-tools + kernel-tools-libs), then install all modules for nvidia gpu (akmod-nvidia + kmod-nvidia + nvidia-gpu-firmware + nvidia-modprobe + nvidia-persistenced + nvidia-query-resourse-opengl + nvidia-query-resourse-opengl-lib + nvidia-settings + nvidia-texture-tools + nvidia-texture-tools-devel + nvidia-xconfig + xorg-x11-drv-nvidia + xorg-x11-drv-nvidia-cuda + org-x11-drv-nvidia-cuda-libs - xorg-x11-drv-nvidia-devel + xorg-x11-drv-nvidia-kmodsrc + xorg-x11-drv-nvidia-libs + xorg-x11-drv-nvidia-power). Then, type ‘nvidia-xconfig’ in terminal, and reboot.

-disable secureboot or read up at rpmfusion about secureboot and nvidia

-look if latest kernel kmod-nvidia is there → sudo dnf list kmod-*

-if latest kernel kmod-nvidia is present, remove it → sudo dnf remove kmod-nvidia-[latest-version]

-generate new nvidia module → sudo akmods

-‘sudo akmods’ will make a new kmod-nvidia

-optionally: check if module is made → sudo dnf list kmod-*

-reboot

(optionally after boot → sudo dracut -f (for a new initrd to use at startup)

I tried that and it didn’t work

but something has changed

now the output of the dmesg turned out to be too massive I was forced to export the output to a text file that contains 2788 lines

dnf list installed \*nvidia\*

now outputs

Installed Packages
kmod-nvidia-6.0.15-300.fc37.x86_64.x86_64                   3:525.60.11-1.fc37                    @@commandline                   
kmod-nvidia-6.0.18-300.fc37.x86_64.x86_64                   3:525.85.05-1.fc37                    @@commandline                   
nvidia-gpu-firmware.noarch                                  20230117-146.fc37                     @updates                        
nvidia-settings.x86_64                                      3:525.85.05-1.fc37                    @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia.x86_64                                  3:525.85.05-1.fc37                    @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda-libs.x86_64                        3:525.85.05-1.fc37                    @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-libs.i686                               3:525.85.05-1.fc37                    @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-libs.x86_64                             3:525.85.05-1.fc37                    @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-power.x86_64                            3:525.85.05-1.fc37                    @rpmfusion-nonfree-nvidia-driver

other outputs seem the same

EDIT:

I somehow lost the directory

/usr/share/doc/akmods/

where I can find the README.secureboot

It seems that almost everything is there, but you really do need to install at least one additional package. I am not sure how you got what is there but running
sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda should finish the install properly and build the module for the newest kernel. I don’t see either of those in the list of packages installed and the kmod-nvidia-6.1.9-200.fc37.x86_64.x86_64 package is missing which shows that either the latest kernel is not installed or the drivers for that kernel were not built. Without the akmod-nvidia package the system will not build those drivers, and if you had run the command as I just suggested all the appropriate dependent packages you already have would have been pulled in.

You lost the /usr/share/doc/akmods directory by somehow removing the akmods package which would have also removed the akmod-nvidia package. In post 4 above the akmod-nvidia package showed as installed. Installing the akmod-nvidia package will reinstall the akmods package.

]# dnf provides /usr/share/doc/akmods/
Last metadata expiration check: 2:27:54 ago on Wed 08 Feb 2023 06:35:12 AM CST.
akmods-0.5.7-9.fc37.noarch : Automatic kmods build and install tool
Repo        : @System
Matched from:
Other       : /usr/share/doc/akmods/

akmods-0.5.7-9.fc37.noarch : Automatic kmods build and install tool
Repo        : fedora
Matched from:
Other       : /usr/share/doc/akmods/
2 Likes

all done

I’m back to my nvidia drivers now

Thank you so much

one thing though

can you add the last step of installing the nvidia kmods to the reply I marked as a solution so that if others faced the same problem they can access the solution easily

Thanks in advance

1 Like

Done…

1 Like

I ran into the same error message after an upgrade to Fedora 40 Beta from 39! Without booting to an older kernel, your solution worked for me, thank you!

My guess is that the upgrade procedure didn’t wait for the kernel modules to build before rebooting my system.

Thanks to everyone who contributed to this thread!

There is a topic in the “common issues” category about this. System upgrades occasionally do fail to allow time for the nvidia drivers to be properly built before the final reboot so it does happen.