Return to Level1Techs.com

Windows 10VM , GPU Passthrough -> PCI Header Error Nr .127

#1

Hello there,

I’m new to this Forum so please be gentle :smiley:
So what’s the Problem here? I followed the “Wendells” Guide VFIO in 2019 using PopOS 18.04 and everything seems to fit until I reach the Point of starting my VM after the GPU is attached. At first it starts with no Output on the second Monitor, after I stop the VM (forced shutdown due to no VGA Output) the Virtual Machine Manager throws in “Unknown PCI header type ‘127’”. This can only be solved by restarting the Host. But the Problem of no Output remains. The NVIDIA GPU (Gainward 960GTX Phantom 4GB) is claimed by “vfio-pci” and only the second GPU (a very old HD3450) is used by GNOME. The NVIDIA GPU and it’s Audio Device are in the only Devices that are in IOMMU Group 15, so that seems also to work.

Did anyone encounter this or has a solution?

0 Likes

#2

I have been fighting this issue for about a week, you need to patch and recompile the kernel with the pci patch

https://clbin.com/VCiYJ

This patch might work for you, ive only tested this is with a AMD GPU

2 Likes

#3

I think there is a better version of this patch here on the forum somewhere. It might be nice to know more about the host system?

0 Likes

#5

Hello there,

the Host System consists of the following Components:

  • AMD Ryzen 5 2600
  • ASROCK B450 Pro 4 Motherboard
  • 16GB GSkill DDR4
  • 240 GB NVME SSD for PopOS (Slot: M2_2 on Mainboard, as in Slot M2_1 PCIE4 would be deactivated)
  • 240 GB SATA SSD for VM (not used at the Moment, the VM Image is on the NVMe atm)
  • Gainward GTX960 Phantom 4GB (for passthrough, claimed by vfio) - PCIE2 Slot
  • very old HD3450 Passive cooled GPU used by Host System - PCIE4 Slot

The Gainward GTX960 ist in IOMMU Group 15 with it’s Audio Device…

using PopOS! 18.04 …

0 Likes

#6

You probably have the acs patch which can be sketchy. Do you know if the bios for that board lists combopi 1.0.0.3m

0 Likes

#7

I will take a look when my Kids let me :wink:

0 Likes

#8

taken a look, newest bios (already applied) lists the following “Update AMD AGESA Combo-AM4 1.0.0.1”. I guess that is what you are refering to…

0 Likes

#9

Just wanted to express my gratitude Here. Thanks to the PCI patch and recompiling the kernel, the GPU passthrough works Luke charm. OBS running with NVEnc in VM. Now I need to passthrough the USB controller in order to get more performance with the avermedia lgp lite… Again thank you both for helping me out…

1 Like

#10

Has this or any similar patch been submitted to the kernel as far as you know?

1 Like

#11

Yeah I’m also facing the same problem with:

OS: Fedora 30 / 5.1.18-300.fc30.x86_64
CPU: AMD RYZEN R7 1700
Motherboard: GA-AX370-Gaming-K7
GPU 01: (Host): NVIDIA GTX 1080
GPU 02: AMD R9 285/300

@wendell is this a patch we can push upstream?

0 Likes

#12

ASRock has recently released a new BIOS v3.40 vs. the BIOS you mention that is v3.31, it purportedly only improves Matisse support, but may be worth a shot.

Your motherboard also has some AGESA updates that may help if you haven’t already tried updating your BIOS? Also be careful with kernel 5.1.1x as there was some regression regarding VFIO if memory serves me correctly. I would also recommend 5.2 in the interim.

I believe there are some new merges for the 5.3 kernel specifically relating to VirtIO-PMEM and VirtIO-IOMMU drivers.

0 Likes

#13

Me2

OS: Fedora 30 / 5.1.17-300.fc30.x86_64
CPU: Ryzen R5 1600
Motherboard: GA-AB350N-GAMING WIFI with latest (available) Agesa (1.0.0.3 ab)
GPU: AMD Radeon HD 7870 GHZ

For all of u running Fedora, I made a Dockerfile to automatically compile the Fedora-Kernel with the patch enabled!

FROM fedora:30

ENV KVER kernel-5.1.17-300.fc30

RUN sudo dnf -y install fedpkg fedora-packager rpmdevtools ncurses-devel pesign
RUN rpmdev-setuptree && cd ~ && koji download-build --arch=src $KVER.src.rpm
RUN useradd -s /sbin/nologin mockbuild && rpm -Uvh ~/$KVER.src.rpm && cd ~/rpmbuild/SOURCES && curl -o agesa.patch.org https://clbin.com/VCiYJ
RUN cd ~/rpmbuild/SOURCES && echo 'From: Aiber Who <[email protected]>' > agesa.patch && echo 'Subject: [PATCH] agesa patch' >> agesa.patch && echo '' >> agesa.patch &&\ 
	cat agesa.patch.org >> agesa.patch && rm agesa.patch.org && cat agesa.patch
RUN cd ~/rpmbuild/SPECS/ && sudo dnf -y builddep kernel.spec
RUN cd ~/rpmbuild/SPECS/ && sed -i -e 's/# define buildid .local/%define buildid .agesa/g' kernel.spec && sed -i "s/# END OF PATCH DEFINITIONS/# END OF PATCH DEFINITIONS\nPatch9001: agesa.patch/" kernel.spec
RUN cd ~/rpmbuild/SPECS/ && rpmbuild -bb --without debug --target=x86_64 kernel.spec

ENTRYPOINT cp ~/rpmbuild/RPMS/x86_64/kernel* /output

To build the kernel just run sth like:

mkdir ~/custom-kernel && cd ~/custom-kernel
curl -L -o Dockerfile https://pastebin.com/raw/fPWv6NVe
docker buid -t custom/fedora-kernel . && mkdir out
docker --rm  -v ~/custom-kernel/out:/output custom/fedora-kernel
1 Like