Hi, I bought a new laptop recently, running this nixos configuration. The laptop has a i7-1370P which has 6 performance cores (2 thread each) and 8 E-core, for a total of 14 cores and 20 threads. It also has a frequency range from 400Mhz to 5.2Ghz.
I am facing issues with the CPU frequency when trying to do heavy work (for instance, compiling a lib with cmake). In such scenario the frequency throttle down to 800Mhz:
$ cat /proc/cpuinfo | grep "cpu MHz"
cpu MHz : 800.008
cpu MHz : 799.991
cpu MHz : 800.016
cpu MHz : 800.000
cpu MHz : 800.016
cpu MHz : 800.016
cpu MHz : 799.991
cpu MHz : 799.983
cpu MHz : 800.008
cpu MHz : 800.000
cpu MHz : 799.991
cpu MHz : 800.008
cpu MHz : 799.984
cpu MHz : 800.006
cpu MHz : 799.983
cpu MHz : 800.006
cpu MHz : 799.963
cpu MHz : 799.996
cpu MHz : 799.991
cpu MHz : 800.008
$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
700000
699992
699978
700006
699998
700003
700003
700005
699997
700009
699993
699992
700014
700000
700000
699992
700013
700000
700007
700000
What i have tried so far
The first thing I did is looking into NixOS-hardware, but unfortunately, there is no module for my laptop (Thinkpad P16s gen2 Intel).
I have set the lastest available kernel from nixpkgs, using boot.kernelPackages = pkgs.linuxPackages_latest;
, as I heard it had better support with newer CPU.
$ uname -a
Linux Sigmachine 6.12.3 #1-NixOS SMP PREEMPT_DYNAMIC Fri Dec 6 06:20:46 UTC 2024 x86_64 GNU/Linux
Then I started tweaking governor settings:
I made sure to use the following setting for powerManagement:
powerManagement = {
enable = true;
cpuFreqGovernor = "performance";
};
and also tried the following variant for this kernel parameters which i found on other similar discourse posts:
boot.kernelParams = [ "intel_pstate=active" ];
boot.kernelParams = [ "intel_pstate=disable" ];
boot.kernelParams = [ "intel_pstate=passive" ];
Disable this options, as a post suggested it could be part of the problem:
services.power-profiles-daemon.enable = false;
I also tried settings cpufreq.min
setting to 5.0Ghz
, and tried auto-cpufreq
:
services.auto-cpufreq.enable = true;
services.auto-cpufreq.settings = {
battery = {
governor = "powersave";
turbo = "never";
};
charger = {
governor = "performance";
turbo = "auto";
scaling_min_freq = 520000000;
};
};
I feel like I am running out of options, and I am not quite familar with all the settings i had to manipulate so far. I am seeking for help to hoppefuly debug and fix this situation