- Package:
- nvidia-kernel-dkms
- Source:
- nvidia-kernel-dkms
- Submitter:
- Nicolas Patrois
- Date:
- 2026-10-13 10:37:01 UTC
- Severity:
- normal
- Tags:
Dear Maintainer, The new 7.2 kernel headers fails to build the nVidia driver. Here is apt’s output: Paramétrage de linux-image-7.2.6+deb14-amd64 (7.2.6-1) ... I: /vmlinuz.old is now a symlink to boot/vmlinuz-7.1.13+deb14-amd64 I: /initrd.img.old is now a symlink to boot/initrd.img-7.1.13+deb14-amd64 I: /vmlinuz is now a symlink to boot/vmlinuz-7.2.6+deb14-amd64 I: /initrd.img is now a symlink to boot/initrd.img-7.2.6+deb14-amd64 /etc/kernel/postinst.d/dkms: Sign command: /lib/modules/7.2.6+deb14-amd64/build/scripts/sign-file Signing key: /var/lib/dkms/mok.key Public certificate (MOK): /var/lib/dkms/mok.pub Autoinstall of module nvidia-current/550.163.01 for kernel 7.2.6+deb14-amd64 (x86_64) Building module(s)...........(bad exit status: 2) Failed command: env NV_VERBOSE=1 make -j12 modules KERNEL_UNAME=7.2.6+deb14-amd64 Error! Bad return status for module build on kernel: 7.2.6+deb14-amd64 (x86_64) Consult /var/lib/dkms/nvidia-current/550.163.01/build/make.log for more information. Autoinstall on 7.2.6+deb14-amd64 failed for module(s) nvidia-current(10). Error! One or more modules failed to install during autoinstall. Refer to previous errors for more information. run-parts: /etc/kernel/postinst.d/dkms exited with return code 1 dpkg: erreur de traitement du paquet linux-image-7.2.6+deb14-amd64 (--configure) : old linux-image-7.2.6+deb14-amd64 package postinst maintainer script subprocess failed with exit status 1 Paramétrage de linux-headers-7.2.6+deb14-amd64 (7.2.6-1) ... /etc/kernel/header_postinst.d/dkms: Sign command: /lib/modules/7.2.6+deb14-amd64/build/scripts/sign-file Signing key: /var/lib/dkms/mok.key Public certificate (MOK): /var/lib/dkms/mok.pub Autoinstall of module nvidia-current/550.163.01 for kernel 7.2.6+deb14-amd64 (x86_64) Building module(s)..........(bad exit status: 2) Failed command: env NV_VERBOSE=1 make -j12 modules KERNEL_UNAME=7.2.6+deb14-amd64 Error! Bad return status for module build on kernel: 7.2.6+deb14-amd64 (x86_64) Consult /var/lib/dkms/nvidia-current/550.163.01/build/make.log for more information. Autoinstall on 7.2.6+deb14-amd64 failed for module(s) nvidia-current(10). Error! One or more modules failed to install during autoinstall. Refer to previous errors for more information. run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 1 dpkg: erreur de traitement du paquet linux-headers-7.2.6+deb14-amd64 (--configure) : old linux-headers-7.2.6+deb14-amd64 package postinst maintainer script subprocess failed with exit status 1 Paramétrage de libavformat63:amd64 (10:9.0.2-dmo1) ... dpkg: des problèmes de dépendances empêchent la configuration de linux-image- amd64 : linux-image-amd64 dépend de linux-image-7.2.6+deb14-amd64 (= 7.2.6-1); cependant : Le paquet linux-image-7.2.6+deb14-amd64 n'est pas encore configuré. dpkg: erreur de traitement du paquet linux-image-amd64 (--configure) : problèmes de dépendances - laissé non configuré Paramétrage de libavfilter12:amd64 (10:9.0.2-dmo1) ... dpkg: des problèmes de dépendances empêchent la configuration de linux-headers- amd64 : linux-headers-amd64 dépend de linux-headers-7.2.6+deb14-amd64 (= 7.2.6-1); cependant : Le paquet linux-headers-7.2.6+deb14-amd64 n'est pas encore configuré. dpkg: erreur de traitement du paquet linux-headers-amd64 (--configure) : problèmes de dépendances - laissé non configuré […] Des erreurs ont été rencontrées pendant l'exécution : linux-image-7.2.6+deb14-amd64 linux-headers-7.2.6+deb14-amd64 linux-image-amd64 linux-headers-amd64 Erreur : Sub-process /usr/bin/dpkg returned an error code (1) I’m not sure if the ftbfs tag is required here. Yours, n.
Dear Maintainer, A quick review shows that there seem to be several culprits here: * strncpy seems to have been removed from kernel 7.2.6, so all references to strncpy would need to be replaced with strscpy. I found the following: * nvidia/os-interface.c:753 strncpy(buf, current->comm, len - 1); * nvidia/linux_nvswitch.c:2029 strncpy(regkey_val, regkey_val_start, regkey_val_len); * nvidia/linux_nvswitch.c:2384 return strncpy(dest, src, length); (nvswitch_os_strncpy) <--- Given this is called by code not open-sourced, I believe, we'd need to be careful on whether the calling code is expecting the zero-padding strncpy does but which I believe strscpy does not, in case we need to do some wrapping to emulate that behaviour instead of simply replacing one with the other. * nvidia-uvm/uvm_pmm_gpu.c:3041 strncpy(chunk_split_cache[level].name, "uvm_gpu_chunk_t", ...); * nvidia-modeset/nvidia-modeset-linux.c:354 return strncpy(dest, src, n); (nvkms_strncpy) <--- Same as above: Given this is called by code not open- sourced, I believe, we'd need to be careful on whether the calling code is expecting the zero-padding strncpy does but which I believe strscpy does not, in case we need to do some wrapping to emulate that behaviour instead of simply replacing one with the other. * It seems that in kernel 7.2.6 the DRM core changed the 'atomic' part. I believe it renamed `struct drm_atomic_state` to `struct drm_atomic_commit`, and made other non-trivial changes to how lifecycle is handled. These changes (e.g. the struct drm_atomic_state seems to no longer exist) cause the module to fail compilation, which cascades to every call where a pointer to this struct is used in calls to the new DRM functions. This seems like more complex changes are needed than simply the substitutions above... Some errors received are: nvidia-drm/nvidia-drm-drv.c:224:27: error: initialization of ‘struct drm_atomic_commit * (*)(struct drm_device *)’ from incompatible pointer type ‘struct drm_atomic_state * (*)(struct drm_device *)’ [-Wincompatible-pointer-types] nvidia-drm/nvidia-drm-drv.c:1212:13: error: implicit declaration of function ‘drm_atomic_state_alloc’; did you mean ‘nv_drm_atomic_state_alloc’? [-Wimplicit-function-declaration] nvidia-drm/nvidia-drm-modeset.c:47:29: error: field ‘base’ has incomplete type include/drm/drm_atomic.h:990:31: error: invalid use of undefined type ‘struct drm_atomic_state’ Affected files seem to be: nvidia-drm-drv.c, nvidia-drm-connector.c, nvidia- drm-crtc.c, nvidia-drm-helper.c, nvidia-drm-modeset.c. Not sure if changes in the open-sourced open-gpu-kernel-modules code might contain adaptation to this DRM change that could be backported to the 550.163.01 module.
I can reproduce this issue on Debian testing/forky amd64. Hardware: NVIDIA GeForce RTX 4070 SUPER PCI ID: 10de:2783 Kernel versions: - 7.1.13+deb14-amd64: works correctly - 7.2.6+deb14-amd64: NVIDIA DKMS module fails to build The kernel 7.2.6 package installation fails while running DKMS: Autoinstall of module nvidia-current/550.163.01 for kernel 7.2.6+deb14-amd64 failed. Relevant compiler error: nvidia/os-interface.c: In function ‘os_get_current_process_name’: nvidia/os-interface.c:753:5: error: implicit declaration of function ‘strncpy’ 753 | strncpy(buf, current->comm, len - 1); | ^~~~~~~ Because the NVIDIA module is not built, the new kernel does not start nvidia-persistenced and systemd-modules-load.service fails. The system can boot far enough to unlock LUKS and mount the LVM root filesystem, but the graphical session does not start correctly. The initramfs for the new kernel had to be generated manually with: update-initramfs -c -k 7.2.6+deb14-amd64 The installed packages include: linux-image-7.2.6+deb14-amd64 7.2.6-1 linux-headers-7.2.6+deb14-amd64 7.2.6-1 nvidia-driver 550.163.01-5.1 nvidia-kernel-dkms 550.163.01-5.1 dkms 3.2.2-1 The previous kernel 7.1.13+deb14-amd64 remains usable.
Hi,
Attached is a patch against nvidia-graphics-drivers 550.163.01-5.1 that
makes
nvidia-kernel-dkms build and work on Linux 7.2.6+deb14-amd64. It addresses
the
two issues Jonas described in his follow-up to this bug.
1. strncpy() removed in Linux 7.2
- nvidia/os-interface.c and nvidia-uvm/uvm_pmm_gpu.c: switched to
strscpy(),
same as NVIDIA's upstream fix (open-gpu-kernel-modules PR #1227,
shipped
in 610.57.04).
- nvidia/linux_nvswitch.c (registry key parsing): switched to memcpy(),
also
as upstream does. The following line already NUL-terminates.
- nvkms_strncpy() and nvswitch_os_strncpy(): these are called from the
closed-source binary objects, so, following the concern raised in this
bug, I kept their names and exact strncpy() semantics (copy, then
zero-pad the rest of the buffer), implemented locally instead of
changing
them to strscpy().
2. struct drm_atomic_state renamed to struct drm_atomic_commit
(commit 5164f7e7ff8e)
- New conftest drm_atomic_commit_present (types), registered in
nvidia-drm-sources.mk. It uses sizeof(struct drm_atomic_commit), so it
cannot give a false positive on older kernels.
- When it is defined, nvidia-drm-conftest.h maps the old names to the new
API (drm_atomic_state_alloc/clear/get/put/init/default_clear/
default_release -> drm_atomic_commit_*). I checked these names against
the 7.2.6 headers.
- Several existing conftests probe using the old struct name and silently
report false negatives on 7.2. That made the driver pick the pre-4.10
code paths (drm_atomic_state_free, and the old signatures of the crtc
and
plane atomic_check callbacks). When NV_DRM_ATOMIC_COMMIT_PRESENT is
set,
the patch forces ATOMIC_STATE_REF_COUNTING_PRESENT,
CRTC/PLANE_ATOMIC_CHECK_HAS_ATOMIC_STATE_ARG and the two
ATOMIC_HELPER_SWAP_STATE conftests.
Everything new is guarded by NV_DRM_ATOMIC_COMMIT_PRESENT, so builds on
older kernels are unchanged.
Testing:
- Built with DKMS against 7.2.6+deb14-amd64 and 7.1.13+deb14-amd64. Both
succeed with no errors and no implicit-declaration or modpost warnings.
On 7.1.13 the new conftest correctly reports #undef.
- Hardware: HP laptop with GeForce RTX 2050 (GA107, 10de:25ad) plus Radeon
680M, KDE Plasma on Wayland, forky.
- Booted 7.2.6: nvidia, nvidia_modeset, nvidia_drm and nvidia_uvm load,
nvidia-smi reports the GPU with driver 550.163.01, and the desktop works.
This is a local fix and I have only tested it on one machine, so please
review
it before using it. I hope it helps get a 7.2-compatible upload out.
Thanks,
Kevin Cuevas
Dear Maintainer, Is there any word on when nvidia-kernel-dkms will be updated? I’m on Debian Testig, currently with kernel 7.1.13; a while back, I had an update to 7.2.6, but it wouldn't complete due to this error. A kernel update to version 7.2.8 was released today, and once again, I am unable to install it. This is my APT output (polish language): Konfigurowanie pakietu linux-headers-7.2.6+deb14-amd64 (7.2.6-1) ... /etc/kernel/header_postinst.d/dkms: Sign command: /lib/modules/7.2.6+deb14-amd64/build/scripts/sign-file Signing key: /var/lib/dkms/mok.key Public certificate (MOK): /var/lib/dkms/mok.pub Autoinstall of module nvidia-current/550.163.01 for kernel 7.2.6+deb14-amd64 (x86_64) Building module(s)..............(bad exit status: 2) Failed command: env NV_VERBOSE=1 make -j8 modules KERNEL_UNAME=7.2.6+deb14-amd64 Error! Bad return status for module build on kernel: 7.2.6+deb14-amd64 (x86_64) Consult /var/lib/dkms/nvidia-current/550.163.01/build/make.log for more information. Autoinstall on 7.2.6+deb14-amd64 failed for module(s) nvidia-current(10). Error! One or more modules failed to install during autoinstall. Refer to previous errors for more information. run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 1 dpkg: błąd przetwarzania pakietu linux-headers-7.2.6+deb14-amd64 (--configure): old linux-headers-7.2.6+deb14-amd64 package postinst maintainer script subprocess failed with exit status 1 Konfigurowanie pakietu linux-headers-7.2.8+deb14-amd64 (7.2.8-1) ... /etc/kernel/header_postinst.d/dkms: Sign command: /lib/modules/7.2.8+deb14-amd64/build/scripts/sign-file Signing key: /var/lib/dkms/mok.key Public certificate (MOK): /var/lib/dkms/mok.pub Autoinstall of module nvidia-current/550.163.01 for kernel 7.2.8+deb14-amd64 (x86_64) Building module(s)..............(bad exit status: 2) Failed command: env NV_VERBOSE=1 make -j8 modules KERNEL_UNAME=7.2.8+deb14-amd64 Error! Bad return status for module build on kernel: 7.2.8+deb14-amd64 (x86_64) Consult /var/lib/dkms/nvidia-current/550.163.01/build/make.log for more information. Autoinstall on 7.2.8+deb14-amd64 failed for module(s) nvidia-current(10). Error! One or more modules failed to install during autoinstall. Refer to previous errors for more information. run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 1 dpkg: błąd przetwarzania pakietu linux-headers-7.2.8+deb14-amd64 (--configure): old linux-headers-7.2.8+deb14-amd64 package postinst maintainer script subprocess failed with exit status 1 Konfigurowanie pakietu linux-image-7.2.8+deb14-amd64 (7.2.8-1) ... I: /initrd.img is now a symlink to boot/initrd.img-7.2.8+deb14-amd64 /etc/kernel/postinst.d/dkms: Sign command: /lib/modules/7.2.8+deb14-amd64/build/scripts/sign-file Signing key: /var/lib/dkms/mok.key Public certificate (MOK): /var/lib/dkms/mok.pub Autoinstall of module nvidia-current/550.163.01 for kernel 7.2.8+deb14-amd64 (x86_64) Building module(s)..............(bad exit status: 2) Failed command: env NV_VERBOSE=1 make -j8 modules KERNEL_UNAME=7.2.8+deb14-amd64 Error! Bad return status for module build on kernel: 7.2.8+deb14-amd64 (x86_64) Consult /var/lib/dkms/nvidia-current/550.163.01/build/make.log for more information. Autoinstall on 7.2.8+deb14-amd64 failed for module(s) nvidia-current(10). Error! One or more modules failed to install during autoinstall. Refer to previous errors for more information. run-parts: /etc/kernel/postinst.d/dkms exited with return code 1 dpkg: błąd przetwarzania pakietu linux-image-7.2.8+deb14-amd64 (--configure): old linux-image-7.2.8+deb14-amd64 package postinst maintainer script subprocess failed with exit status 1 Konfigurowanie pakietu linux-image-7.2.6+deb14-amd64 (7.2.6-1) ... I: /initrd.img.old is now a symlink to boot/initrd.img-7.2.6+deb14-amd64 /etc/kernel/postinst.d/dkms: Sign command: /lib/modules/7.2.6+deb14-amd64/build/scripts/sign-file Signing key: /var/lib/dkms/mok.key Public certificate (MOK): /var/lib/dkms/mok.pub Autoinstall of module nvidia-current/550.163.01 for kernel 7.2.6+deb14-amd64 (x86_64) Building module(s)..............(bad exit status: 2) Failed command: env NV_VERBOSE=1 make -j8 modules KERNEL_UNAME=7.2.6+deb14-amd64 Error! Bad return status for module build on kernel: 7.2.6+deb14-amd64 (x86_64) Consult /var/lib/dkms/nvidia-current/550.163.01/build/make.log for more information. Autoinstall on 7.2.6+deb14-amd64 failed for module(s) nvidia-current(10). Error! One or more modules failed to install during autoinstall. Refer to previous errors for more information. run-parts: /etc/kernel/postinst.d/dkms exited with return code 1 dpkg: błąd przetwarzania pakietu linux-image-7.2.6+deb14-amd64 (--configure): old linux-image-7.2.6+deb14-amd64 package postinst maintainer script subprocess failed with exit status 1 dpkg: problemy z zależnościami uniemożliwiają skonfigurowanie pakietu linux-headers-amd64: linux-headers-amd64 zależy od linux-headers-7.2.8+deb14-amd64 (= 7.2.8-1); jednakże: Pakiet linux-headers-7.2.8+deb14-amd64 nie jest jeszcze skonfigurowany. dpkg: błąd przetwarzania pakietu linux-headers-amd64 (--configure): problemy z zależnościami - pozostawianie nieskonfigurowanego dpkg: problemy z zależnościami uniemożliwiają skonfigurowanie pakietu linux-image-amd64: linux-image-amd64 zależy od linux-image-7.2.8+deb14-amd64 (= 7.2.8-1); jednakże: Pakiet linux-image-7.2.8+deb14-amd64 nie jest jeszcze skonfigurowany. dpkg: błąd przetwarzania pakietu linux-image-amd64 (--configure): problemy z zależnościami - pozostawianie nieskonfigurowanego Wystąpiły błędy podczas przetwarzania: linux-headers-7.2.6+deb14-amd64 linux-headers-7.2.8+deb14-amd64 linux-image-7.2.8+deb14-amd64 linux-image-7.2.6+deb14-amd64 linux-headers-amd64 linux-image-amd64 Błąd: Sub-process /usr/bin/dpkg returned an error code (1) -- System information -- Operating System: Debian GNU/Linux forky/sid KDE Plasma Version: 6.7.4 KDE Frameworks Version: 6.30.0 Qt Version: 6.10.2 Kernel Version: 7.1.13+deb14-amd64 (64-bit) Graphics Platform: Wayland Processors: 8 × Intel® Core™ i7-2600K CPU @ 3.40GHz Memory: 32 GiB of RAM (31.3 GiB usable) Graphics Processor: NVIDIA GeForce GTX 1060 6GB Thanks, Arek
Dear Maintainer I tested nvidia-550-linux-7.2.patch.patch on this system: - Debian Unstable - Linux kernel 7.2.9+deb14-amd64 - NVIDIA GeForce RTX 3060. It works fine. Thanks Tula
Version: 550.163.01-5.1 Dear Maintainer, I tested the attached patch nvidia-550-linux-7.2.patch on the following system: - Debian testing/forky amd64 - NVIDIA GeForce RTX 4070 SUPER - PCI ID: 10de:2783 - Linux kernel: 7.2.9+deb14-amd64 - nvidia-kernel-dkms: 550.163.01-5.1 - DKMS: 3.2.2-1 The patch was applied manually to: /usr/src/nvidia-current-550.163.01 After applying the patch, the NVIDIA DKMS module built and installed successfully for the 7.2 kernel. The system boots normally with Linux 7.2.9. The NVIDIA driver works correctly: - uname -r reports 7.2.9+deb14-amd64 - nvidia-smi works and detects the GeForce RTX 4070 SUPER- the graphical desktop starts normally Thanks!
Dear Maintainer, I tested the nvidia-550-linux-7.2.patch.patch: - Debian GNU/Linux forky/sid - NVIDIA RTX A3000 Mobile - linux-image-7.2.9+deb14-amd64: 7.2.9-1 - nvidia-kernel-dkms: 550.163.01-5.1 After applying the patch, the NVIDIA DKMS module builds and works as expected. Thanks, Daniele