Public bug reported:

Summary of the bug:

An interrupted unattended-upgrades transaction can leave a system with a
new kernel image and NVIDIA kernel-modules package installed, but
WITHOUT the matching linux-headers package — because no Depends:
relationship enforces that headers be configured before the NVIDIA
modules package's postinst (which triggers a DKMS build) runs. This
results in the DKMS build being silently skipped, the NVIDIA driver
failing to load at next boot, and the system falling back to a basic
framebuffer with no user-facing error or notification.

Steps that reproduced this on my system:

1. unattended-upgrades attempted to upgrade to kernel 7.0.0-30-generic
on 2026-08-21, including linux-generic-hwe-24.04, linux-headers-generic-
hwe-24.04, linux-modules-nvidia-580-generic-hwe-24.04, and linux-
modules-nvidia-550-generic-hwe-24.04 (see /var/log/unattended-
upgrades/unattended-upgrades.log).

2. The transaction failed ("installArchives() failed", per unattended-
upgrades.log). Examining /var/log/unattended-upgrades/unattended-
upgrades-dpkg.log for that run shows dpkg had already unpacked and
configured linux-modules-7.0.0-30-generic, linux-image-7.0.0-30-generic,
and linux-modules-nvidia-580-7.0.0-30-generic — but had NOT yet reached
linux-headers-generic-hwe-24.04 in the sequence.

3. Configuring linux-modules-nvidia-580-7.0.0-30-generic triggers 
/etc/kernel/postinst.d/dkms, which attempts an immediate DKMS build for the new 
kernel. This build failed because headers were not yet present:
   ./BUILD: 4: /usr/src/linux-headers-7.0.0-30-generic/tools/objtool/objtool: 
not found
   /usr/bin/ld.bfd: cannot open linker script file 
/usr/src/linux-headers-7.0.0-30-generic/scripts/module.lds: No such file or 
directory
   sha256sum: nvidia-drm.ko: No such file or directory [and 4 more .ko files]

4. dpkg treated the DKMS build failure as a fatal package error and aborted the 
whole transaction:
   dkms: autoinstall for kernel 7.0.0-30-generic was skipped since the kernel 
headers for this kernel do not seem to be installed
   dpkg: error processing package linux-modules-nvidia-580-7.0.0-30-generic 
(--configure): installed linux-modules-nvidia-580-7.0.0-30-generic package 
post-installation script subprocess returned error exit status 1

5. linux-headers-generic-hwe-24.04 was left unconfigured, having never
been reached.

6. The system rebooted into 7.0.0-30-generic with no working NVIDIA
kernel module (nvidia-smi: "couldn't communicate with the NVIDIA
driver"), and X11/gdm fell back to a basic framebuffer driving only one
of three connected monitors. No error, warning, or notification was
surfaced to the desktop session at any point — the failure was only
visible by manually inspecting logs.

Root cause, confirmed via package metadata:

apt-cache show on both linux-modules-nvidia-580-generic-hwe-24.04 and
linux-modules-nvidia-580-7.0.0-30-generic shows neither package Depends
on any linux-headers-* package:

$ apt-cache show linux-modules-nvidia-580-generic-hwe-24.04 | grep -E 
"^(Depends|Recommends|Pre-Depends)"
Depends: linux-modules-nvidia-580-7.0.0-30-generic (= 7.0.0-30.30~24.04.1), 
nvidia-kernel-common-580 (>= 580.173.02)

$ apt-cache show linux-modules-nvidia-580-7.0.0-30-generic | grep -E 
"^(Depends|Recommends|Pre-Depends)"
Depends: debconf (>= 0.5) | debconf-2.0, linux-image-7.0.0-30-generic | 
linux-image-unsigned-7.0.0-30-generic, linux-signatures-nvidia-7.0.0-30-generic 
(= 7.0.0-30.30~24.04.1), linux-objects-nvidia-580-7.0.0-30-generic (= 
7.0.0-30.30~24.04.1), nvidia-kernel-common-580 (>= 580.173.02)

apt's dependency resolver does prefer to order linux-headers-* before
linux-modules-nvidia-*-* when both are requested in a single,
uninterrupted transaction (confirmed via apt-get --simulate). But
because this ordering is a resolver preference and not an enforced
Depends relationship, any transaction interrupted mid-sequence — for any
reason — can leave the NVIDIA modules package configured (and its DKMS
build attempted/failed) while linux-headers remains unconfigured, with
no automatic retry afterward.

What I expected to happen:
Either (a) the NVIDIA kernel-modules package's postinst DKMS trigger should not 
run until linux-headers for the target kernel is confirmed present, or (b) a 
failed DKMS build during postinst should not abort the whole apt transaction 
and strand dependent packages unconfigured, or (c) at minimum, a user-facing 
notification/warning should appear when a kernel boots with no working NVIDIA 
module, rather than silently falling back to a basic framebuffer.

What happened instead:
Silent failure with no notification. The only symptom was one working display 
port instead of three; nvidia-smi and dmesg had to be checked manually to 
discover the driver wasn't loaded at all.

System info:
Ubuntu 24.04.4 LTS, kernel 7.0.0-30-generic, NVIDIA driver 580.173.02, ASUS 
ProArt B650-CREATOR, RTX 4080 SUPER. Full apport hardware report available on 
request (collected via ubuntu-bug, not attached here to keep this report 
focused).

** Affects: nvidia-graphics-drivers-580 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2164795

Title:
  DKMS build for nvidia kernel module skipped when transaction is
  interrupted before linux-headers is configured, leaving system on
  fallback framebuffer with no error shown

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-580/+bug/2164795/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to