Skip to content

Commit 52a651a

Browse files
Ensure kernel headers are properly installed for GPU drivers
1 parent 2a660a0 commit 52a651a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Trixie/config/includes.chroot_after_packages/etc/trios/Install-GPU-Drivers.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,14 @@ if $HAS_INTEL; then install_intel; fi
100100
if $HAS_AMD; then install_amd; fi
101101
if $HAS_NVIDIA; then install_nvidia; fi
102102

103+
# ─── Kernel Header + DKMS Rebuild (All GPUs) ─────────────────
104+
echo "[*] Ensuring kernel headers and DKMS modules are up to date..."
105+
apt-get install -y --install-recommends linux-headers-$(uname -r) dkms
106+
107+
# Rebuild all DKMS modules (important for NVIDIA / hybrid systems)
108+
echo "[*] Rebuilding DKMS modules..."
109+
dkms autoinstall || echo "[!] DKMS build reported issues (check logs under /var/lib/dkms)."
110+
103111
# ─── Hybrid Handling ─────────────────────────────────────────
104112
if ($HAS_NVIDIA && $HAS_INTEL) || ($HAS_NVIDIA && $HAS_AMD) || ($HAS_AMD && $HAS_INTEL); then
105113
configure_hybrid

0 commit comments

Comments
 (0)