[SOLVED]VFIO Not recognizing my GPU properly (Check description)

Edit: I originally posted this under the linux forum because I misidentified my issue as a linux problem, and not a problem with my implementation of VFIO. The original title of this post was “Debian 12 isn’t recognizing my GPU properly.” The lovely user mauli corrected my issues and pointed me in the right direction, so all credit goes to them.

Hello! I’m pretty new to linux (currently running Debian 12), and I’m having an issue I’m not sure how to get around. I’m trying to set up VFIO on my machine, but I’m not having any luck. Funnily enough, I was able to get it to work with my audio controller for my GPU, but not the GPU itself. I think that’s because if I do “lspci -k”, or “screenfetch”, or anything that’ll give me GPU information, it’s listed as the following (this specifically is how it’s listed in screenfetch):
AMD/ATI Navi 23 [Radeon RX 6600/6600 XT/6600M], AMD/ATI Cezanne [Radeon Vega Series / Radeon Vega Mobile Series]

My GPU is a 6600, and I’m assuming it’s failing to work because I have some sort of non-specific graphics driver? I’m really not sure. I followed the tutorial on the “ATIHowTo” article on the debian wiki to install firmware, and I went to AMD’s website and downloaded the ubuntu drivers they had.

I guess I should clarify, that this is all a big guessing game for me. All I know is that my output looks like what I put above. I don’t know if that’s a problem, and I don’t know how to fix it. So any advice is greatly appreciated.

Hi and welcome to the forum!

Generally the driver detection looks correct to me, the system detects the category of driver which is generally required by the kernel/graphics module to talk to the device.

If you say you want to setup VFIO, it means you want to not use the hardware on your system, host level, but actually PCI passthrough inside a virtual machine. If that is the case, you do not need to get any driver working, as you will directly be handing over the native hardware device. And the host will be using the built-in motherboard (or 2nd attached) graphics output.
Actually, you will want to disable your host to attach any driver to the “to be VFIO used” device, as it changes states inside the hardware you better want untouched (so to say).
Debian is not the best personally to recommend for passthrough, at least their own wiki page about this topic is a little outdated (last modified 2021), but my personal experience on this topic is rusty, so maybe someone else can chimp in and correct me.

If the topic is spot on, I can recommend reading PCI passthrough via OVMF - ArchWiki, even though it is inside the ArchLinux wiki, it has very detailed and great explanation around this topic in general for Linux kernel based systems.

Sorry if I misunderstood your question if above assumption is not correct. Can you maybe specify a little more on what it is you are trying to get to work, and in what way it is failing?

Thank you for the warm welcome!

No, you’re right about my issue, I just think my inexperience is showing. I’m not sure why VFIO isn’t working, and I thought that the gpu thing might be my issue, hence why I posted it here instead of the VFIO area of the forum. On the subject of VFIO, my basic issue is this.

I’ve been told that if I get VFIO up and working correctly, when I do something like “lspci -k”, It’ll show the kernel driver for my GPU is vfio-pci, but mine is stuck at amdgpu. For some reason though, the audio controller for my gpu does show vfio-pci as the kernel driver.

I have iommu enabled in the bios and my primary display driver set to my iGPU. in /etc/default/grub I have the defaullt linux cmdline as the following: GRUB_CMDLINE_LINUX_DEFAULT=“quiet amd_iommu=on vfio-pci.ids=1002:73ff,1002:ab28” (the first id is my gpu, the second is the audio controller)

I also have this in my /etc/modules:
vfio, vfio-pci, vfio_iommu_type1, vfio_virqfd (they’re on separate lines in the file)

and I have this in my /etc/initramfs-tools/modules:
vfio_pci ids=1002:73ff,1002:ab28

I’ve updated grub and initramfs, but it still isn’t working for me.
The only thing I can think that might be the issue, is that when I updated initramfs, I got a bunch of warnings like this:
W: Possible missing firmware /lib/firmware/amdgpu/smu_13_0_10.bin for module amdgpu

But from what I could find, these warnings are generally not much to worry about, just make sure I run something like “sudo dmesg | grep amdgpu” to make sure that everything loaded correctly on startup (which it did as far as I can tell).

Sorry to just dump a bunch of stuff on you like this! I don’t really know what information is important or not, so I’m just including everything I can think of. Anyway, I’ll check out the guide you provided me, and hopefully it’ll have some answers. But if there’s anything that jumps out to you as immediately wrong or something I could try, please let me know!

EDIT: I finally got it to work! I followed the guide you provided and did literally every method they suggested for loading vfio-pci early and it finally worked. Thank you for the help!