Okay, here we go again.
Im trying to get a single GPU passthrough to work since days but all I got is a black screen. I definitely need help, as I cannot figure this out alone anymore.
MSI X99A Krait, Core i7 5820k, Powercolor Vega 56 Red Dragon, PopOS 20.10 (Tried also with Ubuntu 20.04 but same issue)
IOMMU is enabled in BIOS, as well as in systemd-boot which is used by PopOS.
The boot arguments are:
quiet loglevel=0 systemd.show_status=false splash intel_iommu=on iommu=pt.
iommu=pt is needed for me, otherwise my kexboard doesnt work when I boot, dont ask me why.
Vendor_reset is installed and loaded at boot, verified via lsmod.
My start script looks like this:
sudo systemctl stop display-manager.service sleep 2 sudo virsh nodedev-detach pci_0000_05_00_0 #release the GPU sudo virsh nodedev-detach pci_0000_05_00_1 #release the GPU audio device sleep 2 sudo modprobe vfio-pci virsh start win10
I do run the script via SSH on my phone to see the output live.
It says that GPU and HDMI audio are successfully detached and that the VM has started.
When I run lspci -k when the VM is running it confirms that vfio-pci is indeed attached to the two devices.
In Qemu I have of course passed through these both devices as well as mouse and keyboard and got rid of the spice stuff.
I also pointed to the right BIOS ROM file via XML editing, which sits in /usr/share/vgabios.
I tried the correct one from techpowerup and my own one extracted via gpuz on Windows, or even completely without poiting to a bios file, no joy.
I also tried various other things, for example setting my BIOS to UEFI only from UEFI+Legacy, also no joy, always black screen.
INFO: /dev/kvm exists
KVM acceleration can be used
and when I run htop via SSH while the VM (apparently) is started it indeed shows up there. Cant add another picture, so its basically saying the the VM is running and that is uses 100% cpu of one core and 24 Gb of memory, which I allocated.
I also modified my start script once so that it looked like this, to unbind the devices from console.
sudo systemctl stop display-manager.service sleep 2 #Unbind framebuffer printf 0 > /sys/class/vtconsole/vtcon0/bind || printf 'Failed to unbind vtcon0.\n' printf 0 > /sys/class/vtconsole/vtcon1/bind || printf 'Failed to unbind vtcon1.\n' printf 'efi-framebuffer.0' > /sys/bus/platform/drivers/efi-framebuffer/unbind || printf 'Failed to unbind efi-framebuffer.\n' sudo modprobe vfio-pci #newstuff # Vega 10 XL/XT printf '1002 687f' > /sys/bus/pci/drivers/vfio-pci/new_id printf '0000:05:00.0' > /sys/bus/pci/drivers/amdgpu/unbind || printf 'Failed to unbind gpu from amdgpu.\n' printf '0000:05:00.0' > /sys/bus/pci/drivers/vfio-pci/bind || printf 'Failed to bind gpu to vfio-pci.\n' printf '1002 687f' > /sys/bus/pci/drivers/vfio-pci/remove_id # Vega 10 HDMI Audio printf '1002 aaf8' > /sys/bus/pci/drivers/vfio-pci/new_id printf '0000:05:00.1' > /sys/bus/pci/drivers/snd_hda_intel/unbind || printf 'Failed to unbind gpu-audio from snd_hda_intel.\n' printf '0000:05:00.1' > /sys/bus/pci/drivers/vfio-pci/bind || printf 'Failed to bind gpu-audio to vfio-pci.\n' printf '1002 aaf8' > /sys/bus/pci/drivers/vfio-pci/remove_id #sudo virsh nodedev-detach pci_0000_05_00_0 #release the GPU #sudo virsh nodedev-detach pci_0000_05_00_1 #release the GPU audio device sleep 2 virsh start win10
Guess what - didnt work.
I am ABSOLUTELY lost and about to give up, you experts are my only hope.
Help is greatly appreciated!