Screen goes black when libvirtd is enabled

Hello

I am trying to get a virtual windows pc with gpu Passthrough i have followed steps described in this tutorial https://www.youtube.com/watch?v=eTWf5D092VY&t

About my system:

System:
Kernel: 6.4.7-zen1-2-zen arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=0d041406-fe13-41c0-b9f2-4c294e2a1d84 rw rootflags=subvol=@
intel_iommu=on iommu=pt quiet quiet rd.udev.log_priority=3
vt.global_cursor_default=0
resume=UUID=dff8cd6b-a08c-479d-bb33-80f49a2c20cb loglevel=3 ibt=off
Desktop: KDE Plasma v: 5.27.7 tk: Qt v: 5.15.10 wm: kwin_x11 vt: 2
dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Desktop Mobo: Micro-Star model: B460M-A PRO (MS-7C88) v: 1.0
serial: <superuser required> UEFI: American Megatrends v: 1.60
date: 11/30/2020
CPU:
Info: model: Intel Core i5-10400F bits: 64 type: MT MCP arch: Comet Lake
gen: core 10 level: v3 note: check built: 2020 process: Intel 14nm family: 6
model-id: 0xA5 (165) stepping: 3 microcode: 0xF6
Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 1.5 MiB desc: 6x256 KiB
L3: 12 MiB desc: 1x12 MiB
Speed (MHz): avg: 3438 high: 4201 min/max: 800/4300 scaling:
driver: intel_pstate governor: powersave cores: 1: 4201 2: 2900 3: 2900
4: 2900 5: 2900 6: 2900 7: 4200 8: 4200 9: 2900 10: 2900 11: 4162 12: 4199
bogomips: 69597
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities: <filter>
Graphics:
Device-1: NVIDIA TU106 [GeForce RTX 2060 Rev. A] driver: nvidia v: 535.86.05
alternate: nouveau,nvidia_drm non-free: 535.xx+
status: current (as of 2023-07) arch: Turing code: TUxxx
process: TSMC 12nm FF built: 2018-22 pcie: gen: 3 speed: 8 GT/s lanes: 16
bus-ID: 01:00.0 chip-ID: 10de:1f08 class-ID: 0300
Display: x11 server: X.Org v: 21.1.8 with: Xwayland v: 23.1.2
compositor: kwin_x11 driver: X: loaded: nvidia unloaded: modesetting
alternate: fbdev,nouveau,nv,vesa gpu: nvidia display-ID: :0 screens: 1
Screen-1: 0 s-res: 4480x1440 s-dpi: 108 s-size: 1054x342mm (41.50x13.46")
s-diag: 1108mm (43.63")
Monitor-1: DP-2 pos: bottom-l res: 1920x1080 dpi: 81
size: 600x340mm (23.62x13.39") diag: 690mm (27.15") modes: N/A
Monitor-2: DP-4 pos: primary,top-right res: 2560x1440 hz: 60 dpi: 109
size: 597x336mm (23.5x13.23") diag: 685mm (26.97") modes: N/A
API: OpenGL v: 4.6.0 NVIDIA 535.86.05 renderer: NVIDIA GeForce RTX
2060/PCIe/SSE2 direct-render: Yes
Audio:
Device-1: Intel Comet Lake PCH-V cAVS vendor: Micro-Star MSI
driver: snd_hda_intel v: kernel alternate: snd_soc_avs,snd_sof_pci_intel_cnl
bus-ID: 00:1f.3 chip-ID: 8086:a3f0 class-ID: 0403
Device-2: NVIDIA TU106 High Definition Audio driver: snd_hda_intel
v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16 bus-ID: 01:00.1
chip-ID: 10de:10f9 class-ID: 0403
Device-3: C-Media Blue Snowball driver: hid-generic,snd-usb-audio,usbhid
type: USB rev: 1.1 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-1.2:6
chip-ID: 0d8c:0005 class-ID: 0300 serial: <filter>
API: ALSA v: k6.4.7-zen1-2-zen status: kernel-api tools: N/A
Server-1: PipeWire v: 0.3.76 status: active with: 1: pipewire-pulse
status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
vendor: Micro-Star MSI driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s
lanes: 1 port: 3000 bus-ID: 03:00.0 chip-ID: 10ec:8168 class-ID: 0200
IF: enp3s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives:
Local Storage: total: 953.87 GiB used: 221.95 GiB (23.3%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: SanDisk
model: SSDPR-PX500-01T-80 size: 953.87 GiB block-size: physical: 512 B
logical: 512 B speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter>
fw-rev: V2.1.3 temp: 43.9 C scheme: GPT
Partition:
ID-1: / raw-size: 936.45 GiB size: 936.45 GiB (100.00%)
used: 221.95 GiB (23.7%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-2: /home raw-size: 936.45 GiB size: 936.45 GiB (100.00%)
used: 221.95 GiB (23.7%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-3: /var/log raw-size: 936.45 GiB size: 936.45 GiB (100.00%)
used: 221.95 GiB (23.7%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-4: /var/tmp raw-size: 936.45 GiB size: 936.45 GiB (100.00%)
used: 221.95 GiB (23.7%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 15.56 GiB used: 0 KiB (0.0%) priority: 100
dev: /dev/zram0
ID-2: swap-2 type: partition size: 17.11 GiB used: 0 KiB (0.0%)
priority: -2 dev: /dev/nvme0n1p3 maj-min: 259:3
Sensors:
System Temperatures: cpu: 34.0 C mobo: N/A gpu: nvidia temp: 51 C
Fan Speeds (RPM): N/A gpu: nvidia fan: 0%
Info:
Processes: 318 Uptime: 5m wakeups: 0 Memory: total: 16 GiB
available: 15.56 GiB used: 3.99 GiB (25.7%) Init: systemd v: 254
default: graphical tool: systemctl Compilers: gcc: 13.2.1 clang: 15.0.7
Packages: pm: pacman pkgs: 1704 libs: 463 tools: octopi,pamac,paru
Shell: fish v: 3.6.1 default: Bash v: 5.1.16 running-in: konsole
inxi: 3.3.28
Garuda (2.6.16-1):
System install date:     2023-07-22
Last full system update: 2023-08-03
Is partially upgraded:   No
Relevant software:       snapper NetworkManager dracut nvidia-dkms
Windows dual boot:       No/Undetected
Failed units:

The issue is i have created the hooks described in this repo but the start script gets run everytime i start libvirtd and then the system goes unresponsive. What's meant to happen is that the script runs only when i launch the windows vm. Now i am also unable to change the vm's settings because i need to start libvirtd to edit it in virt manager.

Take a look through the ArchWiki article for libvirt and see if you can spot any details where the method described in the video deviates from the wiki document: libvirt - ArchWiki

Even if the video is very well done, it looks like that guy is using Fedora so there may be some significant differences in configuration. The comments on the video are positive, but you can see a couple Arch folks mentioned they needed to make adjustments to get it working.

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