All merged.
As for the disappointing performance…
Maybe we’re still having the wrong QEMU command line? (Because our libvirt XML files configuration files might be non-ideal.)
Quote QEMU - ArchWiki
virtio-vga/virtio-gpuis a paravirtual 3D graphics driver based on virgl. It’s mature, currently supporting only Linux guests with mesa compiled with the optiongallium-drivers=virgl.To enable 3D acceleration on the guest system, select this vga with
-device virtio-vga-gland enable the OpenGL context in the display device with-display sdl,gl=onor-display gtk,gl=onfor the SDL and GTK display output respectively. Successful configuration can be confirmed looking at the kernel log in the guest:
To check
sudo dmesg | grep drm
[drm] pci: virtio-vga detected
[drm] virgl 3d acceleration enabled
Note: DRM is referring to Direct Rendering Manager. Unrelated to Digital Restrictions Management.
So instead of SPICE we might need to use in QEMU terms:
-display sdl,gl=onor-display gtk,gl=on
We also might need to use:
-device virtio-vga-gl,- or similar.
This yet has to be translated to our XML configuration files.
SDL might be faster but comes with some disadvantages such as a lack of copy/paste feature, window not scrollable, presumably no automatic window resize, presumably no seamless entering/leaving with key/mouse of the VM window.
Source: Features/GtkDisplayState - QEMU
(I don’t know if this information is outdated. Perhaps SDL has been improved since and that wiki page being outdated.)
GTK might have better features.
source: GTK GUI for QEmu
Performance same, slower than SDL? Negligible difference? Needs testing.
So in our configuration we might need to remove:
<graphics type='spice' autoport='yes'>
The following might work.
<!-- Graphics settings -->
<graphics type='sdl'>
<listen type='none'/>
<clipboard copypaste='no'/>
<filetransfer enable='no'/>
<gl enable='yes'/>
</graphics>
<!-- Video settings -->
<video>
<model type='virtio' heads='1' primary='yes'>
<acceleration accel3d='yes'/>
</model>
</video>
Untested.
Please test.
I couldn’t find gtk in libvirt configuration manual. Maybe it’s undocumented. Maybe a simple
<graphics type='gtk'>
would work.
Otherwise, we could also use manual QEMU command line:
<qemu:commandline>
<qemu:arg value='-display'/>
<qemu:arg value='sdl,gl=on'/>
</qemu:commandline>
Host (User side) wont show except CPU iGPU so KVM VMs and host will get:
OpenGL renderer string: llvmpipe
Instead of:
OpenGL renderer string: virgl
Which means its not working.
After really deep investigation about this issue it turned out its a debian stable issue. How i reached to this:
- KS as a host + Whonix = Doesnt work

- KS as a host + Debian LXQt Stable = Doesnt work

- KS as a host + Debian Gnome Stable = It works!

- KS as a host + Debian LXQt testing = It works!


and LXQt upstream say:
<!--- Dear users of stable and LTS (Long Term Service) distributions: --->
<!--- Please do NOT file bugs against outdated versions of LXQt --->
<!--- components, which such distributions likely use; instead, use your --->
<!--- distribution's bugtracker.
And debian stable doesnt push fixes if they are not security ones.
So basically 3D acceleration in Whonix wont work for up to 4-5 years from now (until new debian release).
But here is the workaround, which is inserting your dGPU to Whonix-Workstation, i added that to the wiki (probably nobody explained it on the internet like this before to my awareness):