Black Screen with Spice and OpenGL acceleration in virt-manager with QEMU/KVM
Cole Robinson
crobinso at redhat.com
Wed May 6 22:56:15 UTC 2020
CCing Marc-André and Gerd, maybe they have ideas
- Cole
On 5/6/20 2:24 PM, Filip Banák wrote:
> Hi, thanks in advance.
>
> Only way I got it to work is with qemu on the command line like this:
>
> qemu-system-x86_64 -name Arch -drive file=/home/filip/VM/archlinux.qcow2
> -m 8192 -enable-kvm -M q35 -cpu host -smp
> 12,sockets=1,cores=12,threads=1 -display egl-headless,gl=on -usb -device
> usb-tablet -bios /usr/share/ovmf/x64/OVMF_CODE.fd -boot order=c -device
> virtio-vga,virgl=on -spice
> disable-ticketing,image-compression=off,seamless-migration=on,unix,addr=/run/user/1000/spice.sock
>
> remote-viewer --verbose --debug --spice-debug
> spice+unix:///run/user/1000/spice.sock
>
>
> I have checked the logs, and yes there were errors they are linked in
> the Manjaro forum thread, but here you go:
>
> https://pastebin.com/pehWEQ0L
>
> These are the errors at the bottom:
> qemu-system-x86_64: warning: Spice: dcc.c:664:dcc_push_monitors_config:
> monitors_config is NULL
> gl_version 33 - core profile enabled
> qemu_spice_gl_scanout_texture: failed to get fd for texture
>
> But like I said the VM works even like that but I can use it only
> blindly through the keyboard, because the screen is just black.
>
>
> Dňa st 6. 5. 2020, 20:14 Cole Robinson <crobinso at redhat.com
> <mailto:crobinso at redhat.com>> napísal(a):
>
> On 5/1/20 7:28 AM, Filip Banák wrote:
> > Hello.
> >
> > I just want to use an Arch Linux guest with OpenGL 3D acceleration on
> > with Spice.
> > It works with Spice when the OpenGL acceleration is disabled.
> > But when I enable it (with vitio graphics with accel3d yes of
> course), I
> > only see a black screen, but when the VM boots I can interact with it
> > through the keyboard blindly.
> > Please see my forum thread here for more:
> >
> https://forum.manjaro.org/t/qemu-kvm-vm-in-virt-manager-is-running-with-a-black-screen-when-opengl-acceleration-is-turned-on/138632
> >
> > I also tested all this:
> >
> > Working with no acceleration with Spice without gl=on in -display:
> > qemu-system-x86_64 -drive file=/home/filip/VM/archlinux.qcow2 -m 8192
> > -enable-kvm -M q35 -cpu host -smp 12,sockets=1,cores=12,threads=1
> > -display spice-app -usb -device usb-tablet -bios
> > /usr/share/ovmf/x64/OVMF_CODE.fd -boot order=c -device
> virtio-vga,virgl=on
> >
> >
> > Not working with Spice with gl=on in -display, remote-viewer closes
> > instantly:
> > qemu-system-x86_64 -drive file=/home/filip/VM/archlinux.qcow2 -m 8192
> > -enable-kvm -M q35 -cpu host -smp 12,sockets=1,cores=12,threads=1
> > -display spice-app,gl=on -usb -device usb-tablet -bios
> > /usr/share/ovmf/x64/OVMF_CODE.fd -boot order=c -device
> virtio-vga,virgl=on
> >
> > Error: qemu-system-x86_64: warning: Spice:
> > dcc.c:664:dcc_push_monitors_config: monitors_config is NULL
> >
> >
> > Probably Working with acceleration(just no graphical output) without
> > Spice with -display gtk,gl=on
> > qemu-system-x86_64 -drive file=/home/filip/VM/archlinux.qcow2 -m 8192
> > -enable-kvm -M q35 -cpu host -smp 12,sockets=1,cores=12,threads=1
> > -display gtk,gl=on -usb -device usb-tablet -bios
> > /usr/share/ovmf/x64/OVMF_CODE.fd -boot order=c -device
> virtio-vga,virgl=on
> >
> > No error just black screen.
> >
> >
> > Working with acceleration without Spice, just QEMU SDL:
> > qemu-system-x86_64 -drive file=/home/filip/VM/archlinux.qcow2 -m 8192
> > -enable-kvm -M q35 -cpu host -smp 12,sockets=1,cores=12,threads=1
> > -display sdl,gl=on -usb -device usb-tablet -bios
> > /usr/share/ovmf/x64/OVMF_CODE.fd -boot order=c -device
> virtio-vga,virgl=on
> >
> >
> > Working with with Spice with acceleration with EGL-HEADLESS, gl=on in
> > -display does not matter here, it is automatic/implied:
> > qemu-system-x86_64 -name Arch -drive
> file=/home/filip/VM/archlinux.qcow2
> > -m 8192 -enable-kvm -M q35 -cpu host -smp
> > 12,sockets=1,cores=12,threads=1 -display egl-headless,gl=on -usb
> -device
> > usb-tablet -bios /usr/share/ovmf/x64/OVMF_CODE.fd -boot order=c
> -device
> > virtio-vga,virgl=on -spice
> >
> disable-ticketing,image-compression=off,seamless-migration=on,unix,addr=/run/user/1000/spice.sock
> >
> > remote-viewer --verbose --debug --spice-debug
> > spice+unix:///run/user/1000/spice.sock
> >
> >
> > Working SDL with acceleration, also can connect with Spice but see
> black
> > screen but can use keyboard and mouse and see output on qemu sdl
> window:
> > qemu-system-x86_64 -name Arch -drive
> file=/home/filip/VM/archlinux.qcow2
> > -m 8192 -enable-kvm -M q35 -cpu host -smp
> > 12,sockets=1,cores=12,threads=1 -usb -device usb-tablet -bios
> > /usr/share/ovmf/x64/OVMF_CODE.fd -boot order=c -device
> > virtio-vga,virgl=on -spice
> >
> unix,addr=/run/user/1000/spice.sock,disable-ticketing,image-compression=off,seamless-migration=on
> > -display sdl,gl=on
> >
> >
> > Not working Remote Viewer opens but no output just "Connected to
> graphic
> > server" in the middle of the window.
> > qemu-system-x86_64 -name Arch -drive
> file=/home/filip/VM/archlinux.qcow2
> > -m 8192 -enable-kvm -M q35 -cpu host -smp
> > 12,sockets=1,cores=12,threads=1 -usb -device usb-tablet -bios
> > /usr/share/ovmf/x64/OVMF_CODE.fd -boot order=c -device
> > virtio-vga,virgl=on -spice
> >
> gl=on,unix,addr=/run/user/1000/spice.sock,disable-ticketing,image-compression=off,seamless-migration=on
> >
> > remote-viewer --verbose --debug --spice-debug
> > spice+unix:///run/user/1000/spice.sock
> >
> > I guess the problem when trying with virt-manager is the same as when
> > trying with -display spice-app,gl=on.
> >
> > Running on Manjaro linux with Nvidia GT630 graphics and Qemu
> version 4.2.
> > Any help is appreciated.
> > Thank you.
>
> I may not have followed all the details, but have you gotten it working
> with any setup via libvirt, or only with qemu on the command line? It
> could be libvirt is not granting access to all the needed host resources
> correctly, like the drm node path. Check
> /var/log/libvirt/qemu/$vmname.log and see if qemu prints and errors
>
> - Cole
>
- Cole
More information about the virt-tools-list
mailing list