QEMU virtual machine shuts down automatically

I am trying to run a Windows 10 virtual machine with single gpu passthrough using QEMU. However, when starting the machine it hangs for a few seconds and then returns to my fedora desktop.

Here is the log from cat /var/log/libvirt/qemu/win10.log:

(...)

vga,id=video0,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=16,max_outputs=1,bus=pcie.0,addr=0x1 \
-device ich9-intel-hda,id=sound0,bus=pcie.0,addr=0x1b \
-device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0,audiodev=audio1 \
-chardev spicevmc,id=charredir0,name=usbredir \
-device usb-redir,chardev=charredir0,id=redir0,bus=usb.0,port=2 \
-chardev spicevmc,id=charredir1,name=usbredir \
-device usb-redir,chardev=charredir1,id=redir1,bus=usb.0,port=3 \
-device virtio-balloon-pci,id=balloon0,bus=pci.4,addr=0x0 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
char device redirected to /dev/pts/0 (label charserial0)
qxl_send_events: spice-server bug: guest stopped, ignoring
2022-04-16T10:37:50.237329Z qemu-system-x86_64: terminating on signal 15 from pid 11967 (<unknown process>)
2022-04-16 10:37:51.067+0000: shutting down, reason=shutdown
2022-04-16 16:49:16.422+0000: shutting down, reason=failed
2022-04-16 16:58:27.756+0000: shutting down, reason=failed
2022-04-16 17:01:17.221+0000: shutting down, reason=failed
2022-04-16 17:03:56.212+0000: shutting down, reason=failed
2022-04-16 17:06:43.917+0000: shutting down, reason=failed
2022-04-16 17:11:08.869+0000: shutting down, reason=failed
2022-04-16 17:23:57.853+0000: shutting down, reason=failed

The interesting parts are these last two lines:

  • qxl_send_events: spice-server bug: guest stopped, ignoring

  • 2022-04-16T10:37:50.237329Z qemu-system-x86_64: terminating on signal 15 from pid 11967 (<unknown process>)

More information would be nice:

Which Fedora version do you use? 35, 36, …? I assume it is x86_64 architecture? Which kernel do you use? The Fedora version, architecture and the kernel can be seen with uname -r

Could you also show the system journal of the very moment? Repeat the failure, and immediately after that, get the output of journalctl --since "2 minutes ago"

Just to exclude any configuration issue: do you have passthrough enabled in the grub configuration? The kernel has to be started with the parameter intel_iommu=on (Intel) or iommu=pt iommu=1 (AMD). Also, you have to have VT-d enabled in the BIOS (and of course, the hardware has to support VT-d).

But generally, does the virtual machine work if there is no passthrough device added?

Further, you may try it with different kernels. Feel free to boot one of the two older kernels in your boot menu, and then try again. Does the problem persist among different kernels?

Note: If you have not yet enabled the iommu parameter, do it always only for one kernel. Then, if something does not work with it, you can still boot one of the two other kernels. Just to ensure that you don’t kick yourself out of the system :slight_smile:

This is my system information: 5.16.19-200.fc35.x86_64

Here is the output of journalctl --since "2 minutes ago":

Apr 17 11:27:53 fedora systemd[1]: gdm.service: Consumed 5.959s CPU time.
Apr 17 11:27:53 fedora bluetoothd[853]: Endpoint unregistered: sender=:1.1835 path=/MediaEndpoint/A2DPSource/ldac
Apr 17 11:27:53 fedora bluetoothd[853]: Endpoint unregistered: sender=:1.1835 path=/MediaEndpoint/A2DPSink/aptx_hd
Apr 17 11:27:53 fedora systemd-logind[890]: Session 208 logged out. Waiting for processes to exit.
Apr 17 11:27:53 fedora bluetoothd[853]: Endpoint unregistered: sender=:1.1835 path=/MediaEndpoint/A2DPSource/aptx_hd
Apr 17 11:27:53 fedora bluetoothd[853]: Endpoint unregistered: sender=:1.1835 path=/MediaEndpoint/A2DPSink/aptx
Apr 17 11:27:53 fedora bluetoothd[853]: Endpoint unregistered: sender=:1.1835 path=/MediaEndpoint/A2DPSource/aptx
Apr 17 11:27:53 fedora bluetoothd[853]: Endpoint unregistered: sender=:1.1835 path=/MediaEndpoint/A2DPSource/aac
Apr 17 11:27:53 fedora bluetoothd[853]: Endpoint unregistered: sender=:1.1835 path=/MediaEndpoint/A2DPSink/sbc
Apr 17 11:27:53 fedora bluetoothd[853]: Endpoint unregistered: sender=:1.1835 path=/MediaEndpoint/A2DPSource/sbc
Apr 17 11:27:53 fedora bluetoothd[853]: Endpoint unregistered: sender=:1.1835 path=/MediaEndpoint/A2DPSink/sbc_xq
Apr 17 11:27:53 fedora bluetoothd[853]: Endpoint unregistered: sender=:1.1835 path=/MediaEndpoint/A2DPSource/sbc_xq
Apr 17 11:27:53 fedora bluetoothd[853]: Endpoint unregistered: sender=:1.1835 path=/MediaEndpoint/A2DPSource/aptx_ll_1
Apr 17 11:27:53 fedora bluetoothd[853]: Endpoint unregistered: sender=:1.1835 path=/MediaEndpoint/A2DPSource/aptx_ll_0
Apr 17 11:27:53 fedora bluetoothd[853]: Endpoint unregistered: sender=:1.1835 path=/MediaEndpoint/A2DPSource/aptx_ll_duplex_1
Apr 17 11:27:53 fedora bluetoothd[853]: Endpoint unregistered: sender=:1.1835 path=/MediaEndpoint/A2DPSource/aptx_ll_duplex_0
Apr 17 11:27:53 fedora bluetoothd[853]: Endpoint unregistered: sender=:1.1835 path=/MediaEndpoint/A2DPSource/faststream
Apr 17 11:27:53 fedora bluetoothd[853]: Endpoint unregistered: sender=:1.1835 path=/MediaEndpoint/A2DPSource/faststream_duplex
Apr 17 11:27:53 fedora bluetoothd[853]: Player unregistered: sender=:1.1835 path=/media_player0
Apr 17 11:27:53 fedora systemd[1]: session-208.scope: Deactivated successfully.
Apr 17 11:27:53 fedora systemd-logind[890]: Removed session 208.
Apr 17 11:27:53 fedora gnome-shell[14182]: Could not release device '/dev/input/event10' (13,74): GDBus.Error:org.freedesktop.DBus.Error.>
Apr 17 11:27:53 fedora xdg-desktop-por[14356]: Error reading events from display: Brutet r<C3><B6>r
Apr 17 11:27:53 fedora workrave[14492]: Error reading events from display: F<C3><B6>rbindelse borttagen av partnern
Apr 17 11:27:53 fedora evolution-alarm[14495]: Error reading events from display: Brutet r<C3><B6>r
Apr 17 11:27:53 fedora xdg-desktop-por[14744]: Error reading events from display: Brutet r<C3><B6>r
Apr 17 11:27:53 fedora gjs[14546]: Error reading events from display: Brutet r<C3><B6>r
Apr 17 11:27:53 fedora systemd[1182]: xdg-desktop-portal-gnome.service: Main process exited, code=exited, status=1/FAILURE
Apr 17 11:27:53 fedora systemd[1182]: xdg-desktop-portal-gnome.service: Failed with result 'exit-code'.
Apr 17 11:27:53 fedora systemd[1182]: xdg-desktop-portal-gtk.service: Main process exited, code=exited, status=1/FAILURE
Apr 17 11:27:53 fedora systemd[1182]: xdg-desktop-portal-gtk.service: Failed with result 'exit-code'.
Apr 17 11:27:53 fedora systemd[1182]: app-gnome-gnome\x2dsoftware\x2dservice-14484.scope: Consumed 2.371s CPU time.
Apr 17 11:27:53 fedora systemd[1182]: dbus-:1.3-org.gnome.Shell.Extensions.GSConnect@0.service: Main process exited, code=exited, status=>
Apr 17 11:27:53 fedora systemd[1182]: dbus-:1.3-org.gnome.Shell.Extensions.GSConnect@0.service: Failed with result 'exit-code'.
Apr 17 11:27:53 fedora systemd[1182]: dbus-:1.3-org.gnome.Shell.Extensions.GSConnect@0.service: Consumed 1.205s CPU time.
Apr 17 11:27:53 fedora gnome-shell[14182]: Could not release device '/dev/input/event2' (13,66): GDBus.Error:org.freedesktop.DBus.Error.U>
Apr 17 11:27:53 fedora gnome-shell[14182]: Could not release device '/dev/input/event3' (13,67): GDBus.Error:org.freedesktop.DBus.Error.U>
Apr 17 11:27:53 fedora gnome-shell[14182]: Could not release device '/dev/input/event7' (13,71): GDBus.Error:org.freedesktop.DBus.Error.U>
Apr 17 11:27:53 fedora gnome-shell[14182]: Could not release device '/dev/input/event11' (13,75): GDBus.Error:org.freedesktop.DBus.Error.>
Apr 17 11:27:53 fedora gnome-shell[14182]: Could not release device '/dev/input/event14' (13,78): GDBus.Error:org.freedesktop.DBus.Error.>
Apr 17 11:27:53 fedora gnome-shell[14182]: Could not release device '/dev/input/event8' (13,72): GDBus.Error:org.freedesktop.DBus.Error.U>
Apr 17 11:27:53 fedora gnome-shell[14182]: Could not release device '/dev/input/event0' (13,64): GDBus.Error:org.freedesktop.DBus.Error.U>
Apr 17 11:27:53 fedora uresourced[1177]: Setting resources on user-1000.slice (MemoryMin: 0, MemoryLow: 0, CPUWeight: 100, IOWeight: 100)
Apr 17 11:27:53 fedora uresourced[1177]: Setting resources on user@1000.service (MemoryMin: 0, MemoryLow: 0, CPUWeight: 100, IOWeight: 10>
Apr 17 11:27:53 fedora uresourced[1177]: Setting resources on user.slice (MemoryMin: 0, MemoryLow: 0, CPUWeight: -, IOWeight: -)
Apr 17 11:27:53 fedora gnome-shell[14182]: Could not release device '/dev/input/event12' (13,76): GDBus.Error:org.freedesktop.DBus.Error.>
Apr 17 11:27:53 fedora gnome-shell[14182]: Could not release device '/dev/input/event6' (13,70): GDBus.Error:org.freedesktop.DBus.Error.U>
Apr 17 11:27:54 fedora gnome-shell[14182]: Could not release device '/dev/input/event13' (13,77): GDBus.Error:org.freedesktop.DBus.Error.>
Apr 17 11:27:54 fedora gnome-shell[14182]: Could not release device '/dev/input/event4' (13,68): GDBus.Error:org.freedesktop.DBus.Error.U>
Apr 17 11:27:54 fedora firefox[14851]: Error reading events from display: Brutet r<C3><B6>r
Apr 17 11:27:54 fedora virtqemud[16094]: libvirt version: 7.6.0, package: 5.fc35 (Fedora Project, 2021-12-16-17:57:31, )
lines 160-182/2217 9%
Apr 17 11:27:53 fedora systemd[1182]: xdg-desktop-portal-gnome.service: Failed with result 'exit-code'.
Apr 17 11:27:53 fedora systemd[1182]: xdg-desktop-portal-gtk.service: Main process exited, code=exited, status=1/FAILURE
Apr 17 11:27:53 fedora systemd[1182]: xdg-desktop-portal-gtk.service: Failed with result 'exit-code'.
Apr 17 11:27:53 fedora systemd[1182]: app-gnome-gnome\x2dsoftware\x2dservice-14484.scope: Consumed 2.371s CPU time.
Apr 17 11:27:53 fedora systemd[1182]: dbus-:1.3-org.gnome.Shell.Extensions.GSConnect@0.service: Main process exited, code=exited, status=1/FAILURE
Apr 17 11:27:53 fedora systemd[1182]: dbus-:1.3-org.gnome.Shell.Extensions.GSConnect@0.service: Failed with result 'exit-code'.
Apr 17 11:27:53 fedora systemd[1182]: dbus-:1.3-org.gnome.Shell.Extensions.GSConnect@0.service: Consumed 1.205s CPU time.
Apr 17 11:27:53 fedora gnome-shell[14182]: Could not release device '/dev/input/event2' (13,66): GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Unknown object '/org/free>
Apr 17 11:27:53 fedora gnome-shell[14182]: Could not release device '/dev/input/event3' (13,67): GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Unknown object '/org/free>
Apr 17 11:27:53 fedora gnome-shell[14182]: Could not release device '/dev/input/event7' (13,71): GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Unknown object '/org/free>
Apr 17 11:27:53 fedora gnome-shell[14182]: Could not release device '/dev/input/event11' (13,75): GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Unknown object '/org/fre>
Apr 17 11:27:53 fedora gnome-shell[14182]: Could not release device '/dev/input/event14' (13,78): GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Unknown object '/org/fre>
Apr 17 11:27:53 fedora gnome-shell[14182]: Could not release device '/dev/input/event8' (13,72): GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Unknown object '/org/free>
Apr 17 11:27:53 fedora gnome-shell[14182]: Could not release device '/dev/input/event0' (13,64): GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Unknown object '/org/free>
Apr 17 11:27:53 fedora uresourced[1177]: Setting resources on user-1000.slice (MemoryMin: 0, MemoryLow: 0, CPUWeight: 100, IOWeight: 100)
Apr 17 11:27:53 fedora uresourced[1177]: Setting resources on user@1000.service (MemoryMin: 0, MemoryLow: 0, CPUWeight: 100, IOWeight: 100)
Apr 17 11:27:53 fedora uresourced[1177]: Setting resources on user.slice (MemoryMin: 0, MemoryLow: 0, CPUWeight: -, IOWeight: -)
Apr 17 11:27:53 fedora gnome-shell[14182]: Could not release device '/dev/input/event12' (13,76): GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Unknown object '/org/fre>
Apr 17 11:27:53 fedora gnome-shell[14182]: Could not release device '/dev/input/event6' (13,70): GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Unknown object '/org/free>
Apr 17 11:27:54 fedora gnome-shell[14182]: Could not release device '/dev/input/event13' (13,77): GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Unknown object '/org/fre>
Apr 17 11:27:54 fedora gnome-shell[14182]: Could not release device '/dev/input/event4' (13,68): GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Unknown object '/org/free>
Apr 17 11:27:54 fedora firefox[14851]: Error reading events from display: Brutet r<C3><B6>r
Apr 17 11:27:54 fedora virtqemud[16094]: libvirt version: 7.6.0, package: 5.fc35 (Fedora Project, 2021-12-16-17:57:31, )
Apr 17 11:27:54 fedora virtqemud[16094]: hostname: fedora
Apr 17 11:27:54 fedora virtqemud[16094]: Slut p<C3><A5> filen n<C3><A4>r data l<C3><A4>stes: In/ut-fel
Apr 17 11:27:54 fedora systemd[1182]: app-gnome-virt\x2dmanager-16076.scope: Consumed 1.367s CPU time.
Apr 17 11:27:54 fedora gnome-shell[14182]: meta_later_add: assertion 'display' failed
Apr 17 11:27:54 fedora gnome-shell[14182]: meta_later_remove: assertion 'display' failed
Apr 17 11:27:54 fedora gnome-shell[14182]: meta_later_remove: assertion 'display' failed
Apr 17 11:27:54 fedora gnome-shell[15284]: Exiting due to channel error.
Apr 17 11:27:54 fedora gnome-shell[15347]: Exiting due to channel error.
Apr 17 11:27:54 fedora gnome-shell[15190]: Exiting due to channel error.
Apr 17 11:27:54 fedora gnome-shell[15195]: Exiting due to channel error.
Apr 17 11:27:54 fedora gnome-shell[15974]: Exiting due to channel error.
Apr 17 11:27:54 fedora gnome-shell[15140]: Exiting due to channel error.
Apr 17 11:27:54 fedora gnome-shell[15068]: Exiting due to channel error.
Apr 17 11:27:54 fedora gnome-shell[15280]: Exiting due to channel error.
Apr 17 11:27:54 fedora gnome-shell[14182]: meta_later_remove: assertion 'display' failed
Apr 17 11:27:54 fedora gnome-shell[14182]: meta_later_remove: assertion 'display' failed
Apr 17 11:27:54 fedora gnome-shell[15008]: Exiting due to channel error.
Apr 17 11:27:54 fedora systemd[1182]: app-gnome-firefox-14851.scope: Consumed 55.966s CPU time.
Apr 17 11:27:54 fedora gnome-shell[14182]: meta_later_remove: assertion 'display' failed
Apr 17 11:27:54 fedora gnome-shell[14182]: meta_later_remove: assertion 'display' failed
Apr 17 11:27:54 fedora gnome-shell[14182]: meta_later_add: assertion 'display' failed
Apr 17 11:27:54 fedora gnome-shell[14182]: meta_later_add: assertion 'display' failed
Apr 17 11:27:54 fedora gnome-shell[14182]: meta_later_add: assertion 'display' failed
lines 160-205/2217 10%
Apr 17 11:27:53 fedora systemd[1182]: xdg-desktop-portal-gnome.service: Failed with result 'exit-code'.
Apr 17 11:27:53 fedora systemd[1182]: xdg-desktop-portal-gtk.service: Main process exited, code=exited, status=1/FAILURE
Apr 17 11:27:53 fedora systemd[1182]: xdg-desktop-portal-gtk.service: Failed with result 'exit-code'.
Apr 17 11:27:53 fedora systemd[1182]: app-gnome-gnome\x2dsoftware\x2dservice-14484.scope: Consumed 2.371s CPU time.
Apr 17 11:27:53 fedora systemd[1182]: dbus-:1.3-org.gnome.Shell.Extensions.GSConnect@0.service: Main process exited, code=exited, status=1/FAILURE
Apr 17 11:27:53 fedora systemd[1182]: dbus-:1.3-org.gnome.Shell.Extensions.GSConnect@0.service: Failed with result 'exit-code'.
Apr 17 11:27:53 fedora systemd[1182]: dbus-:1.3-org.gnome.Shell.Extensions.GSConnect@0.service: Consumed 1.205s CPU time.
Apr 17 11:27:53 fedora gnome-shell[14182]: Could not release device '/dev/input/event2' (13,66): GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Unknown object '/org/>
Apr 17 11:27:53 fedora gnome-shell[14182]: Could not release device '/dev/input/event3' (13,67): GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Unknown object '/org/>
Apr 17 11:27:53 fedora gnome-shell[14182]: Could not release device '/dev/input/event7' (13,71): GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Unknown object '/org/>
Apr 17 11:27:53 fedora gnome-shell[14182]: Could not release device '/dev/input/event11' (13,75): GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Unknown object '/org>
Apr 17 11:27:53 fedora gnome-shell[14182]: Could not release device '/dev/input/event14' (13,78): GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Unknown object '/org>
Apr 17 11:27:53 fedora gnome-shell[14182]: Could not release device '/dev/input/event8' (13,72): GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Unknown object '/org/>
Apr 17 11:27:53 fedora gnome-shell[14182]: Could not release device '/dev/input/event0' (13,64): GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Unknown object '/org/>
Apr 17 11:27:53 fedora uresourced[1177]: Setting resources on user-1000.slice (MemoryMin: 0, MemoryLow: 0, CPUWeight: 100, IOWeight: 100)
Apr 17 11:27:53 fedora uresourced[1177]: Setting resources on user@1000.service (MemoryMin: 0, MemoryLow: 0, CPUWeight: 100, IOWeight: 100)
Apr 17 11:27:53 fedora uresourced[1177]: Setting resources on user.slice (MemoryMin: 0, MemoryLow: 0, CPUWeight: -, IOWeight: -)
Apr 17 11:27:53 fedora gnome-shell[14182]: Could not release device '/dev/input/event12' (13,76): GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Unknown object '/org>
Apr 17 11:27:53 fedora gnome-shell[14182]: Could not release device '/dev/input/event6' (13,70): GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Unknown object '/org/>
Apr 17 11:27:54 fedora gnome-shell[14182]: Could not release device '/dev/input/event13' (13,77): GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Unknown object '/org>
Apr 17 11:27:54 fedora gnome-shell[14182]: Could not release device '/dev/input/event4' (13,68): GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Unknown object '/org/>
Apr 17 11:27:54 fedora firefox[14851]: Error reading events from display: Brutet r<C3><B6>r
Apr 17 11:27:54 fedora virtqemud[16094]: libvirt version: 7.6.0, package: 5.fc35 (Fedora Project, 2021-12-16-17:57:31, )
Apr 17 11:27:54 fedora virtqemud[16094]: hostname: fedora
Apr 17 11:27:54 fedora virtqemud[16094]: Slut p<C3><A5> filen n<C3><A4>r data l<C3><A4>stes: In/ut-fel
Apr 17 11:27:54 fedora systemd[1182]: app-gnome-virt\x2dmanager-16076.scope: Consumed 1.367s CPU time.
Apr 17 11:27:54 fedora gnome-shell[14182]: meta_later_add: assertion 'display' failed
Apr 17 11:27:54 fedora gnome-shell[14182]: meta_later_remove: assertion 'display' failed
Apr 17 11:27:54 fedora gnome-shell[14182]: meta_later_remove: assertion 'display' failed
Apr 17 11:27:54 fedora gnome-shell[15284]: Exiting due to channel error.
Apr 17 11:27:54 fedora gnome-shell[15347]: Exiting due to channel error.
Apr 17 11:27:54 fedora gnome-shell[15190]: Exiting due to channel error.
Apr 17 11:27:54 fedora gnome-shell[15195]: Exiting due to channel error.
Apr 17 11:27:54 fedora gnome-shell[15974]: Exiting due to channel error.
Apr 17 11:27:54 fedora gnome-shell[15140]: Exiting due to channel error.
Apr 17 11:27:54 fedora gnome-shell[15068]: Exiting due to channel error.
Apr 17 11:27:54 fedora gnome-shell[15280]: Exiting due to channel error.
Apr 17 11:27:54 fedora gnome-shell[14182]: meta_later_remove: assertion 'display' failed
Apr 17 11:27:54 fedora gnome-shell[14182]: meta_later_remove: assertion 'display' failed
Apr 17 11:27:54 fedora gnome-shell[15008]: Exiting due to channel error.
Apr 17 11:27:54 fedora systemd[1182]: app-gnome-firefox-14851.scope: Consumed 55.966s CPU time.
Apr 17 11:27:54 fedora gnome-shell[14182]: meta_later_remove: assertion 'display' failed
Apr 17 11:27:54 fedora gnome-shell[14182]: meta_later_remove: assertion 'display' failed
Apr 17 11:27:54 fedora gnome-shell[14182]: meta_later_add: assertion 'display' failed
Apr 17 11:27:54 fedora gnome-shell[14182]: meta_later_add: assertion 'display' failed
Apr 17 11:27:54 fedora gnome-shell[14182]: meta_later_add: assertion 'display' failed
Apr 17 11:27:54 fedora gnome-shell[14182]: meta_later_add: assertion 'display' failed
Apr 17 11:27:54 fedora gnome-shell[14182]: meta_later_add: assertion 'display' failed
Apr 17 11:27:54 fedora gnome-shell[14182]: meta_later_add: assertion 'display' failed
Apr 17 11:27:54 fedora gnome-shell[14182]: meta_later_add: assertion 'display' failed
Apr 17 11:27:54 fedora gnome-shell[14182]: meta_later_add: assertion 'display' failed
Apr 17 11:27:54 fedora gnome-shell[14182]: meta_later_add: assertion 'display' failed
Apr 17 11:27:54 fedora gnome-shell[14182]: meta_later_add: assertion 'display' failed
Apr 17 11:27:54 fedora gnome-shell[14182]: meta_later_add: assertion 'display' failed
Apr 17 11:27:54 fedora gnome-shell[14182]: clutter_actor_iter_next: assertion 'ri->age == ri->root->priv->age' failed
Apr 17 11:27:54 fedora gnome-shell[14182]: Could not release device '/dev/dri/card0' (226,0): GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Unknown object '/org/fre>
Apr 17 11:27:54 fedora systemd[1182]: Stopped GNOME Shell on Wayland.
Apr 17 11:27:54 fedora systemd[1182]: org.gnome.Shell@wayland.service: Consumed 42.788s CPU time.
Apr 17 11:27:54 fedora systemd[1182]: Stopped target GNOME Session Manager is ready.
Apr 17 11:27:54 fedora systemd[1182]: Stopping GNOME Session Manager (session: gnome)...
Apr 17 11:27:54 fedora gnome-session[14159]: gnome-session-binary[14159]: WARNING: Could not get session class: Enheten eller adressen finns inte
Apr 17 11:27:54 fedora gnome-session-binary[14159]: WARNING: Could not get session class: Enheten eller adressen finns inte
Apr 17 11:27:54 fedora dbus-broker[14210]: Dispatched 293 messages @ 6(<C2><B1>30)<CE><BC>s / message.
Apr 17 11:27:54 fedora polkitd[867]: Unregistered Authentication Agent for unix-session:208 (system bus name :1.1836, object path /org/freedesktop/PolicyKit1/Authentication>
Apr 17 11:27:54 fedora systemd[1182]: Stopped GNOME Session Manager (session: gnome).
Apr 17 11:27:54 fedora systemd[1182]: Stopped target Tasks to be run before GNOME Session starts.
Apr 17 11:27:54 fedora systemd[1182]: Stopped target Session services which should run early before the graphical session is brought up.
Apr 17 11:27:54 fedora systemd[1182]: Reached target Shutdown running GNOME Session.
Apr 17 11:27:54 fedora systemd[1182]: Starting Restart DBus after GNOME Session shutdown...
Apr 17 11:27:54 fedora systemd[1182]: Stopped target Shutdown running GNOME Session.
Apr 17 11:27:54 fedora systemd[1182]: Started Restart DBus after GNOME Session shutdown.
Apr 17 11:27:54 fedora gvfsd[14192]: A connection to the bus can't be made
Apr 17 11:27:54 fedora dbus-broker[14118]: Dispatched 7793 messages @ 4(<C2><B1>8)<CE><BC>s / message.
Apr 17 11:27:54 fedora gnome-shell-calendar-server[14239]: gnome-shell-calendar-server[14239]: Lost (or failed to acquire) the name org.gnome.Shell.CalendarServer - exiting
Apr 17 11:27:54 fedora gvfsd[14334]: A connection to the bus can't be made
Apr 17 11:27:54 fedora systemd[1182]: Stopping D-Bus User Message Bus...
Apr 17 11:27:54 fedora systemd[1]: run-user-1000-gvfs.mount: Deactivated successfully.
Apr 17 11:27:54 fedora systemd[1]: run-user-1000-doc.mount: Deactivated successfully.
Apr 17 11:27:54 fedora systemd[1182]: Stopped D-Bus User Message Bus.
Apr 17 11:27:54 fedora systemd[1182]: xdg-permission-store.service: Main process exited, code=exited, status=1/FAILURE
Apr 17 11:27:54 fedora systemd[1182]: xdg-permission-store.service: Failed with result 'exit-code'.
Apr 17 11:27:54 fedora systemd[1182]: xdg-document-portal.service: Main process exited, code=exited, status=20/n/a
Apr 17 11:27:54 fedora systemd[1182]: xdg-document-portal.service: Failed with result 'exit-code'.
Apr 17 11:27:54 fedora systemd[1182]: Starting D-Bus User Message Bus...
Apr 17 11:27:54 fedora dbus-broker-launch[16388]: Policy to allow eavesdropping in /usr/share/dbus-1/session.conf +31: Eavesdropping is deprecated and ignored
Apr 17 11:27:54 fedora dbus-broker-launch[16388]: Policy to allow eavesdropping in /usr/share/dbus-1/session.conf +33: Eavesdropping is deprecated and ignored
Apr 17 11:27:54 fedora systemd[1182]: Started D-Bus User Message Bus.
Apr 17 11:27:54 fedora dbus-broker-lau[16388]: Ready
Apr 17 11:28:02 fedora kernel: [drm] [nvidia-drm] [GPU ID 0x00000100] Unloading driver
Apr 17 11:28:02 fedora kernel: nvidia-modeset: Unloading
Apr 17 11:28:02 fedora systemd-udevd[16391]: nvidia_modeset: Process '/usr/bin/bash -c '/usr/bin/mknod -Z -m 666 /dev/nvidia-modeset c 195 254'' failed with exit code 1.
Apr 17 11:28:02 fedora kernel: nvidia-uvm: Unloaded the UVM driver.
Apr 17 11:28:02 fedora systemd-udevd[16391]: nvidia_uvm: Process '/usr/bin/bash -c '/usr/bin/mknod -m 666 /dev/nvidia-uvm c $(grep nvidia-uvm /proc/devices | cut -d \  -f 1>
Apr 17 11:28:02 fedora systemd-udevd[16391]: nvidia_uvm: Process '/usr/bin/bash -c '/usr/bin/mknod -m 666 /dev/nvidia-uvm-tools c $(grep nvidia-uvm /proc/devices | cut -d \>
Apr 17 11:28:02 fedora kernel: nvidia-nvlink: Unregistered the Nvlink Core, major device number 510
Apr 17 11:28:02 fedora systemd-udevd[16395]: nvidia: Process '/usr/bin/bash -c '/usr/bin/mknod -Z -m 666 /dev/nvidiactl c 195 255'' failed with exit code 1.
Apr 17 11:28:02 fedora systemd-udevd[16391]: nvidia: Process '/usr/bin/bash -c '/usr/bin/mknod -Z -m 666 /dev/nvidiactl c 195 255'' failed with exit code 1.
Apr 17 11:28:02 fedora kernel: ACPI: bus type drm_connector unregistered
Apr 17 11:28:02 fedora kernel: VFIO - User Level meta-driver version: 0.3
Apr 17 11:28:02 fedora kernel: vfio-pci 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=none,decodes=io+mem:owns=io+mem
Apr 17 11:28:03 fedora kernel: xhci_hcd 0000:01:00.2: remove, state 4
Apr 17 11:28:03 fedora kernel: usb usb4: USB disconnect, device number 1
Apr 17 11:28:03 fedora kernel: xhci_hcd 0000:01:00.2: USB bus 4 deregistered
Apr 17 11:28:03 fedora kernel: xhci_hcd 0000:01:00.2: remove, state 4
Apr 17 11:28:03 fedora kernel: usb usb3: USB disconnect, device number 1
Apr 17 11:28:03 fedora kernel: xhci_hcd 0000:01:00.2: USB bus 3 deregistered
Apr 17 11:28:03 fedora virtqemud[16094]: internal error: Barnprocessen (LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin /etc/libvirt/hooks/qemu win10 prepar>
                                         ++++ VIRSH_GPU_VIDEO=pci_0000_01_00_0
                                         ++++ VIRSH_GPU_AUDIO=pci_0000_01_00_1
                                         ++++ VIRSH_GPU_USB=pci_0000_01_00_2
                                         +++ systemctl stop gdm.service
                                         +++ echo 0
                                         +++ echo efi-framebuffer.0
                                         +++ sleep 9
                                         +++ modprobe -r nvidia_drm
                                         +++ modprobe -r nvidia_modeset
                                         +++ modprobe -r drm_kms_helper
                                         +++ modprobe -r nvidia
                                         modprobe: ERROR: could not remove 'nvidia': No such file or directory
                                         +++ modprobe -r i2c_nvidia_gpu
                                         +++ modprobe -r drm
                                         +++ modprobe -r nvidia_uvm
                                         +++ virsh nodedev-detach pci_0000_01_00_0
                                         +++ virsh nodedev-detach pci_0000_01_00_1
                                         +++ virsh nodedev-detach pci_0000_01_00_2
                                         +++ modprobe vfio
                                         +++ modprobe vfio_pci
                                         +++ modprobe_vfio_iommu_type1
                                         /etc/libvirt/hooks/qemu.d/win10/prepare/begin/start.sh: line 36: modprobe_vfio_iommu_type1: command not found
Apr 17 11:28:03 fedora virtqemud[16094]: Hook script execution failed: internal error: Barnprocessen (LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin /etc/l>
                                         ++++ VIRSH_GPU_VIDEO=pci_0000_01_00_0
                                         ++++ VIRSH_GPU_AUDIO=pci_0000_01_00_1
                                         ++++ VIRSH_GPU_USB=pci_0000_01_00_2
                                         +++ systemctl stop gdm.service
                                         +++ echo 0
                                         +++ echo efi-framebuffer.0
                                         +++ sleep 9
                                         +++ modprobe -r nvidia_drm
                                         +++ modprobe -r nvidia_modeset
                                         +++ modprobe -r drm_kms_helper
                                         +++ modprobe -r nvidia
                                         modprobe: ERROR: could not remove 'nvidia': No such file or directory
                                         +++ modprobe -r i2c_nvidia_gpu
                                         +++ modprobe -r drm
                                         +++ modprobe -r nvidia_uvm
                                         +++ virsh nodedev-detach pci_0000_01_00_0
                                         +++ virsh nodedev-detach pci_0000_01_00_1
                                         +++ virsh nodedev-detach pci_0000_01_00_2
                                         +++ modprobe vfio
                                         +++ modprobe vfio_pci
                                         +++ modprobe_vfio_iommu_type1
                                         /etc/libvirt/hooks/qemu.d/win10/prepare/begin/start.sh: line 36: modprobe_vfio_iommu_type1: command not found
Apr 17 11:28:03 fedora virtqemud[16094]: unsupported configuration: pci backend driver 'default' is not supported

It seems like it starts going wrong at the part where it says: fedora virtqemud[16094]: Hook script execution failed: internal error

Just to exclude any configuration issue: do you have passthrough enabled in the grub configuration?

Yes, I’ve confirmed that passthrough is on. The virtual machine works when running it without a passthrough device.

My guess is that the problem starts here:

To me it looks like this is a nvidia-driver-related issue. I do not have much experience with nvidia-drivers in conjunction with virtualization, but it looks like the unloading does not work and thus, the device cannot be passed through to the vm.

You may use your preferred search engine to search for some workarounds using the different error messages in the search query. You may also look into forums of other Linux distributions, as this is unlikely to be Fedora-specific. Maybe some of that helps you. Unfortunately, I cannot help much in this respect. But you could try to use the open source nouveau driver instead of the nvidia one (but be aware that it cannot compete with the performance of the proprietary nvidia driver).

However, if you want to exclude that the problem is related to wrong parameters or hardware support, feel free to let me know the output of the following:
lscpu → then I can verify if the CPU supports VT
cat /boot/loader/entries/*-5.16.19-200.fc35.x86* | grep options → then I can verify that the parameters are set properly.
In terms of the BIOS, it is of course just the VTd that has to be enabled

Also, how does it work with the older kernels in your boot menu?



Does anyone else in the community have experience with nvidia drivers & gpu passthrough?

Output of lscpu:

Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         39 bits physical, 48 bits virtual
  Byte Order:            Little Endian
CPU(s):                  8
  On-line CPU(s) list:   0-7
Vendor ID:               GenuineIntel
  Model name:            Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz
    CPU family:          6
    Model:               158
    Thread(s) per core:  1
    Core(s) per socket:  8
    Socket(s):           1
    Stepping:            13
    CPU max MHz:         4700.0000
    CPU min MHz:         800.0000
    BogoMIPS:            6000.00
    Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush d
                         ts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc 
                         art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pn
                         i pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm p
                         cid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer xsave avx f16c rdrand la
                         hf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single ssbd ibrs ibpb stibp ibrs_
                         enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 av
                         x2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec
                          xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_
                         clear flush_l1d arch_capabilities
Virtualization features: 
  Virtualization:        VT-x
Caches (sum of all):     
  L1d:                   256 KiB (8 instances)
  L1i:                   256 KiB (8 instances)
  L2:                    2 MiB (8 instances)
  L3:                    12 MiB (1 instance)
NUMA:                    
  NUMA node(s):          1
  NUMA node0 CPU(s):     0-7
Vulnerabilities:         
  Itlb multihit:         KVM: Mitigation: VMX disabled
  L1tf:                  Not affected
  Mds:                   Not affected
  Meltdown:              Not affected
  Spec store bypass:     Mitigation; Speculative Store Bypass disabled via prctl
  Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer sanitization
  Spectre v2:            Mitigation; Enhanced IBRS, IBPB conditional, RSB filling
  Srbds:                 Mitigation; TSX disabled
  Tsx async abort:       Mitigation; TSX disabled

Output of cat /boot/loader/entries/*-5.16.19-200.fc35.x86_64* | grep options:

options root=UUID=ac28e2f8-d700-44f3-991e-690bb737028a ro rootflags=subvol=root rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 rhgb intel_iommu=on iommu=pt quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 intel_iommu=on rd.driver.pre=vfio-pci kvm.ignore_msrs=1

I’ve tried with the other kernels, 5.16.16 and 5.16.18 but the virtual machine didn’t work any better on those.

By the way, now the qemu-log displays another error: failed to find romfile "/home/jolene/Dokument/NVIDIA_rom/patch.rom" :cold_face:

I could also imagine that this is the origin of the problem.

Remove iommu=pt - you only need intel_iommu=on (and you need it only once: it is listed twice).

Also, check if you can try without nvidia-drm.modeset=1 (also listed twice). I’m not sure how far this interferes with gpu passthrough.

The CPU supports Intel VTd

I removed the flags but it still does not work.