Running Qemu/KVM with virio 3d enabled errors out

Hi,
I am trying to find a fix for this error:
Error starting domain: internal error: process exited while connecting to monitor: 2022-01-17T08:45:17.640206Z qemu-system-x86_64: egl: eglInitialize failed
2022-01-17T08:45:17.640271Z qemu-system-x86_64: Failed to initialize EGL render node for SPICE GL

Traceback (most recent call last):

Error starting domain: internal error: process exited while connecting to monitor: 2022-01-17T08:45:17.640206Z qemu-system-x86_64: egl: eglInitialize failed
2022-01-17T08:45:17.640271Z 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 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.10/site-packages/libvirt.py", line 1353, in create
    raise libvirtError('virDomainCreate() failed')
libvirt.libvirtError: internal error: process exited while connecting to monitor: 2022-01-17T08:45:17.640206Z qemu-system-x86_64: egl: eglInitialize failed
2022-01-17T08:45:17.640271Z qemu-system-x86_64: Failed to initialize EGL render node for SPICE GL

What i have now setup:

<video>
  <model type="virtio" heads="1" primary="yes">
    <acceleration accel3d="yes"/>
  </model>
  <address type="pci" domain="0x0000" bus="0x06" slot="0x00" function="0x0"/>
</video>
<graphics type="spice">
  <listen type="none"/>
  <image compression="off"/>
  <gl enable="yes" rendernode="/dev/dri/by-path/pci-0000:01:00.0-render"/>
</graphics>

If i choose the builtin amd graphics it works but not on nvidia

inxi -Faz:

System:
  Kernel: 5.16.0-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 11.1.0
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=dd20fef6-aa84-4d04-b72e-1235e5193f4c rw rootflags=subvol=@
    quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
    resume=UUID=151827a9-cff0-4eaf-80f2-dbed7f187123 loglevel=3
  Console: pty pts/1 wm: kwin_x11 DM: SDDM Distro: Garuda Linux
    base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 82EY v: IdeaPad Gaming 3 15ARH05
    serial: <filter> Chassis: type: 10 v: IdeaPad Gaming 3 15ARH05
    serial: <filter>
  Mobo: LENOVO model: LNVNB161216 v: NO DPK serial: <filter> UEFI: LENOVO
    v: FCCN16WW date: 01/05/2021
Battery:
  ID-1: BAT0 charge: 41.8 Wh (100.0%) condition: 41.8/45.5 Wh (91.8%)
    volts: 12.8 min: 11.4 model: Sunwoda L19D3PF4 type: Li-poly
    serial: <filter> status: Full cycles: 69
CPU:
  Info: model: AMD Ryzen 5 4600H with Radeon Graphics socket: FP6 bits: 64
    type: MT MCP arch: Zen 2 family: 0x17 (23) model-id: 0x60 (96) stepping: 1
    microcode: 0x8600104
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
    L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 3 MiB desc: 6x512 KiB
    L3: 8 MiB desc: 2x4 MiB
  Speed (MHz): avg: 3000 min/max: 1400/3000 boost: enabled
    base/boost: 3000/4000 scaling: driver: acpi-cpufreq governor: performance
    volts: 1.2 V ext-clock: 100 MHz cores: 1: 3000 2: 3000 3: 3000 4: 3000
    5: 3000 6: 3000 7: 3000 8: 3000 9: 3000 10: 3000 11: 3000 12: 3000
    bogomips: 71865
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional,
    IBRS_FW, STIBP: conditional, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA TU117M vendor: Lenovo driver: nvidia v: 495.46
    alternate: nouveau,nvidia_drm bus-ID: 01:00.0 chip-ID: 10de:1f99
    class-ID: 0300
  Device-2: AMD Renoir vendor: Lenovo driver: amdgpu v: kernel
    bus-ID: 05:00.0 chip-ID: 1002:1636 class-ID: 0300
  Device-3: IMC Networks Integrated Camera type: USB driver: uvcvideo
    bus-ID: 1-3:2 chip-ID: 13d3:56ff class-ID: 0e02
  Display: server: X.Org 1.21.1.3 compositor: kwin_x11 driver:
    loaded: modesetting,nvidia display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2")
    s-diag: 582mm (22.9")
  Monitor-1: eDP-1 res: 1920x1080 hz: 60 dpi: 142
    size: 344x193mm (13.5x7.6") diag: 394mm (15.5")
  OpenGL: renderer: AMD RENOIR (DRM 3.44.0 5.16.0-zen1-1-zen LLVM 13.0.0)
    v: 4.6 Mesa 21.3.4 direct render: Yes
Audio:
  Device-1: NVIDIA vendor: Lenovo driver: snd_hda_intel v: kernel
    bus-ID: 01:00.1 chip-ID: 10de:10fa class-ID: 0403
  Device-2: AMD Raven/Raven2/FireFlight/Renoir Audio Processor
    vendor: Lenovo driver: N/A
    alternate: snd_pci_acp3x, snd_rn_pci_acp3x, snd_pci_acp5x, snd_pci_acp6x
    bus-ID: 05:00.5 chip-ID: 1022:15e2 class-ID: 0480
  Device-3: AMD Family 17h HD Audio vendor: Lenovo driver: snd_hda_intel
    v: kernel bus-ID: 05:00.6 chip-ID: 1022:15e3 class-ID: 0403
  Sound Server-1: ALSA v: k5.16.0-zen1-1-zen running: yes
  Sound Server-2: JACK v: 1.9.20 running: no
  Sound Server-3: PulseAudio v: 15.0 running: no
  Sound Server-4: PipeWire v: 0.3.43 running: yes
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Lenovo driver: r8169 v: kernel port: 3000 bus-ID: 03:00.0
    chip-ID: 10ec:8168 class-ID: 0200
  IF: eno1 state: down mac: <filter>
  Device-2: Realtek RTL8822CE 802.11ac PCIe Wireless Network Adapter
    vendor: Lenovo driver: rtw_8822ce v: N/A modules: rtw88_8822ce port: 2000
    bus-ID: 04:00.0 chip-ID: 10ec:c822 class-ID: 0280
  IF: wlp4s0 state: up mac: <filter>
  IF-ID-1: virbr0 state: down mac: <filter>
Bluetooth:
  Device-1: Realtek Bluetooth Radio type: USB driver: btusb v: 0.8
    bus-ID: 3-3:2 chip-ID: 0bda:c123 class-ID: e001 serial: <filter>
  Report: bt-adapter ID: hci0 rfk-id: 2 state: up address: <filter>
Drives:
  Local Storage: total: 942.7 GiB used: 97.18 GiB (10.3%)
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Micron model: MTFDHBA512QFD
    size: 476.94 GiB block-size: physical: 512 B logical: 512 B
    speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: 0002P6LN
    temp: 43.9 C scheme: GPT
  SMART: yes health: PASSED on: 38d 7h cycles: 466
    read-units: 16,567,638 [8.48 TB] written-units: 12,586,166 [6.44 TB]
  ID-2: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 860 EVO 500GB
    family: based SSDs size: 465.76 GiB block-size: physical: 512 B
    logical: 512 B sata: 3.1 speed: 6.0 Gb/s type: SSD serial: <filter>
    rev: 2B6Q temp: 36 C scheme: GPT
  SMART: yes state: enabled health: PASSED on: 172d 5h cycles: 160
    written: 10.98 TiB
Partition:
  ID-1: / raw-size: 467.84 GiB size: 467.84 GiB (100.00%)
    used: 97.18 GiB (20.8%) fs: btrfs block-size: 4096 B dev: /dev/nvme0n1p2
    maj-min: 259:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 580 KiB (0.2%) fs: vfat block-size: 512 B dev: /dev/nvme0n1p1
    maj-min: 259:1
  ID-3: /home raw-size: 467.84 GiB size: 467.84 GiB (100.00%)
    used: 97.18 GiB (20.8%) fs: btrfs block-size: 4096 B dev: /dev/nvme0n1p2
    maj-min: 259:2
  ID-4: /var/log raw-size: 467.84 GiB size: 467.84 GiB (100.00%)
    used: 97.18 GiB (20.8%) fs: btrfs block-size: 4096 B dev: /dev/nvme0n1p2
    maj-min: 259:2
  ID-5: /var/tmp raw-size: 467.84 GiB size: 467.84 GiB (100.00%)
    used: 97.18 GiB (20.8%) fs: btrfs block-size: 4096 B dev: /dev/nvme0n1p2
    maj-min: 259:2
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 8.8 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/nvme0n1p3 maj-min: 259:3
  ID-2: swap-2 type: zram size: 7.2 GiB used: 2.18 GiB (30.2%)
    priority: 100 dev: /dev/zram0
Sensors:
  System Temperatures: cpu: N/A mobo: N/A gpu: amdgpu temp: 49.0 C
  Fan Speeds (RPM): N/A
Info:
  Processes: 379 Uptime: 2h 43m wakeups: 8 Memory: 7.2 GiB
  used: 4.05 GiB (56.2%) Init: systemd v: 250 tool: systemctl Compilers:
  gcc: 11.1.0 clang: 13.0.0 Packages: 1520 pacman: 1512 lib: 465 flatpak: 0
  snap: 8 Shell: fish (su) v: 3.3.1 running-in: tabby inxi: 3.3.11

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.