Can't load kernel module after installation with dnf

Hi,
I’ve installed this kernel module following the instructions in the README. However, when I run sudo modprobe nct6687 I get the following error:

modprobe: FATAL: Module nct6687 not found in directory /lib/modules/6.8.5-301.fc40.x86_64

I’ve tried reinstalling (also from a copr), rebooting, disabling secure boot, running depmod -a … to no avail.

Would be grateful if someone could help, thank you!

Your error message tells us the module was built for the 6.8.5 kernel but that kernel is probably not installed.
Rebuild the module for the currently running kernel.

Thanks for the reply.
That kernel version is the one I am running. I also followed the steps in the README on this kernel. I installed Fedora freshly a couple of hours ago.

In that case you would need to install the kernel-devel and/or the kernel-modules package for the 6.8.5 kernel

Additionally you should be aware that the current kernel version for f40 is 6.8.8 and whenever chasing problems like this you should always update to the latest packages so you are not chasing bugs that may have already been fixed. sudo dnf upgrade --refresh followed by a reboot is what I would recommend before further troubleshooting.

Thanks, that fixed it!
I installed Fedora 40 just a couple of hours ago, did software updates and rebooted a couple of times. I still landed on kernel 6.8.5 (although 6.8.8 is also installed).
Have a nice day :slight_smile:

1 Like

This should not happen. Normally fedora always defaults to the latest kernel installed, so please tell us what the results of dnf list installed kernel* and ls /boot /boot/efi /boot/efi/EFI show

dnf list installed kernel:

Installed Packages
kernel.x86_64                                                       6.8.5-301.fc40                                         @anaconda
kernel.x86_64                                                       6.8.8-300.fc40                                         @updates 
kernel-core.x86_64                                                  6.8.5-301.fc40                                         @anaconda
kernel-core.x86_64                                                  6.8.8-300.fc40                                         @updates 
kernel-devel.x86_64                                                 6.8.5-301.fc40                                         @fedora  
kernel-devel.x86_64                                                 6.8.8-300.fc40                                         @updates 
kernel-devel-matched.x86_64                                         6.8.8-300.fc40                                         @updates 
kernel-headers.x86_64                                               6.8.3-300.fc40                                         @anaconda
kernel-modules.x86_64                                               6.8.5-301.fc40                                         @anaconda
kernel-modules.x86_64                                               6.8.8-300.fc40                                         @updates 
kernel-modules-core.x86_64                                          6.8.5-301.fc40                                         @anaconda
kernel-modules-core.x86_64                                          6.8.8-300.fc40                                         @updates 
kernel-modules-extra.x86_64                                         6.8.5-301.fc40                                         @anaconda
kernel-modules-extra.x86_64                                         6.8.8-300.fc40                                         @updates 
kernel-srpm-macros.noarch                                           1.0-23.fc40                                            @fedora  

ls /boot /boot/efi /boot/efi/EFI:

/boot:
config-6.8.5-301.fc40.x86_64				 lost+found
config-6.8.8-300.fc40.x86_64				 symvers-6.8.5-301.fc40.x86_64.xz
efi							 symvers-6.8.8-300.fc40.x86_64.xz
grub2							 System.map-6.8.5-301.fc40.x86_64
initramfs-0-rescue-7f7a728f02164600a9748eb7874bab54.img  System.map-6.8.8-300.fc40.x86_64
initramfs-6.8.5-301.fc40.x86_64.img			 vmlinuz-0-rescue-7f7a728f02164600a9748eb7874bab54
initramfs-6.8.8-300.fc40.x86_64.img			 vmlinuz-6.8.5-301.fc40.x86_64
loader							 vmlinuz-6.8.8-300.fc40.x86_64

/boot/efi:
EFI  mach_kernel  System

/boot/efi/EFI:
BOOT  fedora

All those are as expected. what is the output of uname -r?

6.8.5-301.fc40.x86_64

Strange.
Have you done something that would make that kernel the default?
Have you tried to display the grub boot menu and select the 6.8.8 kernel for booting?

I was able to boot into 6.8.8, everything worked fine. I ran grubby --default-kernel and it confirmed 6.8.5 is the default. I definitely did not change any grub settings or anything that would change the default kernel I’m quite sure.

I think the -301 kernel came from “testing” and should have been be removed.