Score:0

How do I get 3D acceleration to work in virt-manager?

ao flag

I'm trying to get 3D acceleration to work in virt-manager, but no matter what guest I use in virt-manager, if I enable 3D acceleration, I get this error.

In the details of the error, it has this:

Error starting domain: internal error: process exited while connecting to monitor: 2023-04-14T06:53:32.967256Z qemu-system-x86_64: egl: eglInitialize failed
2023-04-14T06:53:32.967390Z qemu-system-x86_64: Failed to initialize EGL render node for SPICE GL

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 72, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 108, 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 1384, in startup
    self._backend.create()
  File "/usr/lib/python3/dist-packages/libvirt.py", line 1353, in create
    raise libvirtError('virDomainCreate() failed')
libvirt.libvirtError: internal error: process exited while connecting to monitor: 2023-04-14T06:53:32.967256Z qemu-system-x86_64: egl: eglInitialize failed
2023-04-14T06:53:32.967390Z qemu-system-x86_64: Failed to initialize EGL render node for SPICE GL

Here are the settings I have configured for my virt-manager instance:

Video:

<video>
  <model type="virtio" heads="1" primary="yes">
    <acceleration accel3d="yes"/>
  </model>
  <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0"/>
</video>

Graphics Type:

<graphics type="spice">
  <listen type="none"/>
  <image compression="off"/>
  <gl enable="yes" rendernode="/dev/dri/by-path/pci-0000:05:00.0-render"/>
</graphics>

What does egl: eglInitialize failed and Failed to initialize EGL render node for SPICE GL mean? How do I fix this error? And why does this occur? Am I missing something important?

And just to confirm, I have checked to see if I've got virtualisation enabled in GRUB with the grep CMDLINE_LINUX_DEFAULT /etc/default/grub command, and yes I do:

GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt splash"

The GPU I'm using for the host machine is NVIDIA GeForce GTX 950, with the latest proprietary nvidia driver installed. And it is the only GPU I have.

I've even tried running DRI_PRIME=1 virt-manager, but it doesn't work.

I've even looked everywhere for this error, and even looked here and here.

I've even looked here, but that solution didn't work.

How do I get 3D acceleration to work in virt-manager?

David avatar
cn flag
What is the version of Ubuntu you are using?
Platinum Lucario avatar
ao flag
22.04.2 LTS is the version I'm using, latest LTS release. Memory is 16.0 GiB, processor is Intel® Core™ i3-6100 CPU @ 3.70GHz × 4.
TDiblik avatar
rs flag
Hi, been trying to fix this for a while, but always came to the conclusion that it's not supported by Nvidia. You could theoretically try it with mesa drivers, but I haven't tried that since I'm using software which requires close sourced drivers. Anyways, if you find a solution, please let me know!
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.