Passing through a 5090 here, and was experiencing similar reset-bug-type issues:
Host:
- Linux (Debian 12, XFCE)
Guests:
- Windows 11 VM: no issues at all
- Linux (Debian 12, XFCE) VM: shutting down the VM crashes the host
The ONLY thing that fixed it 100% on my system was to disable the nvidia-drm modeset option on the VM:
- Edit /etc/modprobe.d/nvidia-modeset.conf and set ‘options nvidia-drm modeset=0’ (or just add .BAK to the filename of the conf file itself).
- Make sure the nvidia-drm modeset option is not activated by any other conf files anywhere else (typically in ‘/etc/X11/xorg.conf.d’ or ‘/usr/share/X11/xorg.conf.d’).
- Create a new conf file in /usr/share/X11/xorg.conf.d to manually set the X device driver, which need only be as basic as:
Section “Device”
Identifier “MyDevice”
Driver “nvidia”
EndSection
Section “Screen”
Identifier “MyScreen”
Device “MyDevice”
EndSection
- Don’t forget to update-initramfs -u
This completely fixed things on my system: rock solid now and no more lockups. But I am running X11 on the VM, and I seem to remember that having the modesetting option enabled is a dependency for wayland, so not sure if this will work there. Note I’m on Debian 12, but I imagine the same fix should work on Proxmox.
I tried lots of other things first, NONE of which seem to make ANY difference on my system:
- Flashed the 5090 firmware with NVIDIA GPU UEFI Firmware Update Tool v2.0 (it’s not only for 5060, but really for any 5 series).
- Installed various versions of the NVidia linux driver on the host (turns out none are needed).
- Blacklisted (and otherwise messed around with) the NVidia Audio Device (think that’s a red herring).
- Tried various hyperv flags.
- Tried various kernels on the host.
- Tried various kernel flags (pci=realloc=off, etc).
- Hook scripts to attach/detach the GPU instead of vfio-pci or pci-stub.
- Messed around with various combinations in the host BIOS (CSM, ROM BAR, SRV-IO).
So I’ve ruled most of those things out.