-
Notifications
You must be signed in to change notification settings - Fork 126
Description
See #32 (comment) for fix
I am on Debian Testing with dual AMD discrete GPUs. I attempted to install Windows 10 in a virtual machine with GPU passthrough and CPU settings similar to your tutorial (of course, accordingly modified for my 6 core, 12-thread CPU). The virtual machine would hang on Creating Domain like #12 . I had a similar kvm.conf and unbind and bind script modifications similar to the user in the aforementioned issue. I tried several diagnostics, none to any avail.
Thus, I, with the same settings otherwise, removed the PCIe passthrough of the GPU and just went on installing Windows to fix the GPU issues later. I thought it might be that the display manager was holding that GPU hostage. However, I found that after trying to start the VM, the graphics card I was trying to pass through no longer appeared as it had before when running xrandr --listproviders.
Attempting further testing, I rebooted the PC and connected a single monitor to the GPU I intended to pass through. The desktop appeared on both displays. When I started the VM, the display with the passthrough GPU connected turned off, suggested that the bind script had, in fact, successfully executed. When running lsmod, I found that all kernel modules started by the script were running. However, my 10 cents are still on the idea that it's a kernel module or permissions issue.
I am still lost and trying to figure out the issue. I have bind_vfio.sh, alloc_hugepages.sh, and cpu_mode_performance.sh in my prepare/begin directory along with their corresponding scripts in release/end, all executable. I tested removing all but bind_vfio.sh, but to no avail.
Here is my current tree (after testing the removal):
/etc/libvirt/hooks
├── kvm.conf
├── qemu
└── qemu.d
└── Windows10
├── prepare
│ └── begin
│ └── bind_vfio.sh
└── release
└── end
└── unbind_vfio.sh
My system configuration is as followings:
CPU: AMD Ryzen 5 2600
Motherboard: Gigabyte Aorus AX370 Gaming 5
Kernel: liquorix 5.18-17.1~bookworm (which has ACS patches)
Kernel Parameters (defined in /etc/default/grub): quiet splash acpi_enforce_resources=lax pcie_acs_override=downstream,multifunction amd_iommu=on
Main GPU: PowerColor AMD Radeon RX 550 2GB (https://www.amazon.com/PowerColor-Radeon-550-Profile-Graphics/dp/B09V2GYKPJ/ref=sr_1_1?crid=AEZNE0MZSFYJ&keywords=powercolor+radeon+550&qid=1659337204&sprefix=powercolor+radeon+550%2Caps%2C150&sr=8-1)
Passthrough GPU: XFX Radeon RX 580 8GB
RAM: 32GB
Bash Version: 5.1.16
Distribution: Debian bookworm
Desktop: xfce4
I can confirm that IOMMU and AMD-V are enabled, as I turned them on, and iommu shell scripts output devices. The Windows 10 VM boots when passthrough is disabled and at reasonable speed, meaning that virtualization is (probably) working. Before I attempt to start the VM, appending DRI_PRIME=1 to the front of a command allows me to offload rendering to the passthrough GPU, and after attempting, it no longer works and reverts to the RX 550. (Almost the exact desired behavior, except that one, I want the VM running, and two, even when using "source" in the shell as the root user and attempting to execute the unbind script directly, the GPU is not returned and inaccessible for the rest of the session.)
Here's the XML file for my VM
Here's my bind_vfio.sh
Here's my unbind_vfio.sh
Thank you so much for creating the tutorial, and thank you for your time. I hope I haven't given you too much (or even worse, too little) information. Have a wonderful day.