Debian 12 and nvidia driver NVIDIA-Linux-x86_64-470.223.02.run

Hi. My workstation based on Debian 12 worked perfectly with nvidia driver till yesterday.
Yesterday I have update Debian OS by apt-get update, apt-get dist-upgrade. A new version of linux.image is come with its new headers. This happens many tipe in the past.
So now, when I try to reinstall the nvidia drivers I obtain the error:

 ERROR: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol '__rcu_read_lock'
   ERROR: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol '__rcu_read_unlock'





ld -r -o /tmp/selfgz26111/NVIDIA-Linux-x86_64-470.223.02/kernel/nvidia-modeset/nv-modeset-interface.o /tmp/selfgz26111/NVIDIA-Linux-x86_64-470.223.02/kernel/nvidia-modeset/nvidia-modeset-linux.o /tmp/selfgz26111/NVIDIA-Linux-x86_64-470.223.02/kernel/nvidia-modeset/nv-kthread-q.o
  LD [M]  /tmp/selfgz26111/NVIDIA-Linux-x86_64-470.223.02/kernel/nvidia-drm.o
  LD [M]  /tmp/selfgz26111/NVIDIA-Linux-x86_64-470.223.02/kernel/nvidia-peermem.o
  MODPOST /tmp/selfgz26111/NVIDIA-Linux-x86_64-470.223.02/kernel/Module.symvers
ERROR: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol '__rcu_read_lock'
ERROR: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol '__rcu_read_unlock'
make[3]: *** [/usr/src/linux-headers-6.1.0-18-common/scripts/Makefile.modpost:126: /tmp/selfgz26111/NVIDIA-Linux-x86_64-470.223.02/kernel/Module.symvers] Error 1
make[3]: Target '__modpost' not remade because of errors.
make[2]: *** [/usr/src/linux-headers-6.1.0-18-common/Makefile:1991: modpost] Error 2
make[2]: Target 'modules' not remade because of errors.
make[2]: Leaving directory '/usr/src/linux-headers-6.1.0-18-amd64'
make[1]: *** [Makefile:250: __sub-make] Error 2
make[1]: Target 'modules' not remade because of errors.
make[1]: Leaving directory '/usr/src/linux-headers-6.1.0-18-common'
make: *** [Makefile:80: modules] Error 2
-> Checking to see whether the nvidia kernel module was successfully built
   executing: 'cd ./kernel; /usr/bin/make -k -j4 NV_KERNEL_MODULES="nvidia" NV_EXCLUDE_KERNEL_MODULES="" SYSSRC="/lib/modules/6.1.0-18-amd64/source" SYSOUT="/lib/modules/6.1.0-18-amd64/build"'...
   make[1]: Entering directory '/usr/src/linux-headers-6.1.0-18-common'
   make[2]: Entering directory '/usr/src/linux-headers-6.1.0-18-amd64'
     MODPOST /tmp/selfgz26111/NVIDIA-Linux-x86_64-470.223.02/kernel/Module.symvers
   ERROR: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol '__rcu_read_lock'
   ERROR: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol '__rcu_read_unlock'
   make[3]: *** [/usr/src/linux-headers-6.1.0-18-common/scripts/Makefile.modpost:126: /tmp/selfgz26111/NVIDIA-Linux-x86_64-470.223.02/kernel/Module.symvers] Error 1
   make[3]: Target '__modpost' not remade because of errors.
   make[2]: *** [/usr/src/linux-headers-6.1.0-18-common/Makefile:1991: modpost] Error 2
   make[2]: Target 'modules' not remade because of errors.
   make[2]: Leaving directory '/usr/src/linux-headers-6.1.0-18-amd64'
   make[1]: *** [Makefile:250: __sub-make] Error 2
   make[1]: Target 'modules' not remade because of errors.
   make[1]: Leaving directory '/usr/src/linux-headers-6.1.0-18-common'
   make: *** [Makefile:80: modules] Error 2
-> Error.
ERROR: An error occurred while performing the step: "Checking to see whether the nvidia kernel module was successfully built". See /var/log/nvidia-installer.log for details.
-> The command `cd ./kernel; /usr/bin/make -k -j4 NV_KERNEL_MODULES="nvidia" NV_EXCLUDE_KERNEL_MODULES="" SYSSRC="/lib/modules/6.1.0-18-amd64/source" SYSOUT="/lib/modules/6.1.0-18-amd64/build"` failed with the following output:

make[1]: Entering directory '/usr/src/linux-headers-6.1.0-18-common'
make[2]: Entering directory '/usr/src/linux-headers-6.1.0-18-amd64'
  MODPOST /tmp/selfgz26111/NVIDIA-Linux-x86_64-470.223.02/kernel/Module.symvers
ERROR: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol '__rcu_read_lock'
ERROR: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol '__rcu_read_unlock'
make[3]: *** [/usr/src/linux-headers-6.1.0-18-common/scripts/Makefile.modpost:126: /tmp/selfgz26111/NVIDIA-Linux-x86_64-470.223.02/kernel/Module.symvers] Error 1
make[3]: Target '__modpost' not remade because of errors.
make[2]: *** [/usr/src/linux-headers-6.1.0-18-common/Makefile:1991: modpost] Error 2
make[2]: Target 'modules' not remade because of errors.
make[2]: Leaving directory '/usr/src/linux-headers-6.1.0-18-amd64'
make[1]: *** [Makefile:250: __sub-make] Error 2
make[1]: Target 'modules' not remade because of errors.
make[1]: Leaving directory '/usr/src/linux-headers-6.1.0-18-common'
make: *** [Makefile:80: modules] Error 2
ERROR: The nvidia kernel module was not created.
ERROR: Installation has failed.  Please see the file '/var/log/nvidia-installer.log' for details.  You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.
root@tomcat:~#

1 Like

Same error for me… Like said by nvidia in an other post, bug is in progress in there side so I hope fix will be available soon! I uninstall 6.1.0-18 kernel for now and wait for the fix before re-install it…

2 Likes

@denisgottardello

I find a fix! Debian published an update of nvidia drivers but only in bookworm-updates for now, so just add these lines in your /etc/apt/source.list file:

deb http://deb.debian.org/debian/ bookworm-updates main non-free contrib non-free-firmware
deb-src http://deb.debian.org/debian/ bookworm-updates main non-free contrib non-free-firmware

This will upgrade your nvidia driver from 525.147.05-4 to 525.147.05-7 and it will compile against the new kernel!

3 Likes

Is there a way of fixing/bypassing this issue on Debian12 if I am not using a debian 12 package for installing the Nvidia GPU driver. Instead we use the .run file.

1 Like

I also use the Nvidia-provided .run installer and was able to successfully patch and compile the nvidia kernel module as described here on Debian 12 with the 6.1.0-18-amd64 kernel. It’s a patch provided by Gentoo and you may need to futz around with the file paths a bit, but it applies with fuzz and seems to be working fine. Hope this helps!

@denisgottardello
I haved same error. awful for my because is a laptop and i dont connect my monitor, only for gpu.

I dont found any solution at this bug whit the new version of the kernel.
So, kernel problem is linux-headers-6.1.0-18-amd64.
i dont only use nvidia for my monitor, it is for my work with gpu and simulations. AWFUL!

The only solution i found. is delete the kernel 6.1.0-18.
You shuold also delete the kernel source path. and the linux-headers in general of this version.

don’t delete manually, only with commands

Back to the kernel 6.1.0-17-amd64. this works fine. and compile the NVIDIA.run and install whitout problems.

and wait for debug.

Pd(Sorry for my english, i try improve)

2 Likes