2024-01-07 12:31:36 +01:00
|
|
|
{ lib, ... }: {
|
2023-11-19 10:07:40 +01:00
|
|
|
# https://knowledgebase.frame.work/optimizing-ubuntu-battery-life-Sye_48Lg3
|
2024-01-07 12:32:11 +01:00
|
|
|
services.power-profiles-daemon.enable = lib.mkForce false;
|
2023-11-19 09:34:23 +01:00
|
|
|
services.tlp = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
2023-11-19 11:30:40 +01:00
|
|
|
# Specific to the Framework, since I have it limited to 80% charge in the BIOS
|
2024-01-05 04:26:13 +01:00
|
|
|
# START_CHARGE_THRESH_BAT0 = 70;
|
|
|
|
# STOP_CHARGE_THRESH_BAT0 = 79;
|
2023-11-19 11:30:40 +01:00
|
|
|
|
2023-11-19 09:34:23 +01:00
|
|
|
CPU_BOOST_ON_BAT = 0;
|
2023-11-19 10:07:40 +01:00
|
|
|
CPU_HWP_DYN_BOOST_ON_BAT = 0;
|
|
|
|
SCHED_POWERSAVE_ON_BAT = 1;
|
|
|
|
NMI_WATCHDOG = 0;
|
2023-11-19 09:34:23 +01:00
|
|
|
CPU_SCALING_GOVERNOR_ON_BATTERY = "powersave";
|
2023-11-19 10:07:40 +01:00
|
|
|
RUNTIME_PM_ON_AC = 0;
|
2023-11-19 09:34:23 +01:00
|
|
|
RUNTIME_PM_ON_BAT = "auto";
|
2023-11-19 10:07:40 +01:00
|
|
|
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";
|
2023-11-19 09:34:23 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|