Fedora 26 ACS Patch Help!

I’ve been using Linux for awhile now but I have recently switched to full time, I was hoping to do GPU pass-through. My PCI Slots all run on one group So I need to do the ACS patch. Problem is I don’t understand how to do it, I see that I need to rebuild the kernel with the patch applied. But that’ where I get stuck. I don’t get how to apply the patch! If anyone could help me link me to a guide on how to this Thank you In advance.

OS: Fedora 26 Gnome
Motherboard: Asrock Z77
CPU: i7 3770
GPU 1: 750 Ti
GPU 2: 1050 Ti

You should follow the instructions here. The "Applying Patches" section may be of interest to you.

1 Like

Thanks this helps alot but now where do I get the ACS patch I've heard that you need a certain one for each kernel version. So where do I get Fedora 26 ACS Patch? After I have the patch i'm going to try this and post results!

Here's an ACS patch that @wendell modified to support recent kernels: https://level1techs.com/sites/default/files/f/a.patch

So I go to do the Patch but which method do I use to patch it and do I use the Link or a file cause the wiki says "testpatch.diff" and that's a "a.patch" file?

With the a.patch file in your kernel source directory, you should be able to do something like this:

git am --signoff < a.patch

to apply the patch to your local copy of the repository.

Either I failed at applying the patch but complied the kernel correctly or the patch does not work on Fedora 26 Release.

Did you boot with the correct kernel boot arguments? iirc it won't enable by default so you have to manually specify it in the kernel boot arguments.

Yeah the 'pcie_acs_patch=downstream' I did that no luck!

Hmm... I'm not sure what could be going wrong. Just to confirm that the arguments got saved in grub's config, could you run dmesg |grep Command and see if pcie_acs_patch=downstream appears there?

Just to make sure I copied it from the terminal, pcie_acs_patch=downstream that's what I have exactly.

Have you tried the other pci_acs_patch modes as outlined here?

Yeah I don't know I might just try to do it again! It seems most of the testing the people have done this with was Beta Releases. So it might now work but who knows.

The Fedora release shouldn't really matter, since the ACS patch only has to do with the Linux kernel

What do you mean?
Edit: Ohh I read that wrong sorry!
Well I was going to try reinstalling to see if I maybe did something wrong!

Okay I've tried Two more time recompiling the kernel still nothing. Wondering if some how I messing up but not sure how!

Did you ever figure this out, I’m having the same issue on Debian 9 with this patch and 4.10.1 kernel.

I patch the source without error, and build and install the kernel, then boot from it, but I can’t seem to get my 1x PCI-E devices out of group 15.

I have a Ryzen 7 1700 with an ASUS B350-F logicboard. I’m trying to split my 1x PCI-E slots to be in there own IOMMU Groups, but I’m not having any luck.

I downloaded a ACS patch, as well as the kernel source for 4.10.1. I applied the patch without error and did:

    make nconfig ( saved the default config )
    make clean
    make -j16 deb-pkg

All went without error and I installed the resulting .deb.

`sudo dpkg -i linux-image-4.10.1_4.10.1-1_amd64.deb`

That went without error, and I rebooted my system from the new kernel, however I can’t seem to split any of the 1x PCI-E devices.

I have, what I think is the correct kernel command:

Command line: BOOT_IMAGE=/boot/vmlinuz-4.10.1 root=UUID=258e1e27-c00d-46f7-9204-40f3132ddd79 ro pcie_acs_override=downstream quiet amd_iommu=on rd.modules-load=vfio-pci vfio_iommu_type1.allow_unsafe_interrupts=1 video=efifb:off

I can’t seem to figure what I’m doing wrong?

    IOMMU Group 0 00:01.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1452]
    IOMMU Group 10 00:08.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1452]
    IOMMU Group 11 00:08.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:1454]
    IOMMU Group 12 00:14.0 SMBus [0c05]: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller [1022:790b] (rev 59)
    IOMMU Group 12 00:14.3 ISA bridge [0601]: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge [1022:790e] (rev 51)
    IOMMU Group 13 00:18.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1460]
    IOMMU Group 13 00:18.1 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1461]
    IOMMU Group 13 00:18.2 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1462]
    IOMMU Group 13 00:18.3 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1463]
    IOMMU Group 13 00:18.4 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1464]
    IOMMU Group 13 00:18.5 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1465]
    IOMMU Group 13 00:18.6 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1466]
    IOMMU Group 13 00:18.7 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1467]
    IOMMU Group 14 01:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd Device [144d:a804]
    IOMMU Group 15 03:00.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Device [1022:43bb] (rev 02)
    IOMMU Group 15 03:00.1 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] Device [1022:43b7] (rev 02)
    IOMMU Group 15 03:00.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43b2] (rev 02)
    IOMMU Group 15 1d:00.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43b4] (rev 02)
    IOMMU Group 15 1d:01.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43b4] (rev 02)
    IOMMU Group 15 1d:04.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43b4] (rev 02)
    IOMMU Group 15 1d:06.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43b4] (rev 02)
    IOMMU Group 15 1d:07.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43b4] (rev 02)
    IOMMU Group 15 1e:00.0 Ethernet controller [0200]: Intel Corporation I211 Gigabit Network Connection [8086:1539] (rev 03)
    IOMMU Group 15 1f:00.0 Network controller [0280]: Broadcom Limited BCM4360 802.11ac Wireless Network Adapter [14e4:43a0] (rev 03)
    IOMMU Group 15 22:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF108GL [Quadro 600] [10de:0df8] (rev a1)
    IOMMU Group 15 22:00.1 Audio device [0403]: NVIDIA Corporation GF108 High Definition Audio Controller [10de:0bea] (rev a1)
    IOMMU Group 15 25:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 03)
    IOMMU Group 16 26:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480] [1002:67df] (rev e7)
    IOMMU Group 16 26:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:aaf0]
    IOMMU Group 17 27:00.0 VGA compatible controller [0300]: NVIDIA Corporation NV43 [GeForce 6600] [10de:0141] (rev a2)
    IOMMU Group 18 28:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Device [1022:145a]
    IOMMU Group 18 28:00.2 Encryption controller [1080]: Advanced Micro Devices, Inc. [AMD] Device [1022:1456]
    IOMMU Group 18 28:00.3 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Device [1022:145c]
    IOMMU Group 19 29:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Device [1022:1455]
    IOMMU Group 19 29:00.2 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] [1022:7901] (rev 51)
    IOMMU Group 19 29:00.3 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Device [1022:1457]
    IOMMU Group 1 00:01.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:1453]
    IOMMU Group 2 00:01.3 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:1453]
    IOMMU Group 3 00:02.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1452]
    IOMMU Group 4 00:03.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1452]
    IOMMU Group 5 00:03.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:1453]
    IOMMU Group 6 00:03.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:1453]
    IOMMU Group 7 00:04.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1452]
    IOMMU Group 8 00:07.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1452]
    IOMMU Group 9 00:07.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:1454]

My 1x PCI-E devices always end up in the same group as everything in group 15.