Error building nvidia kernel module

Businek

New Member
Joined
Dec 13, 2021
Messages
10
Reaction score
1
Credits
81
Hello,

I upgraded my Debian (11 Bullseye) on 29th of May and I got a problem. Since then I get error messages on boot and the lowest resolution on lightDM and desktop. It must be Nvidia it seems.

The errors from boot are:
[FAILED] Failed to start Load Kernel Modules.
See 'systemctl status systemd-modules-load.service' for details.
...
[FAILED] Failed to start NVIDIA Persistence Daemon.
See 'systemctl status nvidia-persistenced.service' for details.

The output of # systemctl status systemd-modules-load.service:
● systemd-modules-load.service - Load Kernel Modules
Loaded: loaded (/lib/systemd/system/systemd-modules-load.service; static)
Active: failed (Result: exit-code) since Tue 2024-06-11 11:10:25 CEST; 2h 3min ago
Docs: man:systemd-modules-load.service(8)
man:modules-load.d(5)
Process: 431 ExecStart=/lib/systemd/systemd-modules-load (code=exited, status=1/FAILURE)
Main PID: 431 (code=exited, status=1/FAILURE)
CPU: 36ms

Jun 11 11:10:25 local-host systemd-modules-load[435]: modprobe: ERROR: could not insert 'nvidia': Invalid argument
Jun 11 11:10:25 local-host systemd-modules-load[438]: modprobe: FATAL: Module nvidia-current-modeset not found in directory /lib/modules/5.10.0-29-amd64
Jun 11 11:10:25 local-host systemd-modules-load[433]: modprobe: ERROR: ../libkmod/libkmod-module.c:990 command_do() Error running install command 'modprobe nvidia ; modprobe -i nvidia-current-modeset ' for module nvidia_modeset: retcode 1
Jun 11 11:10:25 local-host systemd-modules-load[433]: modprobe: ERROR: could not insert 'nvidia_modeset': Invalid argument
Jun 11 11:10:25 local-host systemd-modules-load[439]: modprobe: FATAL: Module nvidia-current-drm not found in directory /lib/modules/5.10.0-29-amd64
Jun 11 11:10:25 local-host systemd-modules-load[431]: Error running install command 'modprobe nvidia-modeset ; modprobe -i nvidia-current-drm ' for module nvidia_drm: retcode 1
Jun 11 11:10:25 local-host systemd-modules-load[431]: Failed to insert module 'nvidia_drm': Invalid argument
Jun 11 11:10:25 local-host systemd[1]: systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE
Jun 11 11:10:25 local-host systemd[1]: systemd-modules-load.service: Failed with result 'exit-code'.
Jun 11 11:10:25 local-host systemd[1]: Failed to start Load Kernel Modules.

The output of # systemctl status nvidia-persistenced.service:
● nvidia-persistenced.service - NVIDIA Persistence Daemon
Loaded: loaded (/lib/systemd/system/nvidia-persistenced.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2024-06-11 13:17:12 CEST; 2min 28s ago
Process: 449 ExecStart=/usr/bin/nvidia-persistenced --user nvpd (code=exited, status=1/FAILURE)
Process: 472 ExecStopPost=/bin/rm -rf /var/run/nvidia-persistenced (code=exited, status=0/SUCCESS)
CPU: 34ms

Jun 11 13:17:11 local-host systemd[1]: Starting NVIDIA Persistence Daemon...
Jun 11 13:17:12 local-host nvidia-persistenced[457]: Started (457)
Jun 11 13:17:12 local-host nvidia-persistenced[457]: Failed to query NVIDIA devices. Please ensure that the NVIDIA device files (/dev/nvidia*) exist, and that user 114 has read and write permissions for those files.
Jun 11 13:17:12 local-host nvidia-persistenced[457]: Shutdown (457)
Jun 11 13:17:12 local-host nvidia-persistenced[449]: nvidia-persistenced failed to initialize. Check syslog for more details.
Jun 11 13:17:12 local-host systemd[1]: nvidia-persistenced.service: Control process exited, code=exited, status=1/FAILURE
Jun 11 13:17:12 local-host systemd[1]: nvidia-persistenced.service: Failed with result 'exit-code'.
Jun 11 13:17:12 local-host systemd[1]: Failed to start NVIDIA Persistence Daemon.

Also, there was an error shown right during system upgrade:
...
Building module:
cleaning build area...
env NV_VERBOSE=1 make -j6 modules KERNEL_UNAME=5.10.0-29-amd64.....................(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.10.0-29-amd64 (x86_64)
Consult /var/lib/dkms/nvidia-current/470.223.02/build/make.log for more information.
...

Some excerpts from /var/lib/dkms/nvidia-current/470.223.02/build/make.log that are somewhat meaningful I think:
...
test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \
echo >&2; \
echo >&2 " ERROR: Kernel configuration is invalid."; \
echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo >&2 ; \
/bin/false)
...
FATAL: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol 'rcu_read_unlock_strict'
make[3]: *** [/usr/src/linux-headers-5.10.0-30-common/scripts/Makefile.modpost:123: /var/lib/dkms/nvidia-current/470.223.02/build/Module.symvers] Error 1
make[2]: *** [/usr/src/linux-headers-5.10.0-30-common/Makefile:1783: modules] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-5.10.0-30-amd64'
make[1]: *** [Makefile:192: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.10.0-30-common'
make: *** [Makefile:80: modules] Error 2

The last time I upgraded before the problem, it was on 26th of April.
Can someone please help me with this? I can provide full output of these snippets if needed and other info.

Thank you very much!
 
Last edited:


Which Nvidia gpu do you have and how were you trying to install the driver?
 
Which Nvidia gpu do you have and how were you trying to install the driver?
I have a GTX 750Ti but I have my driver installed and working well for a long time. I didn't try to install anything I just upgraded the system like always and that error happened.
 
How did you install the driver and are you did you upgrade to Debian 11 or Debian 12?
 
How did you install the driver and are you did you upgrade to Debian 11 or Debian 12?
I'm still on Debian 11 because of life and I installed the driver like
sudo apt install nvidia-driver
from the non-free repo, the regular way of doing it.
 
Wait, I'm thinking, if I upgrade to Debian 12, shouldn't it also fix the issue? Because I want to upgrade to 12 I just procrastinate on it.
Yeah would be worth it to be on the latest version anyways, Debian 12 has newer Nvidia drivers in the repo and should still support your gpu.
Code:
nvidia-open-kernel-dkms/stable 525.147.05-1~deb12u1 amd64
  NVIDIA open kernel module DKMS source
 
Yeah would be worth it to be on the latest version anyways, Debian 12 has newer Nvidia drivers in the repo and should still support your gpu.
Code:
nvidia-open-kernel-dkms/stable 525.147.05-1~deb12u1 amd64
  NVIDIA open kernel module DKMS source
OK, so instead of adding the backports repo and installing the driver from there I will full-upgrade to Debian 12.
 
The problem is your GTX750ti support ended with version 334.21 Nvidia drivers and kernel version 5.10 - the newer kernels no longer support those old drivers - when installing a recent OS you most likely will have to rely on the Nouveau drivers

 
The problem is your GTX750ti support ended with version 334.21 Nvidia drivers and kernel version 5.10 - the newer kernels no longer support those old drivers - when installing a recent OS you most likely will have to rely on the Nouveau drivers

That gpu is still listed under support devices for driver version 550.
Version: 550.90.07
Release Date: 2024.6.4
Operating System: Linux 64-bit
Language: English (US)
File Size: 293.33 MB
GeForce 700 Series:
GeForce GTX 750 Ti, GeForce GTX 750, GeForce GTX 745
And version 525 is available in the Debian bookworm repos, so I would expect that driver version to still support that gpu?
 
You could try both options, and both methods.

Do a fresh install of Debian 12, on a different partition or different drive.

If it is the same drive and the computer is UEFI, the two can use the same ESP (EFI System Partition).

If one works with the drivers and one doesn't, remove the one that doesn't.

Cheers

Wizard
 
That gpu is still listed under support devices for driver version 550.


And version 525 is available in the Debian bookworm repos, so I would expect that driver version to still support that gpu?
Whether or not the NVIDIA driver and kernel modules will work with a specific kernel version is based on how their installation is handled.
NVIDIA drivers updates in Linux are based on their windows counterparts development, not the Linux kernels updates.
The way the installation of NVIDIA drivers is handled by various distributions makes them dependent on specific kernel versions, with for example DKMS being dependent on specific kernel versions in order to build correctly.
 
Whether or not the NVIDIA driver and kernel modules will work with a specific kernel version is based on how their installation is handled.
I know that my point was, since the version 550 still supports the 750ti. That would mean the 525 does too, which is still available from the default repos in bookworm. So I would think if they offer a package in the Debian non-free repos that it would still also work with the kernels available to Debian since it is packaged by Debian developers?
 
I know that my point was, since the version 550 still supports the 750ti. That would mean the 525 does too, which is still available from the default repos in bookworm. So I would think if they offer a package in the Debian non-free repos that it would still also work with the kernels available to Debian since it is packaged by Debian developers?
Nvidia Graphics Drivers are partly secret source (closed source/proprietary) software, owned by a for profit corporation and not supported by Debian. For those interested in stronger security and stronger privacy, it is suggested to consider using an alternative to Nvidia Graphics Drivers. Which is both fully libre source (open source) and supported by Debian


maybe the OP needs to install nvidia-detect to get the best driver to the kernel that is installed?
 
Nvidia Graphics Drivers are partly secret source (closed source/proprietary) software, owned by a for profit corporation and not supported by Debian.
I know that, I'm not getting your point?
For those interested in stronger security and stronger privacy, it is suggested to consider using an alternative to Nvidia Graphics Drivers.
I'm assuming you are talking about the opensource nouveau driver?

There are steps being made by Nvidia to become more open.
That being said, I have used plenty of Nvidia gpu's in the past but I have never stuck to a gpu for 10 years so don't have experience with dealing with older gpu's. With my new desktop build I have switched to an AMD gpu.
 
have used plenty of Nvidia gpu's in the past but I have never stuck to a gpu for 10 years so don't have experience with dealing with older gpu'
My Dell Latitude E6530 laptop (2013) uses a NVIDIA GF108GLM [NVS 5200M] last drivers from NVIDIA was 390.157 on 22Nov2022 - last kernel to support this was 5.4 - So I use Nouveau drivers because I have to - Just because a device is listed on NVIDIA drivers does not necessarily mean it will work or a least partially work which was my point in #14 - if the drivers are handled correctly then everything works if no then it may only partially work or not at all
 

Staff online

Members online


Top