GPU passthrough - Going insane - Is this silicone gamba or real tech?

uninviting. leaving. gl.

hi

It works, it’s real :slight_smile: It can just be really frustrating, took me 6 months to get a reliable understanding, and another 6 months to begin to automate it! If it can be automated, it’s reliable! Unfortunatley there is a lot of information out there, a lot of it is just wrong and overcomplicates what you need to do, which makes it really hard to learn or get it working :frowning:

ubuntu or centos/rhel are good hosts. KVM/libvirt is a good hypervisor. ubuntu/centos should be good VMs.

I’m not sure on Windows as VM tbh. It may be some of the blackmagic in the blogs you mention is required! But it’s def not that complicated for linux VMs, so maybe start with a linux VM to get the basic working, then if want pci passthrough working into a Windows VM you will know a bit more about basic host and hypervisor config.

You basic steps are:

  1. enable VFIO in the BIOS (e.g. VTd), and confirm the CPU then has the kernel extensions
  2. enable VFIO/iommu in kernel via grub (iommu=on)
  3. get the PCI address for your GPU (lscpi)
  4. assign that PCI address to the VM
  5. should be working

Some thoughts that might help:

  • i think the iommu groups thing is a distraction at this stage, just ensure the kernel parameters have iommu=on and you can tighten up your system later with iommu groups. maybe stuff has changed and it is necessary with new kernels, not sure
  • there should be no need to configure kernel modules, or rebuild the kernel, as some of the guides! iommu=on in the kernel parameters should be enough to tell the kernel to load the right modules
  • once you have confirmed your CPU and kernel are working as expected, and from your console output it looks like they are, what you want next is the GPU PCI address. use lspci. knowing this will ensure you are assigning the right PCI hardware into your VM, and once you are in the VM will allow you to confirm the hardware is passed though or not.
  • life is a lot easier when you are learning about passthrough to switch to working in a GUI for the hypervisor. virtmanager for KVM is excellent, and was the key for me to getting PCI passthrough working. you should be able to see the GPU and confirm its PCI address (or iommu groups if you are still using them), and then just attach it to your VM and start it using the built in GUI functions.
  • virtualization - Ubuntu 22.04 GPU passthrough (QEMU) - Ask Ubuntu is the closest guide i could find to keep it simple and is on the right path. step 9 is possibly not required. and it’s for nvidia, so you will need to tweak a few things for your amd card, but shouldn’t be that different.
  • once you get that working you will be in a much better place as you know it works and you have more knowledge and can then try different OS, tweak iommu groups, or configure PCI passthrough in none GUI environments if that is what you need.

good luck

I see the OP has left, but thought for anyone looking to do GPU pass through that this video has a nice clear run through using proxmox

@6 mins