You are not logged in.

#1 2020-09-06 08:14:13

printesoi
Member
Registered: 2011-07-17
Posts: 12

Nvidia kernel module cannot be loaded with kernel >= 5.8

I have a Lenovo ThinkPad X1 Extreme Gen 2 laptop with an Nvidia GeForce GTX 1650 video card. I am using the proprietary driver (nvidia-utils and nvidia-dkms packages) with Optimus manager. Since updating to kernel 5.8 or newer, the nvidia module cannot be loaded with modprobe.

$ sudo modprobe nvidia -vv                                      
modprobe: INFO: custom logging function 0x55b64b42af50 registered
insmod /lib/modules/5.8.6-arch1-1/kernel/drivers/video/nvidia.ko.xz 
modprobe: INFO: Failed to insert module '/lib/modules/5.8.6-arch1-1/kernel/drivers/video/nvidia.ko.xz': No such device
modprobe: ERROR: could not insert 'nvidia': No such device
modprobe: INFO: context 0x55b64ca2c450 released

and in system log I get

kernel: nvidia: module license 'NVIDIA' taints kernel.
kernel: Disabling lock debugging due to kernel taint
kernel: nvidia-nvlink: Nvlink Core is being initialized, major device number 236
kernel: nvidia 0000:01:00.0: enabling device (0000 -> 0003)
kernel: nvidia 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=none
kernel: NVRM: The NVIDIA GPU 0000:01:00.0
        NVRM: (PCI ID: 10de:1f91) installed in this system has
        NVRM: fallen off the bus and is not responding to commands.
kernel: nvidia: probe of 0000:01:00.0 failed with error -1
kernel: NVRM: The NVIDIA probe routine failed for 1 device(s).
kernel: NVRM: None of the NVIDIA devices were initialized.
kernel: nvidia-nvlink: Unregistered the Nvlink Core, major device number 236

If I downgrade the kernel to version 5.7.12.arch1 the module can be loaded again, while none of the >= 5.8 of the kernel in the repositories work with nvidia. What would be the problem, and how to use nvidia with the newer kernels?

Last edited by printesoi (2020-09-06 08:29:39)

Offline

#2 2020-09-06 09:33:59

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: Nvidia kernel module cannot be loaded with kernel >= 5.8

If you manually are downgrading and upgrading individual packages, then you have to make sure that you always also use exactly the right version of the nvidia kernel module package. This is because the module is compiled for exactly one certain kernel.

You can switch from "nvidia" to "nvidia-dkms" if you want to more freely switch kernel packages. The "nvidia-dkms" package will compile the module locally on your computer whenever the kernel package changes. You need to also install the "linux-headers" package because the nvidia-dkms package needs the headers for compiling.

Offline

#3 2020-09-06 12:42:28

printesoi
Member
Registered: 2011-07-17
Posts: 12

Re: Nvidia kernel module cannot be loaded with kernel >= 5.8

Ropid wrote:

If you manually are downgrading and upgrading individual packages, then you have to make sure that you always also use exactly the right version of the nvidia kernel module package. This is because the module is compiled for exactly one certain kernel.

You can switch from "nvidia" to "nvidia-dkms" if you want to more freely switch kernel packages. The "nvidia-dkms" package will compile the module locally on your computer whenever the kernel package changes. You need to also install the "linux-headers" package because the nvidia-dkms package needs the headers for compiling.

That's really not the issue here, the problem is not that the nvidia modues does not match the kernel version. I am already using the nvidia-dkms (as I pointed in the first post) and I always make sure the nvidia module is properly built. The problem is that with newer kernels the module does not load, while with the kernel 5.7.8 is loads properly.

Offline

#4 2020-09-06 12:53:31

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,724

Re: Nvidia kernel module cannot be loaded with kernel >= 5.8

Old driver version?

Offline

#5 2020-09-06 13:13:12

printesoi
Member
Registered: 2011-07-17
Posts: 12

Re: Nvidia kernel module cannot be loaded with kernel >= 5.8

seth wrote:

Old driver version?

No, the driver is up-to-date (450.66-1).

Offline

#6 2020-09-06 13:25:41

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,724

Offline

#7 2020-09-10 05:43:21

n00d1es
Member
Registered: 2020-08-22
Posts: 1

Re: Nvidia kernel module cannot be loaded with kernel >= 5.8

i have the same issue. i updated my system yesterday. after upgrading the system didnt work. got stuck with a black screen. checked xorg logs. found "no screen found. no devices found and nvidia kernel drivers unable to initialize."

then looked at modprobe. i got the same error as OP. "no module found."

i am also unable to connect to the internet via tty2. i am using usb thetering from my mobile phone. so i used the live usb i have of arch to arch-chroot and updated my system and also installed nvidia-dkms. it said the module driver of the exact version was found in arch 5.8.7 and everything seemed to be upto date.

when i restarted i noticed that i booted into arch 5.8.2 and again the xorg and nvidia driver are not loading.

i dont know whats wrong. i also have cuda toolkit, cudnn and pytorch-cuda packages installed and upto date.

like i said i just did a sudo pacman -Syu.

by the way, i also added wait rules to display manager so it will wait for the device to load before starting the display manager. but it didnt work and it went into timeout. i also added pci1:0:0 as busid in xorg.conf like it said in the arch wiki.

i think my system is not loading the right linux kernel. i dont know. need help.

"intel i5 3450 with nvidia gtx 1050 ti."

Last edited by n00d1es (2020-09-10 05:44:47)

Offline

#8 2020-09-10 06:51:53

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,724

Re: Nvidia kernel module cannot be loaded with kernel >= 5.8

"no module found." is NOT "No such device" (nor likely a literal error message)

module driver of the exact version was found in arch 5.8.7 and everything seemed to be upto date.

when i restarted i noticed that i booted into arch 5.8.2 and again the xorg and nvidia driver are not loading.

You just screwed the update and boot an old kernel because you forgot to mount the /boot partition during the update.
This has nothing to do w/ the problem at hand.

Offline

#9 2020-09-14 20:58:48

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,366

Re: Nvidia kernel module cannot be loaded with kernel >= 5.8

Whoops, sorry for the thread getting caught in the other OS crossfire, moving to NC

Offline

Board footer

Powered by FluxBB