Attention amd vfio users do not update your bios

yeah, I’ve been checking on that. Patch still definitely works up to AGESA 1.0.0.3 . I can’t say if it works for 1.0.0.3 ABB but I’m fairly sure it does. The only reason I haven’t updated to that one is because Asrock specifically says not to if you are using Pinnacle Ridge

1 Like

Patching + compiling a kernel is a huge pain in the ass on deban / ubuntu and I needed to stop giving people an answer that was better than “just use arch” when asked how to apply this fix on their .deb distro. So, I went ahead and fired up a VM and made some kernel binaries and uploaded them to my VPS. Hope this helps.

http://66.151.138.143/ubuntu_patched/

So for my configuration

Asrock X470 Fataility Gaming K4
Latest bios
Ryzen 7 2700x

Ubuntu 19.04
Kernel 5.3.1 + pci patch

and for compiling the kernel on Ubuntu, I just released a script to that that all for you as i know for people beginning to use linux compiling the kernel can be frustrating for many first time users.

1 Like

Good stuff dude. Thank you

Using AcidzDesigns script below as reference, I made one for compiling the kernel 5.2 in debian 10 buster. Only made a test but it seems to work. If you want to test it you can obtain it here: https://forum.level1techs.com/t/ubuntu-arch-header-127-bug-script-to-patch-and-compile-the-kernel/148152/3

2 Likes

I tried now and it worked flawless.
Thank you man.

If you are using Fedora you might want to read this:

This fixed the issue for me using a Asrock X370 Killer SLI @ 5.40 BIOS. (5.50 is not for 1xxx Ryzens)

So, I hear that AGESA 1.0.0.4 is rolling out to motherboard manufacturers. Has anyone given it a try to see if it helps with this issue?

Has nobody tried 1.0.0.4 yet? I would like to know more about it too since I am still running an ancient bios version and would like all the new updates. Can someone please inform me which patch I would need to make it work when the new AGESA version still does not fix the bug?

Based off my testing, I am fairly certain this patch will continue working on these BIOS upgrades for the foreseeable future.

The linked how-to is a bit out of date. Search the forum for fedora kernel for a more up to date guide.

Also with agesa 1.0.0.4b the kernel patch is generally unnecessary., Just make sure iommu is enabled not auto

2 Likes

That’s good to know. Also maybe it’s worth noting that Aiber mentioned to me that the patch shouldn’t negatively impact an already working system if applied (in case anyone is worried about that)

What do you mean with generally unnecessary? I understand it that way that I won’t get an “Error: unknown pci header type ‘127’”-Message but in general the iommu groups could be worse/different than before? Do I understand that right?
I am asking since as I said before I am running an ancient bios version that does not have any problems. I would update my UEFI to the current version, but only if that means that I will not need to patch my kernel.

You shouldn’t need to patch your kernel now. There were some intermediate versions of the bios where that might have been true though.

I can indeed confirm that my board works with 1.0.0.4 Patch B as intended. I don’t get a 127-Error. The IOMMU groups changed so I needed to make sure that I updated the devices I passed though to my VMs but now everything works fine.

2 Likes

I’ve switched to Threadripper and Gigabyte Designare EX using AGESA 1.1.0.2 (Bios F12i) and there the patch is still needed.
Maybe that info helps somebody with the same board.

Finally a latest X370 BIOS that works with vfio
The latest Gigabyte BIOS is allowing me to pass through the graphics card.

It’s:
F50a

Update AMD AGESA 1.0.0.4 B

Another data point:

System:

  • Ryzen 3700X
  • X470 Taichi
  • BIOS 3.77 (beta) with AGESA Combo-AM4 1.0.0.4 Patch B
  • Linux kernel 5.3, no ACS or PCI 127 bug patches

Results:

  • improved IOMMU separation of devices attached to the chipset (USB, audio and SATA)
  • no Unknown PCI header type ‘127’ issues, allowing VMs to be stopped/started multiple times without the host being rebooted.

Conclusion

  • AGESA Combo-AM4 1.0.0.4 Patch B fixes issues faced previously (YMMV)
  • Many vendors have already released BIOSes with this AGESA version for some/all of their motherboards (still waiting on ASRock to release a non-beta version for the X470 Taichi)
  • If the option is available for your motherboard, it might be worth upgrading (again, YMMV)
  • AMD/vendors could potentially break all of this in the future (but that’s a story for another day)

IOMMU groups available here

Just giving an update.

After upgrading to AGESA 1.0.0.4b on my ASUS Prime X470 Pro motherboard with a Ryzen 3900x and a (previously working with a 1700X and older bios) RX 570, the -127 error doesn’t happen under Unraid anymore, but when rebooting a VM, the screen goes black and the CPU goes to maximum and then the entire server becomes unresponsive. I’ve tried this several times, with both MacOS and Linux Mint VMs. I suspect the issue is still related to the AMD GPU reset bug but I got fed up with the situation and dug out my old GTX 950 from storage and installed that and now the VMs work as expected with passthrough. No crashes or black screens after rebooting a VM.

That’s a shame because my Hackintosh VM works much easier with AMD GPU’s but I’ve lived under Nvidia’s terrible net drivers before, I can do it again.

I have put AGESA 1.0.0.4 Patch B on several Asrock AM4 machines with different chipsets. X370, B450 (2 different mobos), X570. Used the following CPUs/APUs: 2400G, 3400G, 1600x, 3900x, 3950x in various mobos.
Now that we know about fixing the FLR problem with USB/HD audio passthrough I am unaware of any other problems with these BIOSes compared to the Pinnacle PI AGESA 1.0.0.6.

CPU and memory clocking appears to work just as well on older CPUs compared to older BIOSes, passthrough works well with new CPUs and I can passthrough more devices than before (did limited testing on this but the ACS CER cap options definitely improved things).
So I suggest that you shouldn’t be afraid of this BIOS update. But if you don’t have a new CPU not much point in updating anyway. Lots of new things to play with. BIOS now shows report window of RAM profiles, per ccx OC, faster boot, better iommu…

Note though that I DID see a new updated VBIOS on the 2400G. (I did a before/after VBIOS dump) So it is possible that they could have fixed an integrated graphics bug of some kind with new gpu firmware. Although I didn’t notice any changes with the IGPU after the update. You can still assign how much RAM you want to the IGPU on both 2400g/3400g on both old and new mobos.