(Fedora 40) "Nvidia kernel module missing, falling back to nouveau"

I used sudo dnf install akmod-nvidia and xorg-x11-drv-nvidia-cuda to install the drivers but they stll wotn work! ive even waited for 5 minutes for the initram to build but it still gives the same error every time i boot! what should i do?

lspci | grep VGA:
''0000:00:02.0 VGA compatible controller: Intel Corporation TigerLake-H GT1 [UHD Graphics] (rev 01)
0000:01:00.0 VGA compatible controller: NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] (rev a1)

Sudo dnf list */nvidia
Última comprobación de caducidad de metadatos hecha hace 0:11:17, el Thu 09 May 2024 08:02:15 AM EDT.
Paquetes instalados
kernel-devel.x86_64 6.8.8-300.fc40
kernel-modules-core.x86_64 6.8.5-301.fc40
kernel-modules-core.x86_64 6.8.8-300.fc40
kernel-xanmod-edge-modules.x86_64 6.0.8-xm1.0.fc38 @copr:copr.fedorainfracloud.org:rmnscnce:kernel-xanmod
linux-firmware.noarch 20240410-1.fc40
nvidia-gpu-firmware.noarch 20240410-1.fc40
xorg-x11-drv-nvidia.x86_64 3:550.78-1.fc40 rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-power.x86_64 3:550.78-1.fc40 rpmfusion-nonfree-nvidia-driver
Paquetes disponibles
xorg-x11-drv-nvidia-340xx.x86_64 1:340.108-15.fc40 rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-390xx.x86_64 3:390.157-4.fc40 rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-470xx.x86_64 3:470.239.06-1.fc40 rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-470xx.x86_64 3:470.239.06-1.fc40 rpmfusion-nonfree-updates

Is there something i am missing? What can i do? I got nobara linux before this and the drivers worked, and i had fedora on this machine before with the drivers working.

(I have a Nvidia rtx 3060 mobile and an intel core i9 11thgen, My laptop is an asus zypherus m16)

Ive also tried to use sudo akmod --force sudo dracut --force

It just gave me this
sudo akmods --force
sudo dracut --force
Checking kmods exist for 6.0.8-xm1.0.fc38.x86_64 [ OK ]
Files needed for building modules against kernel
6.0.8-xm1.0.fc38.x86_64 could not be found as the following
directories are missing:
/lib/modules/6.0.8-xm1.0.fc38.x86_64/build/Is the correct k[FALLÓ]evel package installed?

might be that you have secure boot enabled here is the guide and steps to sign the keys to secure boot

This isn’t a valid command, and doesn’t match the text that follows. You may find Linux Command useful when you need to use command-line tools.

Did you manually copy text into your post? You seem to be missing several nvidia packages that should have been installed from rpmfusion.

Please try running dnf list --installed *nvidia* (sudo is not needed) in a terminal.

Note: Please copy/paste text from the terminal into the forum text entry box as pre-formatted text using the </> button from the line at the top of the text-entry box.

ive already turned off secure boot from y bios

akmod-nvidia.x86_64                               3:550.78-1.fc40               @rpmfusion-nonfree-nvidia-driver
nvidia-gpu-firmware.noarch                        20240410-1.fc40               @updates                        
nvidia-modprobe.x86_64                            3:550.78-1.fc40               @rpmfusion-nonfree-nvidia-driver
nvidia-persistenced.x86_64                        3:550.78-1.fc40               @rpmfusion-nonfree-nvidia-driver
nvidia-settings.x86_64                            3:550.78-1.fc40               @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia.x86_64                        3:550.78-1.fc40               @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda.x86_64                   3:550.78-1.fc40               @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda-libs.i686                3:550.78-1.fc40               @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda-libs.x86_64              3:550.78-1.fc40               @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-kmodsrc.x86_64                3:550.78-1.fc40               @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-libs.i686                     3:550.78-1.fc40               @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-libs.x86_64                   3:550.78-1.fc40               @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-power.x86_64                  3:550.78-1.fc40               @rpmfusion-nonfree-nvidia-driver

:thinking: Which Kernel are you booted into?

kernel-xanmod-edge-modules.x86_64 6.0.8-xm1.0.fc38 or

kernel-modules-core.x86_64 6.8.5-301.fc40
kernel-modules-core.x86_64 6.8.8-300.fc40

Please post uname -r here


Can you boot into kernel kernel 6.8.8-300.fc40 Things should work then.

As the message from your other post above says, it cant build the module because it doesn’t have the files to do so.

Unless you need that weird 6.0.8-xm1.0.fc38.x86_64 kernel, whatever that is, if you do get booted to the 6.8.8 kernel and get the nvidia working, I’d also suggest you dnf remove that old kernel from fc38 so it doesn’t accidentally get booted later.

i cant figure out how to remove it!

I didn’t ask you to remove it yet, I simply asked you to shutdown the computer, and from the Grub Menu choose the 6.8.8 kernel. So you can boot into the right kernel.

We can remove the other kernel later. That’s not big deal.

ok so i finally did it and that fixed everything! thank you so much for your help! you are like a guardian angel!

1 Like

Here’s the thing, I’m not sure why you had a different kernel, but if you don’t need it you can remove it. I think from the menu the only kernel you will have is the 6.8.8 so until the next kernel release you should be ok with this.

Right now this is the current kernel. Please make sure if everything is working. Post back if you have any issues.

so how do i set the 6.8.8 kernal as the main one? and not use the xanmod kernal?

1 Like

sudo grubby --info=ALL | grep -i 'index\|title'


sudo grubby --set-default-index 0

Where 0 is the Index number of the kernel you want to make the default.

small guide for reference here :

Hello, we have to sign module with mokutil ourselves for secure boot, this link has worked perfectly for me setting up Nvidia under secure boot. I think it will help you as well:

Sorry but his is unrelated, and somewhat suspicious.

This Thread already has a solution.

Yes, I saw that op disabled secure, but I’d try enabling it and retrying with the guide :slight_smile:

:thinking: We have guides here for that.