From dce7ba9c992ce359c272b76da6beb1ba3f48671e Mon Sep 17 00:00:00 2001 From: kB01 Date: Fri, 17 Jan 2025 12:27:40 +0100 Subject: [PATCH] Configured TLP Service for Power-Management (Power-Profiles didn't work) --- systems/x86_64-linux/LANA9Z/hardware.nix | 38 ++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/systems/x86_64-linux/LANA9Z/hardware.nix b/systems/x86_64-linux/LANA9Z/hardware.nix index 6531984..7a6e14c 100644 --- a/systems/x86_64-linux/LANA9Z/hardware.nix +++ b/systems/x86_64-linux/LANA9Z/hardware.nix @@ -44,4 +44,42 @@ in { extraPackages = [ pkgs.intel-media-sdk ]; }; + # Power Management +# services.tlp.enable = false; +# services.power-profiles-daemon.enable = false; +# services.auto-cpufreq.enable = true; +# services.auto-cpufreq.settings = { +# battery = { +# governor = "powersave"; +# turbo = "never"; +# }; +# charger = { +# governor = "performance"; +# turbo = "auto"; +# }; +# }; + + services.power-profiles-daemon.enable = false; + services.tlp = { + enable = true; + settings = { + CPU_SCALING_GOVERNOR_ON_AC = "performance"; + CPU_SCALING_GOVERNOR_ON_BAT = "balanced"; + + CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; + CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; + + CPU_MIN_PERF_ON_AC = 0; + CPU_MAX_PERF_ON_AC = 100; + CPU_MIN_PERF_ON_BAT = 0; + CPU_MAX_PERF_ON_BAT = 80; + + #Optional helps save long term battery health + START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge + STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging + }; + }; + + + }