From b2704979b76d0a48b0dbe745eb3a615361a78112 Mon Sep 17 00:00:00 2001 From: iFargle Date: Sun, 19 Nov 2023 18:07:40 +0900 Subject: [PATCH] Update TLP config for the laptop --- nixos/common/services/tlp.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/nixos/common/services/tlp.nix b/nixos/common/services/tlp.nix index 3525e569..743566cb 100644 --- a/nixos/common/services/tlp.nix +++ b/nixos/common/services/tlp.nix @@ -1,13 +1,33 @@ { ... }: { +# 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"; }; }; } \ No newline at end of file