Can you use gl accelerated spice with egl-headless display in qemu?

I’ve got this:

    <graphics type='spice'>
      <listen type='none'/>
    </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>

To use my nvidia gpu for virgl in my qemu vm in libvirt. And it works (so long as the nvidia rendering device is listed in cgroups).

However that’s somewhat of a moot point because I cannot enable 3d acceleration for spice.

So even if my virgl performance is better, it’s a bit of a moot point if spice isn’t gl enabled because it makes viewing anyting in the VM laggy as hell.

Is there any way around this issue?

I tried setting the rendermode for gl enablement in spice to the one used for egl-headless, but it didn’t work (probably cuz it’s not an egl-headless type).

There is no way in hell turok 2 uses vulkan it was made in 1998 lol. Seems like it’s possible now since this guy managed to do it in the vid.

I just came across on how to configure headless-egl and also across your post, thought I would share it :slight_smile: However that doesn’t mean if you do it this way you can run modern games in a vm. I think Nvidia needs to still to work on some features for that the be a possibility to have part of your gpu assigned to a vm and the other part to your host.

I was able to use headless egl with nvidia gpu the problem was accelerating spice so i wouldn’t peak at like 15fps because software spice is garbage.

1 Like