nix/nixos/common/services/tlp.nix

33 lines
No EOL
948 B
Nix

{ ... }: {
# https://knowledgebase.frame.work/optimizing-ubuntu-battery-life-Sye_48Lg3
services.tlp = {
enable = true;
settings = {
CPU_BOOST_ON_BAT = 0;
CPU_HWP_DYN_BOOST_ON_BAT = 0;
SCHED_POWERSAVE_ON_BAT = 1;
NMI_WATCHDOG = 0;
CPU_SCALING_GOVERNOR_ON_BATTERY = "powersave";
# Specific to the Framework, since I have it limited to 80% charge in the BIOS
START_CHARGE_THRESH_BAT0 = 70;
STOP_CHARGE_THRESH_BAT0 = 79;
RUNTIME_PM_ON_AC = 0;
RUNTIME_PM_ON_BAT = "auto";
PCIE_ASPM_ON_AC = "default";
PCIE_ASPM_ON_BAT = "powersupersave";
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_MIN_PERF_ON_AC = 0;
CPU_MAX_PERF_ON_AC = 100;
CPU_MIN_PERF_ON_BAT = 0;
CPU_MAX_PERF_ON_BAT = 30;
PLATFORM_PROFILE_ON_AC = "performance";
PLATFORM_PROFILE_ON_BAT = "low-power";
};
};
}