Solved: Booting a Radeon 5700 with IOMMU

Hi, I’m unable to boot my rig with a 5700 XT with IOMMU enabled in the BIOS.

Many instances of the error below, followed by a kernel panic:
iommu ivhd0: Event logged [IOTLB_INV_TIMEOUT device=27.00.0]

Tried with PopOS 19.10 (kernel 5.3) and the latest Manjaro (kernel 5.4.6) without success with IOMMU enabled in BIOS.

The only solution I have found so far is to add ‘amd_iommu=off’ at the boot loader screen.

The problem is that I have an RTX 2080 card I want to passthrough to a VM at a later stage so I need IOMMU for VFIO.

Has anyone managed to find a solution to this problem?!
Using B450 motherboard and Ryzen 3800X.
Thank you.

Managed to find a workaround by swapping the GPU on the primary PCIe port on the motherboard.

Strange that IOMMU would not work with the 5700 series on a different 16x slot: frustrating!

typical host card is top slot while guest card is second slot. the other way to do this is a time consuming headache with grub and blacklisting and controlling boot order of devices. ( not worth it)

The problem was that the 2nd PCIe 16x slot is part of a more global IOMMU group on my motherboard so that I couldn’t isolate the GPU!

This is what I’ve done to make things work:
1st PCIe slot - NVIDIA GeForce RTX 2080 (guest GPU)
2nd PCIe slot - AMD Radeon RX 5700 XT (host GPU)

BIOS: use UEFI, not Legacy/CSM and make sure Secure Boot is disabled.
This would allow the 2nd PCIe slot to initialize during POST :wink:

Now to solve the errors with an AMD card inserted in the 2nd PCIe slot:
iommu ivhd0: Event logged [IOTLB_INV_TIMEOUT device=27.00.0 …]
BTW, no problems with any NVIDIA card

Start your favorite live USB distro (tried on Pop!_OS and Manjaro) and press “e” to edit the boot menu and add:
pci=noats

Works perfect now!

Question: Does passing through a AMD card via IOMMU VM also work fine? Was thinking of getting a APU down the line and doing this.