@osprey
So I got the script working after installing devmem2 as a dependency. I tried setting the power limits to 15 and 30, but I get this output -
**** Current PL values from 'turbostat'
cpu0: MSR_PKG_POWER_LIMIT: 0x280f000dd8078 (UNlocked)
cpu0: PKG Limit #1: ENabled (15.000 Watts, 28.000000 sec, clamp ENabled)
cpu0: PKG Limit #2: ENabled (30.000 Watts, 0.001953* sec, clamp DISabled)
**** Setting PL1=15000000 and PL2=30000000 in /sys/class/powercap/intel-rapl/intel-rapl:0/constraint_*_power_limit_uw
**** PL1 and PL2 already enabled in MSR_PKG_POWER_LIMIT
**** New PL values from 'turbostat'
cpu0: MSR_PKG_POWER_LIMIT: 0x280f000dd8078 (UNlocked)
cpu0: PKG Limit #1: ENabled (15.000 Watts, 28.000000 sec, clamp ENabled)
cpu0: PKG Limit #2: ENabled (30.000 Watts, 0.001953* sec, clamp DISabled)
**** MCHBAR is 0xfed10001
Error parsing devmem2 read output
What is the meaning of clamp disabled and why is the turbo time so low or something? I am just trying to give clues. Also, I fiddled around in the intel-rapl directory shown above, and I do not know what to look for but I see various values for power limit times and stuff like "runtime" is set to 0 and sometimes not and there multiple directories and what not. If you want I might be able to give you a directory copy if it is possible, but I do not think all this is the problem of a config. I am definitely missing something which controls the power limits. Btw, I did try disabling secure boot, and I also tried different power limits but they didn't work.