20+ year Linux user but new to Fedora & dnf. (Ubuntu + Debian in recent years)
I recently set up a new “gaming” laptop running Fedora 40 with NVIDIA drivers (560.35.03) & CUDA installed. (I don’t game. It’s for ML.) Everything is fine.
I just set up a new desktop on Fedora 41 and things initially seemed fine. I was able to RDP into Gnome. But when I tried installing the NVIDIA drivers with
sudo dnf update
# reboot
sudo dnf install akmod-nvidia
sudo dnf install xorg-x11-drv-nvidia-cuda
nvidia apparently never built (despite me waiting quite a while):
james@mach:~$ modinfo -F version nvidia
modinfo: ERROR: Module nvidia not found.
I rebooted and saw the same. I also removed and re-installed them.
I then tried force-rebuilding, but that failed with an error message about my kernel:
james@mach:~$ sudo akmods --rebuild --force
Checking kmods exist for 6.11.4-301.fc41.x86_64 [ OK ]
Files needed for building modules against kernel
6.11.4-301.fc41.x86_64 could not be found as the following
directories are missing:
/usr/src/kernels/6.11.4-301.fc41.x86_64/
/lib/modules/6.11.4-301.fc41.x86_64/build/Is the correct ke[FAILED]el package installed?
Something seems messed up with my kernel versions. Here’s what I’m seeing:
james@mach:~$ sudo ls /usr/src/kernels/
6.11.7-300.fc41.x86_64
james@mach:~$ uname -r
6.11.4-301.fc41.x86_64
james@mach:~$ rpm -qa kernel
kernel-6.11.4-301.fc41.x86_64
kernel-6.11.7-300.fc41.x86_64
On my laptop, I see three sets of kernel packages (but with just one headers package). I’m NOT seeing that on the desktop:
james@mach:~$ sudo dnf list --installed | grep kernel
abrt-addon-kerneloops.x86_64 2.17.6-2.fc41 anaconda
kernel.x86_64 6.11.4-301.fc41 anaconda
kernel.x86_64 6.11.7-300.fc41 updates
kernel-core.x86_64 6.11.4-301.fc41 anaconda
kernel-core.x86_64 6.11.7-300.fc41 updates
kernel-devel.x86_64 6.11.7-300.fc41 updates
kernel-devel-matched.x86_64 6.11.7-300.fc41 updates
kernel-headers.x86_64 6.11.3-300.fc41 fedora
kernel-modules.x86_64 6.11.4-301.fc41 anaconda
kernel-modules.x86_64 6.11.7-300.fc41 updates
kernel-modules-core.x86_64 6.11.4-301.fc41 anaconda
kernel-modules-core.x86_64 6.11.7-300.fc41 updates
kernel-modules-extra.x86_64 6.11.4-301.fc41 anaconda
kernel-modules-extra.x86_64 6.11.7-300.fc41 updates
kernel-srpm-macros.noarch 1.0-24.fc41 fedora
kernel-tools.x86_64 6.11.7-300.fc41 updates
kernel-tools-libs.x86_64 6.11.7-300.fc41 updates
libreport-plugin-kerneloops.x86_64 2.17.15-3.fc41 anaconda
The kernel-headers
version doesn’t match EITHER of my two installed kernel versions!
This seems messed up, but I’m unsure why/how it might have happened and how I can fix it.
Thank you in advance for any thoughts you might share with this Fedora noob!