Corrupted output when using Iris with qemu+spice+virgl in headed mode
Summary: Trying to use accelerated graphics in qemu with spice backed by video card using Iris in headed mode results in corrupted output.
System:
- kernel: 6.3.2
- mesa: 23.1.0
- xorg: 21.1.8
- qemu: 8.0.0
- virglrenderer: 0.10.4
- spice-gtk: 0.42
- spice-protocol: 0.14.4
Hardware:
Intel Arc A380 (i915,modesetting,iris)
Reproduction:
Terminal nr.1:
qemu-system-x86_64 \
-accel kvm \
-m 128 \
-device virtio-vga-gl \
-spice unix=on,addr=/tmp/vm_spice.socket,disable-ticketing=on,gl=on,rendernode=/dev/dri/card0
Terminal nr2:
spicy --uri=spice+unix:///tmp/vm_spice.socket
Result:
Working alternatives:
- Without spice:
qemu-system-x86_64 \
-accel kvm \
-m 128 \
-device virtio-vga-gl \
-display gtk,gl=on
- Headless:
2.1 Terminal nr1:
qemu-system-x86_64 \
-accel kvm \
-m 128 \
-device virtio-vga-gl \
-display egl-headless,rendernode=/dev/dri/card0 \
-spice unix=on,addr=/tmp/vm_spice.socket,disable-ticketing=on
2.2 Terminal nr2:
spicy --uri=spice+unix:///tmp/vm_spice.socket
Normally, I would report this to spice developers at first, however there were similar issues in the past, and they ended being labelled as mesa problems. Also, previously I was using AMD RX560 card (until 2022-12) in similar way, and there was no corruption, which was instantly observable after switching to Intel Arc A380, and this hints to driver stack issue.
Edited by Žilvinas Žaltiena