gtk with virtio and opengl black screen

Bug #1898490 reported by Ethan
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Expired
Undecided
Unassigned

Bug Description

qemu-system-x86_64 -name manjaro -enable-kvm -cpu host -smp cores=4,threads=1 -M q35 -m 8G -cdrom /mnt/Storage/ISO/manjaro-gnome-20.0.3-minimal-200606-linux56.iso -machine type=pc,accel=kvm -vga virtio -display sdl,gl=on Boots properly and has working 3d acceleration with virgl.

Running qemu-system-x86_64 -name manjaro -enable-kvm -cpu host -smp cores=4,threads=1 -M q35 -m 8G -cdrom /mnt/Storage/ISO/manjaro-gnome-20.0.3-minimal-200606-linux56.iso -machine type=pc,accel=kvm -vga virtio -display gtk,gl=on however, (difference being gtk instead of sdl), the screen is black, and the vm still starts.

System Specs
Gentoo Linux 64bit
Gentoo-Sources 5.8.13 Kernel
Qemu 5.10.0-r1 compiled with USE="aio bzip2 caps curl fdt filecaps gtk jpeg ncurses nls opengl oss pin-upstream-blobs png pulseaudio sdl seccomp slirp spice usb usbredir vhost-net virgl vnc xattr xkb" PYTHON_TARGETS="python3_7" QEMU_SOFTMMU_TARGETS="x86_64" QEMU_USER_TARGETS="x86_64"

Ryzen 7 2700x
Nvidia 1070ti GPU

I can confirm the same issue when using libvirt with opengl.

Revision history for this message
Ethan (ethannij) wrote :
Revision history for this message
none none (noneenon) wrote :

I am having the same issue. Tested on Xubuntu 20.10 (qemu 5.0) and ArchLinux (qemu 5.2).

Furthermore, SDL is broken too: In principle I get some output with SDL but its broken and not very usable. After some time (after starting the Desktop Env. - as far as I can tell), the screen also turns black as with GTK.

When redirecting IO to stdio I get the following error message:

## opengl error ##
gl_version 45 - core profile enabled
vrend_renderer_fill_caps: Entering with stale GL error: 1280
GLSL feature level 430

## startup command ##
qemu-system-x86_64 \
-serial stdio \
-m 8G \
-enable-kvm \
-vga virtio \
-display gtk,gl=on \
-machine q35 \
-cpu host \
-bios /usr/share/OVMF/x64/OVMF_CODE.fd \
-boot order=d \
-drive file=test.img,format=raw \
-cdrom /media/os/xubuntu-20.10-desktop-amd64.iso

## hardware of host ##
ryzen 3700x on b450 chipset
geforce 1060 with latest nvidia drivers

Revision history for this message
none none (noneenon) wrote :

When setting "-display gtk,gl=off" things work for GTK and SDL.

## startup command ##
qemu-system-x86_64 \
-serial stdio \
-m 8G \
-enable-kvm \
-vga none -device virtio-vga,virgl=on \
-display sdl,gl=off \
-machine q35 \
-cpu host \
-bios /usr/share/OVMF/x64/OVMF_CODE.fd \
-boot order=d \
-drive file=test.img,format=raw \
-cdrom /media/os/xubuntu-20.10-desktop-amd64.iso

Revision history for this message
Paul Donohue (s-launchpad-paulsd-com) wrote :

The problem is that Xfwm's built-in compositor and virgl don't play nice together.

Work-around: Boot the VM with virgl=off (on the video device) or gl=off (on the display), run xfwm4-tweaks-settings in the VM, select the "Compositor" tab, and uncheck "Enable display compositing". Then shut down the VM and re-enable virgl.

picom works with Xfwm and doesn't seem to have the same issues, so if you want a compositor, install/use picom in the VM instead of using Xfwm's built-in compositor: https://wiki.archlinux.org/index.php/Picom

Revision history for this message
Thomas Huth (th-huth) wrote :

The QEMU project is currently moving its bug tracking to another system.
For this we need to know which bugs are still valid and which could be
closed already. Thus we are setting the bug state to "Incomplete" now.

If the bug has already been fixed in the latest upstream version of QEMU,
then please close this ticket as "Fix released".

If it is not fixed yet and you think that this bug report here is still
valid, then you have two options:

1) If you already have an account on gitlab.com, please open a new ticket
for this problem in our new tracker here:

    https://gitlab.com/qemu-project/qemu/-/issues

and then close this ticket here on Launchpad (or let it expire auto-
matically after 60 days). Please mention the URL of this bug ticket on
Launchpad in the new ticket on GitLab.

2) If you don't have an account on gitlab.com and don't intend to get
one, but still would like to keep this ticket opened, then please switch
the state back to "New" or "Confirmed" within the next 60 days (other-
wise it will get closed as "Expired"). We will then eventually migrate
the ticket automatically to the new system (but you won't be the reporter
of the bug in the new system and thus you won't get notified on changes
anymore).

Thank you and sorry for the inconvenience.

Changed in qemu:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for QEMU because there has been no activity for 60 days.]

Changed in qemu:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.