This guide walks you through installing the NVIDIA driver on Proxmox with Secure Boot enabled, including automatic signing of DKMS modules and troubleshooting tips.
mokutil --sb-stateIf Secure Boot is enabled, all kernel modules (including DKMS-built NVIDIA modules) must be signed.
Check if nouveau is loaded:
lsmod | grep nouveauBlacklist it:
cat <<EOF | sudo tee /etc/modprobe.d/blacklist-nouveau.conf
blacklist nouveau
options nouveau modeset=0
EOF
update-initramfs -u -k all
rebootsudo /usr/bin/nvidia-uninstalldkms remove -m nvidia -v 580.95.05 --all || true
apt purge -y --auto-remove '^nvidia.*'Confirm cleanup:
dpkg -l | grep -E 'nvidia|cuda'
apt list --installed | grep -E 'nvidia|cuda'
dkms statusapt update
apt install -y build-essential dkms software-properties-common
apt install -y proxmox-default-headers
apt install -y proxmox-headers-$(uname -r)| Package | Purpose |
|---|---|
| build-essential | Includes gcc, needed for building modules |
| dkms | Dynamically rebuilds kernel modules |
| software-properties-common | Enables add-apt-repository |
| proxmox-default-headers | Auto-track kernel headers |
| proxmox-headers-$(uname -r) | Kernel headers for current kernel |
Create a dedicated directory under /root:
mkdir -p /root/module-signing
chmod 700 /root/module-signingGenerate key + certificate:
openssl req -new -x509 \
-newkey rsa:2048 \
-keyout /root/module-signing/module-signing.key \
-outform DER \
-out /root/module-signing/module-signing.der \
-nodes -days 36500 \
-subj "/CN=Nvidia Driver Kmod Signing MOK"Enroll the key:
mokutil --import /root/module-signing/module-signing.der
# You'll be prompted to create a password. Enter it twice.Reboot and follow on-screen MOK Manager prompts to enroll the key.
- "Enroll MOK"
- "Continue".
- "Yes".
- Enter the password you set up just now.
- Select "OK" and the computer will reboot again.
After reboot, verify:
cat /proc/keys | grep asymmetri
mokutil --list-enrolledCreate DKMS config:
cat > /etc/dkms/framework.conf.d/nvidia-signing.conf <<EOF
mok_signing_key=/root/module-signing/module-signing.key
mok_certificate=/root/module-signing/module-signing.der
EOFAny enrolled MOK can sign kernel modules. DKMS will automatically sign modules during build.
Download from Download The Official NVIDIA Drivers | NVIDIA
curl -O https://us.download.nvidia.com/XFree86/Linux-x86_64/580.95.05/NVIDIA-Linux-x86_64-580.95.05.run
chmod +x NVIDIA-Linux-x86_64-580.95.05.runInstall:
./NVIDIA-Linux-x86_64-580.95.05.run --dkms- Kernel module type: MIT/GPL
- Sign kernel module: Yes
- Use existing key: Yes
- Ignore X libraries: Yes (headless host)
- Register DKMS module: Yes
- Run nvidia-xconfig: No
Reboot:
rebootnvidia-smi
uname -r
dkms statusVerify signing:
modinfo nvidia | grep -i signerTo view loaded NVIDIA Modules
lsmod | grep nvidia
- https://wiki.debian.org/NvidiaGraphicsDrivers
- https://www.youtube.com/watch?v=lNGNRIJ708k
- https://github.com/dell/dkms#secure-boot
- https://gist.github.com/lijikun/22be09ec9b178e745758a29c7a147cc9
- https://pve.proxmox.com/wiki/NVIDIA_vGPU_on_Proxmox_VE
- https://us.download.nvidia.com/XFree86/Linux-x86_64/550.54.14/README/installdriver.html
uname -r
dkms statusless /var/log/apt/term.logSearch with /dkms
dmesg | grep -Ei 'nvidia|dkms|key|sign|secureboot'sudo dkms remove nvidia/580.95.05 -k $(uname -r)
sudo dkms install nvidia/580.95.05 -k $(uname -r)Then reload the module:
modprobe nvidia
Verify
nvidia-smi
uname -r
apt list --installed | grep header
sudo apt purge proxmox-headers-<old-kernel-version>dkms status
sudo dkms remove nvidia/580.95.05 -k <old-kernel-version> --forceRemove the old driver and install the new driver
Create /etc/systemd/system/nvidia-persistenced.service:
[Unit]
Description=NVIDIA Persistence Daemon
[Service]
Type=forking
ExecStart=/usr/bin/nvidia-persistenced --verbose
ExecStartPost=/usr/bin/nvidia-smi
ExecStopPost=/bin/rm -rf /var/run/nvidia-persistenced
[Install]
WantedBy=multi-user.targetEnable
systemctl enable --now nvidia-persistencedVerify
systemctl status nvidia-persistenced
ls -lah /dev/nvidia*
nvidia-smi --query-gpu=persistence_mode --format=csv
nvidia-smi -q | grep -i "Persistence Mode"Useful if you plan to run a GUI in LXC container.
echo 'options nvidia-drm modeset=1' > /etc/modprobe.d/nvidia-drm.conf
update-initramfs -u -k all
rebootEdit /etc/default/grub, append bellow value to GRUB_CMDLINE_LINUX_DEFAULT variable:
nvidia-drm.modeset=1
Then:
update-grub
rebootcat /sys/module/nvidia_drm/parameters/modeset
# Should return: Y- https://us.download.nvidia.com/XFree86/Linux-x86_64/550.54.14/README/kms.html
- https://wiki.archlinux.org/title/NVIDIA#DRM_kernel_mode_setting
- https://wiki.archlinux.org/title/Kernel_mode_setting
- https://en.wikipedia.org/wiki/Direct_Rendering_Manager
- https://wiki.archlinux.org/title/Kernel_module#Using_modprobe
- https://wiki.archlinux.org/title/Kernel_parameters#GRUB