I run an Opensuse Leap 15.2 system with a variety of KVM/Qemu VMs. With QXL or virtio video devices and Spice. Remotely with remote-viewer+TLS and virt-viewer + SSH. Locally on the host via sockets. But all without OpenGL acceleration.
My graphics card is a Nvidia 960GTX. I use the proprietary drivers from the Opensuse Nvidia community repository. I know that Nvidia does not support QBM. So, a pure Virgl3D approach with Spice will probably not work on the KVM/Qemu host.
However: There are reports on the Internet that people got virgl3D rendering to work for Ubuntu systems with an EGL-display added in addition to Spice. [FONT=monospace] See e.g. https://nyblnet.blogspot.com/2020/11/virgl-3d-acceleration-on-kvm-with.html[/FONT]
I tried to get a similar configuration running on Leap 15.2. So far, I had no success - neither with Opensuse Leap 15.1 guests, nor with present Kali guests.
The libvirt XML configuration for a guest contains something like
<graphics type='spice’keymap=‘de’>
<listen type=‘socket’socket=’/opt/spices/spice.socket’/>
<image compression=‘off’/>
<gl enable=‘no’/>
</graphics>
<graphics type=‘egl-headless’>
<gl rendernode=’/dev/dri/renderD128’/>
</graphics>
<video>
<model type='virtio’heads='1’primary=‘yes’>
<acceleration accel3d=‘yes’/>
</model>
<address type='pci’domain='0x0000’bus='0x00’slot='0x01’function=‘0x0’/>
</video>
As described by Ubuntu users[FONT=monospace]. The render device access rights were set to 666 for tests. I tried with and without KMS mode enabled for the Nvidia drivers on the host.
For [FONT=monospace]an Opensuse Leap guest I get the following information regarding “drm”: .[/FONT]
[/FONT]
[FONT=monospace]linux-h07l:~ # dmesg | grep -i drm
3.088710] drm] pci: virtio-vga detected at 0000:00:01.0
3.088712] fb: switching to virtiodrmfb from VESA VGA
3.091091] drm] virgl 3d acceleration enabled
3.103862] drm] number of scanouts: 1
3.103868] drm] number of cap sets: 1
3.116995] drm] cap set 0: id 1, max-version 1, max-size 308
3.223562] virtio_gpu virtio0: fb0: virtiodrmfb frame buffer device
3.336792] drm] Initialized virtio_gpu 0.0.1 0 for virtio0 on minor 0
However, on the Spice console (virt-manager or remote-viewer) on the host I get the grub menu after that a blinking corsor on a black screen - but after that the sddm login screen does not appear. Only a white ring on a black background.
glxinfo on the guest starts with
[/FONT]
[FONT=monospace]linux-h07l:~ # glxinfo
name of display: localhost:10.0
libGL error: failed to load driver: swrast
Error: couldn’t find RGB GLX visual or fbconfig
132 GLX Visuals
visual x bf lv rg d st colorbuffer sr ax dp st accumbuffer ms cav
id dep cl sp sz l ci b ro r g b a F gb bf th cl r g b a ns b eat
0x021 24 tc 0 24 0 r y . 8 8 8 0 . s 4 24 8 16 16 16 16 0 0 None
0x022 24 dc 0 24 0 r y . 8 8 8 0 . s 4 24 8 16 16 16 16 0 0 None
As said, without the EGL-interface the configuration works perfectly for all guests - but without OpenGL acceleration.
Before I invest more time:
Has anybody out there succeeded with KVM/Qemu, Spice, EGL and virgl3D to get OpenGL accelerated on an Nvidia graphics card on an Opensuse Leap 15.2 KVM/Qemu host?
If so: For what guests and what kind of configuration?
Thank you in advance for your answers.
Regards,
Ralph
[/FONT]