VM with GPU passthrough freezes when turning off monitor after proxmox 6.2 upgrade

freebeerz

Renowned Member
Aug 5, 2015
11
2
68
Hi,

Setup:
- upgraded from Promox 6.1 to 6.2
- Linux VM: Fedora 32 with GPU passthrough (AMD Sapphire 280x) => worked fine with Proxmox 6.1
- One monitor with integrated USB hub (keyboard + mouse) plugged into the GPU and USB devices passed through to the VM

I have a very weird bug with the new qemu 5.0 in proxmox 6.2:

When I electrically turn off the monitor by using a switch on the power socket, the VM freezes instantly. No pings. Nothing in dmesg or journalctl. When I turn the screen back on, the picture is frozen to whatever was displayed before. Mouse and keyboard don't work.
I can kill the frozen VM with "qm stop" (it has to do a SIGKILL)

If I just put the screen in standby I don't get any freeze.

Maybe it's the GPU or it could be an issue with the USB devices disappearing suddenly (on standby the hub is still powered)...

In any case, I rolled back to pve-qemu-kvm 4.2.0-1 (apt-get install pve-qemu-kvm=4.2.0-1) and I don't get this issue anymore.

So this feels like some sort of regression in qemu 5...

If anyone has any idea how to debug this issue further? Any qemu logs I could find somewhere?

Thanks!
 
Last edited:
mhmm just to clarify:

M freezes instantly. No pings. Nothing in dmesg or journalctl.
from the host or the guest?
what does the other side say (guest/host depending on which does not show anything)

In any case, I rolled back to pve-qemu-kvm 4.2.0-1 (apt-get install pve-qemu-kvm=4.2.0-1) and I don't get this issue anymore.
seems weird because qemu is not really involved in this at all.... (besides the passgthrough it does not interfere with the gpu<->monitor communication at all; how should it)
 
from the host or the guest?
what does the other side say (guest/host depending on which does not show anything)


seems weird because qemu is not really involved in this at all.... (besides the passgthrough it does not interfere with the gpu<->monitor communication at all; how should it)

Only the guest instantly freezes. The host is fine, but it takes a SIGKILL to kill the kvm process.

As I said the monitor has a USB hub that I use for my mouse/keyboard and which is passed through with usb redirection. When I turn off the monitor at the power socket, the hub obviously disappears instantly, so maybe it's this which makes the VM freeze (it doesn't freeze if the monitor is on standby).

I didn't have time to test any further scenarios, like moving my mouse/keyboard to the motherboard USB ports.

In any case I found absolutely nothing in the logs, both guest and host.

A simple rollback of the qemu package to v4.2 fixed the freeze, so I guessed it must be a qemu issue.
 
you could try running qemu in the foreground (by using the command from 'qm showcmd ID' and removing the 'daemonize' option) and see
if there is anything in the output of it...
 

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!