Visual corruption regression with driver version 570 in QEMU with virgl GPU acceleration

QEMU with virgl GPU acceleration works fine with driver version 535. However, newer driver version appears to introduce visual corruption regression to this usage scenario.

People reported this issue at the virgl issue tracker:

Now that I confirm the issue is a regression in recent driver release, it should be a better idea to discuss it here.

The environment where I run into this issue:

  • Qemu 9.2.1/10.0
    • Guest: Debian 12 liveCD / BlissOS liveCD (more visible in the later)
  • virglrenderer 1.1.0
  • Driver version 570.133.2 (actually I suspect 535 is the last known good version)

I used the following command line to launch the QEMU VM (for unknown reason, the last two knobs matters)

qemu-system-x86_64 -enable-kvm -M q35 -m 6000 -smp 3 -cpu host -bios /usr/share/ovmf/OVMF.fd -drive file=blissos.img,format=raw,if=virtio -audio pa,model=virtio -device virtio-tablet -device virtio-keyboard -device qemu-xhci,id=xhci -machine vmport=off -device virtio-vga-gl -display sdl,gl=on -net nic,model=virtio-net-pci -net user,hostfwd=tcp::4444-:5555 -parallel none -serial none

I have the same issue.

Yes it has been this way for a long time. I remember it used to work very nicely with Nvidia and then at some point it became glitchy. I had imagined it was changes in the Nvidia driver that caused this which was a shame, but I was not going to go back to old drivers just for this.

I remember reading somewhere here whilst looking about this issue that running with virgl is unsupported by Nvidia and that it is therefore unlikely ever to be addressed, but who knows.

I do find it interesting that the graphical corruption varies across desktop environments inside a VM running with virtio/virgl with an Nvidia card in host. I switched around when KDE Plasma became terribly bad with this glitching, and have also played around on BlissOS as you quote, where it is horribly bad to, pretty much unusable.

I am now using System76’s Cosmic as a desktop environment in my testing VM with above mentioned setup, and the visual glitches, whilst still present, rarely happen at all, just an observation I find interesting.