I made a terrible mistake a few days ago and ran a dangerous bit of code…
$ sudo yum update -y
which broke my Nvidia drivers.
I tried a few things but couldn’t get them back, so I resorted to reinstalling Fedora.
I’d appreciate any tips or advice, here’s what I’ve been trying so far.
Secure boot is off, no dual-booting.
$ mokutil --sb-state
SecureBoot disabled
Platform is in Setup Mode
Starting with a fresh install of F41, I add rpmfusion free and nonfree repos, then run
sudo yum update -y
sudo yum upgrade --refresh -y
reboot
Run both commands again to make double triple sure everything’s up to date.
$ uname -r
6.12.4-200.fc41.x86_64
$ lspci | grep -i vga
00:02.0 VGA compatible controller: Intel Corporation Raptor Lake-S GT1 [UHD Graphics 770] (rev 04)
01:00.0 VGA compatible controller: NVIDIA Corporation AD102 [GeForce RTX 4090] (rev a1)
The 4090 is our quarry.
Following the official instructions from Howto/NVIDIA - RPM Fusion, I then run
$ sudo yum install akmod-nvidia xorg-x11-drv-nvidia-cuda
Wait 10 minutes (recommended is 5), then reboot. No dice.
$ modinfo -F version nvidia
modinfo: ERROR: Module nvidia not found.
Let’s make sure everything is installed and check the version.
$ yum list --installed | grep nvidia
akmod-nvidia.x86_64 3:565.77-1.fc41 rpmfusion-nonfree-updates
nvidia-gpu-firmware.noarch 20241210-1.fc41 updates
nvidia-modprobe.x86_64 3:565.77-1.fc41 rpmfusion-nonfree-updates
nvidia-persistenced.x86_64 3:565.77-1.fc41 rpmfusion-nonfree-updates
nvidia-settings.x86_64 3:565.77-1.fc41 rpmfusion-nonfree-updates
xorg-x11-drv-nvidia.x86_64 3:565.77-3.fc41 rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-cuda.x86_64 3:565.77-3.fc41 rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-cuda-libs.x86_64 3:565.77-3.fc41 rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-kmodsrc.x86_64 3:565.77-3.fc41 rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-libs.x86_64 3:565.77-3.fc41 rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-power.x86_64 3:565.77-3.fc41 rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-xorg-libs.x86_64 3:565.77-3.fc41 rpmfusion-nonfree-updates
Then I run akmods a lot, with and without the arguments.
$ sudo akmods
$ sudo akmods --force --rebuild
$ sudo akmods --force --rebuild --kernel 6.12.4-200.fc41.x86_64
Checking kmods exist for 6.12.4-200.fc41.x86_64 [ OK ]
Building and installing nvidia-kmod [FAILED]
Building rpms failed; see /var/cache/akmods/nvidia/565.77-1-for-6.12.4-200.fc41.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.
This always returns this same error, or occasionally crashes my computer.
The last 100 lines of the log make my post too big so I’ll try to add it as a comment.
There are entries like
2024/12/18 12:37:07 akmodsbuild: make[1]: *** [Makefile:236: __sub-make] Error 2
2024/12/18 12:37:07 akmodsbuild: make: *** [Makefile:115: modules] Error 2
Which as far as I can tell from researching is an issue with compiling, but I haven’t been able to find any fix or troubleshooting steps. I mostly don’t know what I’m looking at with the log, so if you see something there please let me know.
More troubleshooting…
$ sudo yum remove akmod-nvidia xorg-x11-drv-nvidia-cuda
$ sudo yum install akmod-nvidia xorg-x11-drv-nvidia-cuda
Make some coffee, mow the cat, pet the lawn, reboot. No change.
From checking other forum posts I’ve combined everything recommended to be installed together with this command:
$ sudo yum install gcc make dkms acpid libglvnd-glx libglvnd-opengl libglvnd-devel kernel-headers kernel-devel akmod-nvidia xorg-x11-drv-nvidia xorg-x11-drv-nvidia-libs xorg-x11-drv-nvidia-libs.i686 xorg-x11-drv-nvidia-cuda
Sometimes I try this command instead of just $ sudo yum install akmod-nvidia xorg-x11-drv-nvidia-cuda
but the results are the same.
Using the test repos was recommended in another thread as well:
$ sudo yum upgrade --enablerepo=*test* *nvidia*
Yesterday, this made a difference by installing some different files, although the result of
$ sudo akmods
was the same. Today, it looks like it doesn’t update any files but still, same result.
I’ve tried all the above steps along with variations many times over a few dozen reinstalls. I’ve also tried all the steps after downgrading to F40.
At some point for a laugh, I enabled Secure Boot and followed these steps to the letter: GitHub - roworu/nvidia-fedora-secureboot
Same sort of errors, so I disabled Secure Boot again and continued trying the above.
Double-triple-quadruple checking that everything is up-to-date:
$ sudo yum upgrade --refresh --best akmod-nvidia
Updating and loading repositories:
Fedora 41 openh264 (From Cisco) - x86_64 100% | 3.0 KiB/s | 989.0 B | 00m00s
RPM Fusion for Fedora 41 - Nonfree - Updates 100% | 47.7 KiB/s | 6.9 KiB | 00m00s
RPM Fusion for Fedora 41 - Nonfree 100% | 16.2 KiB/s | 6.8 KiB | 00m00s
Fedora 41 - x86_64 - Updates 100% | 174.1 KiB/s | 30.6 KiB | 00m00s
Fedora 41 - x86_64 100% | 179.0 KiB/s | 31.3 KiB | 00m00s
RPM Fusion for Fedora 41 - Free - Updates 100% | 8.8 KiB/s | 3.9 KiB | 00m00s
RPM Fusion for Fedora 41 - Free 100% | 8.2 KiB/s | 3.6 KiB | 00m00s
Repositories loaded.
Nothing to do.
I probably did a lot of unnecessary things trying to get this to work, but I’d appreciate any suggestions. Thank you!