Proxmox Host/LXC Container NVIDIA `/dev/nvidia-modeset` missing
Quick little in-between tutorial/help of all the other related topics on the internet. My specific issue was that my Proxmox/ LXC passthrough setup seemed fine for most workloads, but when it came to find the /dev/nvidia-modeset directory it was missing.
root@proxmox-host:~# ls /dev/nvidia* -l
crw-rw-rw- 1 root root 194, 0 Dec 16 13:06 /dev/nvidia0
crw-rw-rw- 1 root root 194, 255 Dec 16 13:06 /dev/nvidiactl
crw-rw-rw- 1 root root 503, 0 Dec 16 13:06 /dev/nvidia-uvm
crw-rw-rw- 1 root root 503, 1 Dec 16 13:06 /dev/nvidia-uvm-tools
/dev/nvidia-caps:
total 0
cr-------- 1 root root 509, 1 Dec 16 13:06 nvidia-cap1
cr--r--r-- 1 root root 509, 2 Dec 16 13:06 nvidia-cap2
😕
root@proxmox-host:~# modprobe nvidia_drm
🤔
root@proxmox-host:~# cat /sys/module/nvidia_drm/parameters/modeset
N
🙁
root@proxmox-host:~# ls /dev/nvidia* -l
crw-rw-rw- 1 root root 194, 0 Dec 16 13:06 /dev/nvidia0
crw-rw-rw- 1 root root 194, 255 Dec 16 13:06 /dev/nvidiactl
crw-rw-rw- 1 root root 503, 0 Dec 16 13:06 /dev/nvidia-uvm
crw-rw-rw- 1 root root 503, 1 Dec 16 13:06 /dev/nvidia-uvm-tools
/dev/nvidia-caps:
total 0
cr-------- 1 root root 509, 1 Dec 16 13:06 nvidia-cap1
cr--r--r-- 1 root root 509, 2 Dec 16 13:06 nvidia-cap2
😠
Lots of uninstalling, reinstalling, removing, checking, validating, etc. and the thing I guess that helps was running nvidia-modprobe -m to have it create the modeset paths.
root@proxmox-host:~# nvidia-modprobe -h
nvidia-modprobe: version 580.119.02
This setuid program is used to create, in a Linux distribution-independent way, NVIDIA Linux
device files and load the NVIDIA kernel module, on behalf of NVIDIA Linux driver components
which may not have sufficient privileges to perform these actions on their own.
nvidia-modprobe [options]
-v, --version
Print the utility version and exit.
-h, --help
Print usage information for the command line options and exit.
-c MINOR-NUMBER, --create-nvidia-device-file=MINOR-NUMBER
Create the NVIDIA device file with the given minor number; this option can be specified
multiple times to create multiple NVIDIA device files.
-u, --unified-memory
Load the NVIDIA Unified Memory kernel module or create device files for it, instead of the
NVIDIA kernel module.
-m, --modeset
Load the NVIDIA modeset kernel module and create its device file.
-s, --nvswitch
Load the NVIDIA kernel module and create the NVSwitch device files for each minor number
specified using the -c flag.
-l, --nvlink
Load the NVIDIA kernel module and create the NVLink control device file.
-f NVIDIA-CAPABILITY-DEVICE-FILE, --nvidia-capability-device-file=NVIDIA-CAPABILITY-DEVICE-FILE
Create the NVIDIA capability device files with the given capability /proc file path. This
option can be specified multiple times to create multiple NVIDIA capability device files.
-a, --auto-online-movable
Enable the online_movable auto onlining kernel setting for platforms (like Grace Hopper)
that add and online GPU memory to the kernel
Changes were lost after a reboot, so I chuck it into a crontab job @reboot and I’m hopefully 🤞 done fighting that darn directory.
@reboot root /usr/bin/nvidia-modprobe -m
root@proxmox-host:~# ls /dev/nvidia* -l
crw-rw-rw- 1 root root 194, 0 Dec 16 13:21 /dev/nvidia0
crw-rw-rw- 1 root root 194, 255 Dec 16 13:21 /dev/nvidiactl
crw-rw-rw- 1 root root 194, 254 Dec 16 13:21 /dev/nvidia-modeset
crw-rw-rw- 1 root root 503, 0 Dec 16 13:21 /dev/nvidia-uvm
crw-rw-rw- 1 root root 503, 1 Dec 16 13:21 /dev/nvidia-uvm-tools
/dev/nvidia-caps:
total 0
cr-------- 1 root root 509, 1 Dec 16 13:21 nvidia-cap1
cr--r--r-- 1 root root 509, 2 Dec 16 13:21 nvidia-cap2
Troubleshooting Research & Related Links
- Add NVIDIA GPU to LXC container
- NVIDIA GPU access inside a Proxmox LXC
- Install NVIDIA Driver on Proxmox with Secure Boot
