I have been using linux for a while and recently decided to give fedora a try. I love it, aside from the difficulties I have experienced getting NVIDIA drivers installed. After the installation of all the correct packages, I try to boot and get the output: “NVIDIA kernel module not found. Falling back to nouveau.” I have scrolled through several other discussions and have confirmed that: 1. The OS recognizes my card. and 2. that I do have the correct drivers installed.
akmods and dracut output this:
josiahrabe@fedora:~$ sudo akmods --force && sudo dracut --force
[sudo] password for josiahrabe:
Checking kmods exist for 6.8.5-301.fc40.x86_64 [ OK ]
Files needed for building modules against kernel
6.8.5-301.fc40.x86_64 could not be found as the following
directories are missing:
/usr/src/kernels/6.8.5-301.fc40.x86_64/
/lib/modules/6.8.5-301.fc40.x86_64/build/Is the correct kernel-devel package installed? [FAILED]
Checking kmods exist for 6.10.3-200.fc40.x86_64 [ OK ]
I see the two missing directories, and I’m fairly certian that’s all that need to be addressed.
If you disable the nvidia fallback service you can then manually modprobe nvidia and see the exact error message. (I am not in front of a fedora system to give you exact commands. Let me know if need them and I will provide tomorrow.)
You seem to be installing kernels that are newer than the released version. (6.10.4)
Which often is an issue since frequently not all the packages to support the test kernels and build the akmods modules are available.
Please show the output of uname -a and dnf list installed kernel* as well as dnf repolist
Please remove or disable that obsolete repo since it does not apply to fedora 40 in any way. sudo dnf config-manager --disable cuda-fedora35-x86_64
The packages kernel-headers, kernel-modules and kernel-modules-extra are not installed for kernel 6.10.3 so that may be the reason for the drivers not being used (maybe not compiled properly). It certainly could explain the nouveau driver not being available for the 6.10.3 kernel.
I suggest that you run sudo dnf upgrade kernel* to get everything into sync (the kernel 6.10.4 is now available as well).
The biggest problem with NVidia are the many different solutions to the Problem, but you cant mix them.
Please remove every NVidia driver first: sudo dnf erase '*nvidia*'
and then only use the RPMFuision Repos and drivers.
sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sudo dnf update -y # and reboot if you are not on the latest kernel
sudo dnf install akmod-nvidia # rhel/centos users can use kmod-nvidia instead
sudo dnf install xorg-x11-drv-nvidia-cuda #optional for cuda/nvdec/nvenc support
Your suggestions seem very complete except for that command.
As written it will also remove the nvidia-gpu-firmware package which is required for many GPUs.
Changing that to sudo dnf remove \*nvidia\* --exclude nvidia-gpu-firmware will avoid that issue.
If already removed then reinstall it with sudo dnf install nvidia-gpu-firmware
Alright, so after following your instructions, I have the drivers installed and working, but I have a slight issue. I power on, enter my encryption password, and the system boots. Gdm displays and I try to log in, but as soon as it tries to start gnome, my screen blacks out. I can access other tty’s when sitting in gdm on tty1, but not after gnome tries to start. Any ideas?
Now we need to know the status of both the kernel and the nvidia drivers.
Please post the output of dnf list installed kernel* and dnf list installed \*nvidia\* as well as inxi -Fzxx