fix: sync Intel WMI CPU power limits to RAPL powercap interfaces#146
fix: sync Intel WMI CPU power limits to RAPL powercap interfaces#146scardracs wants to merge 2 commits into
Conversation
|
@denisu14 as I don't have an Intel CPU I can't test it. It should work but please test it |
|
@scardracs sorry for the late reply. the patch doesn't work for me. i'll investigate and see what fails and let you know. |
|
okay. found something in journald. I had deleted my asusd.ron config and default is false for the tuning field so it disabled this code path. I thought changing it back to true would fix everything but turns out the patch actually times out the systemd service by infinitely looping and setting pl1 when service starts. Fix: scardracs#1 |
|
We may want to add a way to set |
I think #142 will make everything easier once merged |
The recursive walk caused the asusd service to indefinitely loop by following symlinks. Instead just write to the top level package zones directly.
Yeah, way better than my implementation. Merged on my branch |
Description
Sync Intel CPU power limits (
ppt_pl1_spl,ppt_pl2_sppt,ppt_pl3_fppt) to the kernel's RAPL (powercap) sysfs interfaces.On modern Intel-based ROG laptops (such as the i9-13980HX on Strix G814JZ), the ASUS BIOS/WMI firmware does not correctly propagate or synchronize WMI power limits to the actual CPU MSR or MMIO RAPL registers. Writing to the WMI attributes under
asus-armourysucceeds and reads back correctly, but has no actual hardware effect because the kernel'sintel-rapl-mmiocontroller remains hard-locked at default constraint wattages (e.g., 45W/90W).This patch bridges the gap by writing directly to the corresponding
/sys/class/powercapnodes when Intel limits are set.Changes
/proc/cpuinfocheck (GenuineIntel) to ensure this logic is only applied on Intel platforms./sys/class/powercapto find any directories belonging tointel-rapland updates:constraint_0(PL1 / SPL)constraint_1(PL2 / sPPT)constraint_2(PL3 / fPPT)How to Test
Apply any CPU power limits via
asusctl:Closes: #145
Assisted-by: Antigravity:gemini-3.5-flash
Signed-off-by: Marco Scardovi scardracs@disroot.org