Hi, I’ve struggled to use virtual machines with hardware acceleration via the proprietary Nvidia drivers for the entirety of the 500 driver series (I think the latest time this worked was with the 470-series drivers).

I’m using virt-manager 4.1 and KVM to run Linux guest VMs on a Linux host. Every attempt at enabling 3d acceleration for Linux guests has resulted in the following error message:

Error starting domain: internal error: process exited while connecting to monitor: 2025-01-03T20:05:04.310608Z qemu-system-x86_64: egl: eglInitialize failed: EGL_NOT_INITIALIZED
2025-01-03T20:05:04.310679Z qemu-system-x86_64: egl: render node init failed

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 1402, in startup
self._backend.create()
File “/usr/lib/python3/dist-packages/libvirt.py”, line 1379, in create
raise libvirtError(‘virDomainCreate() failed’)
libvirt.libvirtError: internal error: process exited while connecting to monitor: 2025-01-03T20:05:04.310608Z qemu-system-x86_64: egl: eglInitialize failed: EGL_NOT_INITIALIZED
2025-01-03T20:05:04.310679Z qemu-system-x86_64: egl: render node init failed

Using the open-source nouveau drivers, this configuration works as expected. However, it always breaks when I try to use Nvidia’s proprietary Linux drivers. Has anyone else had this issue?

Software:

  • Ubuntu 24.04.1 LTS (Linux kernel 6.8.0-51-generic)
  • Nvidia driver 565.77 via Proprietary GPU Drivers : “Graphics Drivers” team (I’ve been trying just about every driver in the 5XX series, they’ve all given the same error)
  • I’ve tried both the X11 and Wayland stacks that ship w/ Ubuntu
  • virt-manager 4.1 w/ the following config:
    • Video model: virtio w/ 3d acceleration enabled
    • Display type: Spice server w/ OpenGL enabled

Hardware:

  • Nvidia RTX 4080 (single display, 4k @ 60hz)
  • AMD Ryzen 7900X w/ 32 GB of RAM

Same issue here.
On Arch 6.12.10, 565.77-12 driver, 5.0.0-1 virt manager running a Fedora VM. Looking forward to a solution.

Same issue with NixOS unstable

HW accel relies on virglrender/Venuswhich to the best of my knowledge only works as part of mesa, which you don’t have access to after installing the driver, but nouveau does.

The only way I know of to get it with NV drivers is through passthrough, either an extra card or some hackery.

https://wiki.archlinux.org/title/QEMU/Guest_graphics_acceleration

I’ve never been able to do Spice with OpenGL with NVIDIA drivers. Neither with 470 nor with any other version. Are you sure you’ve seen Spice with OpenGL work on 470?

The only configuration that brings virtual GL into the guest with NVIDIA drivers has always been a separate EGL (headless) display for 3D rendering for me:

    <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>

Just wanted to add as a data point that the situation is the same with Nvidia open source driver:

  • Arch Linux x86_64
  • kernel 6.13.5-arch1-1
  • NVIDIA Corporation TU117GLM [T1200 Laptop GPU]
  • nvidia-open 570.124.04-2
  • nvidia-utils 570.124.04-1

Fortunately for me this is a hybrid/Optimus laptop, so in the Spice device configuration panel in virt-manager, instead of “Auto” I can select my Intel iGPU and then the VMs boot normally.

Same here:

  • Fedora 6.13.8-200.fc41.x86_64
  • NVIDIA 570.133.07
Error starting domain: internal error: process exited while connecting to monitor: 2025-03-26T21:38:30.571692Z qemu-system-x86_64: egl: eglInitialize failed: EGL_NOT_INITIALIZED
2025-03-26T21:38:30.571856Z qemu-system-x86_64: egl: render node init failed

Same here:
OS: Gentoo Linux x86_64
Kernel: Linux 6.12.16-gentoo-dist
GPU: NVIDIA GeForce RTX 3060 Mobile (proprietary)
Driver version: 570.124.04

Error:
‘internal error: process exited while connecting to monitor: 2025-04-01T23:49:17.350920Z qemu-system-x86_64: egl: eglInitialize failed: EGL_NOT_INITIALIZED
2025-04-01T23:49:17.351168Z qemu-system-x86_64: egl: render node init failed’

Traceback (most recent call last):
File “/usr/share/virt-manager/virtManager/asyncjob.py”, line 71, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File “/usr/share/virt-manager/virtManager/createvm.py”, line 2008, in _do_async_install
installer.start_install(guest, meter=meter)
File “/usr/share/virt-manager/virtinst/install/installer.py”, line 726, in start_install
domain = self._create_guest(
^^^^^^^^^^^^^^^^^^^
File “/usr/share/virt-manager/virtinst/install/installer.py”, line 667, in _create_guest
domain = self.conn.createXML(initial_xml or final_xml, 0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.12/site-packages/libvirt.py”, line 4545, in createXML
raise libvirtError(‘virDomainCreateXML() failed’)
libvirt.libvirtError: internal error: process exited while connecting to monitor: 2025-04-01T23:49:17.350920Z qemu-system-x86_64: egl: eglInitialize failed: EGL_NOT_INITIALIZED
2025-04-01T23:49:17.351168Z qemu-system-x86_64: egl: render node init failed

I am encountering the same error while using QEMU/KVM on Ubuntu 24.04 with a GeForce GTX 3060 GPU.

Same error with QEMU/KVM on Ubuntu 24.04 with a GeForce GTX 4060 (driver: 570.133.07).
Feedback > Feature Requests Graphics / Linux > Linux Is there any plan to address this limitation? I have more displays than available graphics cards in this Linux setup, so PCIe passthrough isn’t a viable option.

I also have the exact same issue here, Linux mint and a rtx 5090. I cant use the nouveau driver because i need the native performance for blender. But i also need a performant Windows VM for Adobe apps…

Same here and using nvidia Linux driver 595.58.03 with Ubuntu 24.04 LTS.. I have no errors if using the onboard intel graphics card but my 5070 just can not work. Should I return my 5070 and get a cheaper Intel one?

I am also having the same issue on a GTX 1080 (Pascal series card) on Arch Linux

Thanks. It worked for me with a bit of modifications for my setup which has two graphics cards. The first is an integrated AMD Radeon and the second is a discrete Nvidia 3070:

0: Integrated graphics card Radeon

1: Nvidia 3070 Graphics card

So, using Virt-Manager replace graphics “Display Spice” configuration with this

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

Then, add a second graphics device and replace its configuration with this:

<graphics type="egl-headless">
  <gl rendernode="/dev/dri/renderD128"/>
</graphics>

Use for “Video” device configuration this:

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

After that, the virtual machine booted successfully to Fedora KDE

@zooey @mihnerts I just tried this with a Fedora VM with Virt-Manager and while I do get fancy desktop effects and KInfoCenter does show that I am using virgl, the feeling of moving windows around still feels slow to me just like it felt when it was using llvmpipe. Are you getting fast desktop performance or does it still feel non-native to you?

Does SPICE itself also need some kind of hardware acceleration?

Setup by @mihnerts only works in user session QEMU, but gives a really bad viewer performance. In system mode, it gives EGL_NOT_INITIALIZED error.