Kernel updates on 18.04 + ACS patch

Hi, are there any negative impacts of upgrading the default kernel provided on Ubuntu 18.04 LTS (apart from loosing support).
One example for me is NOT being able to install ZFS as the compiler would still be looking for 4.15 references after upgrade (removing the original kernel and updating initramfs would not help).
It seems an ecosystem of components are tight to a specific or ‘supported’ version.

As a side question, would applying the ACS patch bring any instabilities to the system? Thanks

no, provided you patch properly

I personally use pre-compiled ACS kernels from the link below on my Ubuntu 18.04 install.

The ACS patch alone only is also available… but never tried to compile it myself.

Have you? What command line(s) do you use?

https://queuecumber.gitlab.io/linux-acs-override

Found a couple of other scripts here, but not sure what they’re worth:

https://gist.github.com/mdPlusPlus

Start with pcie_acs_override=downstream, see if that does the trick. If not, change it to pcie_acs_override=downstream,multifunction.

Those scripts mostly just automate updating and installing. Not sure they’re that useful.

My question is related to how to apply the ACS script (from the command line) to an existing kernel.
Per-compiled kernels I’ve downloaded from this web site are working great… but my point is to know how to compile it myself :wink:

You need to patch the kernel sources and recompile. You can’t just apply the patch to an existing compiled (binary) kernel.

This article is pretty accurate, if only a bit old:

https://help.ubuntu.com/community/Kernel/Compile

In addition to that, you’ll need to use patch to apply the acs patch to the kernel sources. I think the flags were -np1, so it would look like this:

patch -np1 < /path/to/acs-overrides.patch

Once you get that done, you can go about the compilation procedure, by running the following:

make mrproper
make xconfig # then you choose the configuration you'd like
make -j$(expr $(nproc) + 1) deb-pkg

You’ll then be left with a couple deb files you can use to install the kernel.

2 Likes

Thanks a lot, I’ll give that a go.

For information, what preferred method do you guys use to properly install an ACS patched kernel?

I install one that’s previously been compiled. I don’t have time to wait for it to build.

Any thoughts on the first question: have you ever experienced any regressions updating the default/supported kernel with a ‘stable’ but more up-to-date one?

this isn’t unheard of, even on the default kernel

1 Like

Apart from loosing support obviously :thinking:

I’ve found that the updated kernels from UKUU have broken KVM functionality for AMD processors. They fail to initialise the AMD cryptographic coprocessor, and don’t load the kvm-amd kernel module. Pretty much the only reason I’m still on the stock kernel.

Hum… I really doubt this would be happening!!
You may have an unsupported hardware configuration that causes the issue.
All talks and videos from L1T showing AMD kernel upgrades with UKUU never actually reported what you’re describing here.
I am about to order a full AMD rig for KVM… and plan to upgrade kernel, apply ACS patch, update MESA drivers, etc. I hope things won’t go that bad!

fedora and arch are generally preferred for vfio, as precompiled patches are available and you don’t have to deal with apparmor.

I know tools exist, but ubuntu tends to be less robust when it comes to extensive system and configuration changes over time.

I too would be interested in a custom kernel script that would do zfs + acs. As of right now I just have some notes for myself that I copy/paste every time I install a new kernel. Kind of a PITA. A script would be nice! (using ubuntu 18.04)

that’s just the nature of the beast with canonical unfortunately.

leave no upstream default untouched, no library unspun, no standard slightly subverted.

Would you be more inclined to use a distro like Arch Linux (or one of its derivatives) for that purpose e.g. Manjaro, Antergos?

here’s the distribution of passthrough VM users according to the https://www.passthroughpo.st survey:

image

note that manjaro changes a lot of upstream defaults and is generally not considered arch-compatible. I’d recommend any other arch derivative over it for this reason.

I don’t have a preference, but the community consensus is that rolling release community distributions are better.