I’m using libvirt to run qemu and have been trying to get GVT-G to work following this: Intel GVT-g - ArchWiki
I have a laptop with an i7-8750H CPU
, Intel CoffeeLake UHD Graphics 630 iGPU
and an Nvidia GeForce RTX 2060 dGPU
I managed to get it working with this:
<graphics type='spice'>
<listen type='none'/>
<gl enable='yes' rendernode='/dev/dri/by-path/pci-0000:00:02.0-render'/>
</graphics>
<video>
<model type='none'/>
</video>
However I face some struggles because of the setting that makes spice not listen for any connections, because I want to use looking glass which requires spice.
So, I decided to try the nvidia dmabuf route (my dGPU is nvidia) with these settings:
<graphics type='spice' autoport='yes'>
<listen type='address'/>
</graphics>
<graphics type='egl-headless'>
<gl rendernode='/dev/dri/by-path/pci-0000:00:02.0-render'/>
</graphics>
<video>
<model type='none'/>
</video>
However when I try that I get this error:
Error starting domain: internal error: qemu unexpectedly closed the monitor: 2021-10-05T13:32:34.135262Z qemu-system-x86_64: The console requires display DMABUF support.
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 65, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 101, in tmpcb
callback(*args, **kwargs)
File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 57, in newfn
ret = fn(self, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/object/domain.py", line 1329, in startup
self._backend.create()
File "/usr/lib/python3.9/site-packages/libvirt.py", line 1353, in create
raise libvirtError('virDomainCreate() failed')
libvirt.libvirtError: internal error: qemu unexpectedly closed the monitor: 2021-10-05T13:32:34.135262Z
qemu-system-x86_64: The console requires display DMABUF support.
I do not understand why I get this error, i tried using optimus manager to set the main gpu for the host to the nvidia dgpu, but it had no effect on the issue.