Compling the zen kernel with minor changes to its .config

Hi guys,

as I’ve installed EOS on a freshly build machine, using AMD hardware, I wanted to get the most out of it (e.g. amd_pstate_epp in active mode, CPPC and such)

I was not able achieve that with regular kernel out of the box, and some functionality strictly required to build into the kernel during compilation explicitly.

Thus, I followed the arc wiki and did the recommended changes by avoiding to build the documentation, renaming the pkgbase. And the only changes I’ve needed were
some different entries within the .config file of the package.

Which are these, essentially:

CONFIG_X86_INTEL_PSTATE=n
CONFIG_X86_PCC_CPUFREQ=n
CONFIG_X86_ACPI_CPUFREQ=n
CONFIG_X86_ACPI_CPUFREQ_CPB=n
CONFIG_X86_POWERNOW_K8=n
CONFIG_X86_P4_CLOCKMOD=n

Thus, as a cpu frequency scaling driver, only the AMD_pstate_driver is being build with the standard kernel parameters. But ACPI_CPUFREQ isn’t even complied. Furthermore, excluding other CPU architectures or interfering scaling drivers (POWERNOW_K8) are excluded.

So, long story short. And my real question:

How can I streamline this process. And eventually integrate those minor changes into a convenient update routine ?

I’ve tried to integrate these manual changes by the use of yay -G to check out the package locally, doing the changes manually and to build & install the local package version with yay -Bi, but the local changes to PKGBUILD and .config are overwritten, which is an unresolved issue actually.

This might work - do all your edits, then in the directory of the PKGBUILD:

sudo chattr +i PKGBUILD

Then makepkg -sic to cleanbuild. Basically it is making the file immutable, -i turns it back to normal.

This interferes with updpkgsum

Hello,

You should get amd_pstate_epp by default when amd_pstate is set to active.

cat /proc/cmdline

show you the parameters from your bootloader config.

Well, I guess the major culprit has been that during my initial install CPPC has been not activated in the BIOS of my system and needed an bios upgrade as well. Due to these reasons I’ve ended up without the pstate driver during that installation, I guess ?

Only after I performed the local pkgbuild of the zen kernel I was able to activate it.

Anyway, I’ve rechecked everything. And as the regular kernel is now also working with the pstate driver in active mode, I’ve tried to install the zen kernel directly without building it locally. And it works. Thus, no need for further tinkering and building the kernel locally for each update. Which is actually a bit more practical.

Thus, case closed :wink:

I don’t think I had to activate anything in the bios (ROG STRIX B550-F GAMING), and now I use linux-tkg kernel, with BORE scheduler, which has a nice PKGBUILD/install script.