cyring / CoreFreq

CoreFreq : CPU monitoring and tuning software designed for 64-bit processors.
https://www.cyring.fr
GNU General Public License v2.0
1.98k stars 126 forks source link

DKMS build failure on linux-cachyos-bore 6.2.0-3 #417

Closed gel-crabs closed 1 year ago

gel-crabs commented 1 year ago

Hey, getting a build failure with the new 6.2 release; the DKMS make log is attached below.

make.log

cyring commented 1 year ago

Hello, According to the log, is Bore patch altering the cpufreq_unregister_driver kernel function ? Or is CONFIG_CPU_FREQ missing within the kernel build ?

gel-crabs commented 1 year ago

No, it's actually amd_pstate: https://github.com/CachyOS/kernel-patches/blob/master/6.2/0008-Implement-amd-pstate-epp-and-amd-pstate-guided-drive.patch

cyring commented 1 year ago

No, it's actually amd_pstate: https://github.com/CachyOS/kernel-patches/blob/master/6.2/0008-Implement-amd-pstate-epp-and-amd-pstate-guided-drive.patch

Thanks. But why those guys are changing the kernel function prototypes !

https://github.com/CachyOS/kernel-patches/blob/42c851cc060528a8b69c841846f401e4c8be2a40/6.2/0008-Implement-amd-pstate-epp-and-amd-pstate-guided-drive.patch#L1408

Here's a fix suggestion to apply in these lines: https://github.com/cyring/CoreFreq/blob/2e293e5102cd6c85b3454902fdaf2c9659dfe017/corefreqk.c#L20620

static int CoreFreqK_FreqDriver_UnInit(void)
{
#ifdef CONFIG_CPU_FREQ
    cpufreq_unregister_driver(&CoreFreqK.FreqDriver);
#endif /* CONFIG_CPU_FREQ */
    return 0;
}
gel-crabs commented 1 year ago

That fix works!

cyring commented 1 year ago

It would be easier to conditionally buid instructions if Bore has a version like kernel has LINUX_VERSION_CODE I have found none.

cyring commented 1 year ago

Just for checking non regression with Linux 6.2.0-1-mainline

Build and run fine.

2023-02-21-060545_644x1012_scrot

ptr1337 commented 1 year ago

@cyring

I think you will have the problem anyways with 6.3 then. We just pulled the recent patches for the amd-pstate from upstream. amd-pstate-guided will probably get merged with 6.4.

Actually these changes, which you wrote above will land into the 6.3 Kernel. See here: https://github.com/CachyOS/linux/commit/418cd789efe547057f7df184bcd641c0f3ae28a7 https://lore.kernel.org/lkml/CAJZ5v0iCmhEQSVZ8nKPZz63uQ+svRst_3N-WoxwOa617H4h9=w@mail.gmail.com/

So, further it need to be fixed anyways, as soon 6.3 rc1 will drop in. Thats a upstream change (soon)

cyring commented 1 year ago

@ptr1337 thank you very much for your information.

@gel-crabs can you please try commit 34efe5d3e6c79e5fddf78350da6fe4b7de0a63a8 ?

cyring commented 1 year ago

Fix released