Recover /dev/dri?

DocMAX

Member
Jan 30, 2023
201
14
18
Bremen
Maybe it's a bit offtopic but from time to time /dev/dri disappears and my VMs have no hardware accelleration anymore.
In theory i though modprobe -r amdgpu; modprobe amdgpu should fix the problem but it does not.

Anyone knows how to recover /dev/dri without reboot?
 
Just found this funny entry:
Code:
Jan 15 21:18:25 pve pvedaemon[1247310]: ERROR: Backup of VM 113 failed - no DRM render node detected (/dev/dri/renderD*), no GPU? - needed for 'virtio-gl' display
why does backup need DRI?
 
Just found this funny entry:
Code:
Jan 15 21:18:25 pve pvedaemon[1247310]: ERROR: Backup of VM 113 failed - no DRM render node detected (/dev/dri/renderD*), no GPU? - needed for 'virtio-gl' display
why does backup need DRI?
Because QEMU backups starts the VM and the VM is configured with vitio-gl that uses the host GPU. This is the same issue as people have with PCI(e) passthrough of the same device to multiple VMs (not at the same time) and they want to backup while one of the VMs is running.

Maybe it's a bit offtopic but from time to time /dev/dri disappears and my VMs have no hardware accelleration anymore.
In theory i though modprobe -r amdgpu; modprobe amdgpu should fix the problem but it does not.
Do you start a VM with passthrough of the GPU (or a device in the same IOMMU group as the GPU)? Then amdgpu/snd_hda_intel is unbound and vfio-pci is bound automatically. WHen the VM is shut down, Proxmox does not do the reverse. You need to unbind vfio-pci from the GPU functions and bind amdgpu etc. yourself. There have been some threads on this forum about how to do that and how to automate it using a hookscript.
 
Ok, i need

Code:
echo 0000:06:00.0 > /sys/bus/pci/drivers/vfio-pci/unbind
echo 0000:06:00.0 > /sys/bus/pci/drivers/amdgpu/bind
echo 0000:06:00.1 > /sys/bus/pci/drivers/snd_hda_intel/bind

But i wonder what virgl has to do with vfio-pci?
Normaly just a virgl_test_server has to be started on host.

Also is there a example script in bash, not perl?
 
Ok, i need

Code:
echo 0000:06:00.0 > /sys/bus/pci/drivers/vfio-pci/unbind
echo 0000:06:00.0 > /sys/bus/pci/drivers/amdgpu/bind
echo 0000:06:00.1 > /sys/bus/pci/drivers/snd_hda_intel/bind
Don't you also need to unbind the audio ( echo 0000:06:00.1 > /sys/bus/pci/drivers/vfio-pci/unbind) first?
But i wonder what virgl has to do with vfio-pci?
Nothing, probably, unless you attempt to use the same GPU for both.
Normaly just a virgl_test_server has to be started on host.
Proxmox supports VirGL now (up to 512MB per VM): https://pve.proxmox.com/pve-docs/pve-admin-guide.html#qm_display
Also is there a example script in bash, not perl?
You can use a bash script as a hookscript. It does not need to be Perl. I think any Linux executable script will work.
 
> Don't you also need to unbind the audio ( echo 0000:06:00.1 > /sys/bus/pci/drivers/vfio-pci/unbind) first?

Yes of course, i forgot.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!