bryansteiner / gpu-passthrough-tutorial

GNU General Public License v3.0
1.45k stars 93 forks source link

Virsh detach hangs #30

Closed nobodyawesomer closed 2 years ago

nobodyawesomer commented 2 years ago

Hi, I'm following your tutorial and had it working properly, and I think I did something that ended up breaking it (I was messing with having Nvidia PRIME on while the guest was offline). Now when I boot the machine, it gets stuck and I have no screen. I have ssh'ed into my machine and ran the launch script manually with set -x, and it gives me this:

+ modprobe vfio
+ modprobe vfio_iommu_type1
+ modprobe vfio_pci
+ virsh nodedev-detach pci_0000_01_00_0
error: Failed to detach device pci_0000_01_00_0
error: argument unsupported: VFIO device assignment is currently not supported on this system

+ virsh nodedev-detach pci_0000_01_00_1
error: Failed to detach device pci_0000_01_00_1
error: argument unsupported: VFIO device assignment is currently not supported on this system

+ virsh nodedev-detach pci_0000_01_00_2
error: Failed to detach device pci_0000_01_00_2
error: argument unsupported: VFIO device assignment is currently not supported on this system

+ virsh nodedev-detach pci_0000_01_00_3
error: Failed to detach device pci_0000_01_00_3
error: argument unsupported: VFIO device assignment is currently not supported on this system

I know the system can support VFIO, because it really was working before, with the exact same setup I have now (to my knowledge- except that the PCI ID of the GPU was 0000:02.00.0 (and I have no idea how/why the id changed)). I'm not sure what I did that could have made it no longer supported.

Thank you for posting such a great resource! Any help would be appreciated, even just pointers to how I can debug this myself.

nobodyawesomer commented 2 years ago

My bad, I had just reset my BIOS and forgot to turn on VT-d again. I did that and now have a different problem: virsh nodedev-detach pci_0000_01_00_0 now just hangs there indefinitely.

Thanks again for the tutorial, and any small pointers would be very welcome.

mysteryx93 commented 2 years ago

I've had this hang problem and wrote a guide with the solution.

Although your setup may be different, you can probably adapt the solution to your needs.

https://github.com/mysteryx93/GPU-Passthrough-with-Optimus-Manager-Guide

bryansteiner commented 2 years ago

Closing issue in response to solution guide from @mysteryx93