From 831cc222a96bbb196b655625b4eda49b871d3c4b Mon Sep 17 00:00:00 2001 From: Emmet Date: Sun, 28 Apr 2024 08:00:11 -0500 Subject: [PATCH 1/2] Better power management --- system/hardware/power.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/system/hardware/power.nix b/system/hardware/power.nix index 8d014be..b88d98e 100644 --- a/system/hardware/power.nix +++ b/system/hardware/power.nix @@ -17,7 +17,7 @@ enable = true; settings = { CPU_SCALING_GOVERNOR_ON_AC = "performance"; - CPU_SCALING_GOVERNOR_ON_BAT = "schedutil"; + CPU_SCALING_GOVERNOR_ON_BAT = "performance"; CPU_ENERGY_PERF_POLICY_ON_BAT = "performance"; CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; @@ -26,6 +26,15 @@ CPU_MAX_PERF_ON_AC = 100; CPU_MIN_PERF_ON_BAT = 0; CPU_MAX_PERF_ON_BAT = 100; + + CPU_BOOST_ON_AC = 1; + CPU_BOOST_ON_BAT = 0; + + START_CHARGE_THRESH_BAT0 = 75; + STOP_CHARGE_THRESH_BAT0 = 80; + + PLATFORM_PROFILE_ON_AC = "performance"; + PLATFORM_PROFILE_ON_BAT = "balanced"; }; }; From fa8bb4855e4b7cf2463ec53ec06df5ebd7c47f56 Mon Sep 17 00:00:00 2001 From: Emmet Date: Sun, 28 Apr 2024 08:00:32 -0500 Subject: [PATCH 2/2] Cleaning up some unnecessary config --- profiles/personal/configuration.nix | 1 - system/hardware/openrgb.nix | 11 ----------- system/hardware/power.nix | 12 ------------ 3 files changed, 24 deletions(-) delete mode 100644 system/hardware/openrgb.nix diff --git a/profiles/personal/configuration.nix b/profiles/personal/configuration.nix index cebf953..dcf8925 100644 --- a/profiles/personal/configuration.nix +++ b/profiles/personal/configuration.nix @@ -7,7 +7,6 @@ imports = [ ../work/configuration.nix # Personal is essentially work system + games ../../system/hardware-configuration.nix - #../../system/hardware/openrgb.nix ../../system/app/gamemode.nix ../../system/app/steam.nix ../../system/app/prismlauncher.nix diff --git a/system/hardware/openrgb.nix b/system/hardware/openrgb.nix deleted file mode 100644 index 81066f5..0000000 --- a/system/hardware/openrgb.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ pkgs, ... }: - -{ - environment.systemPackages = [ pkgs.openrgb-with-all-plugins ]; - - # OpenRGB setup - services.hardware.openrgb = { - enable = true; - motherboard = "amd"; - }; -} diff --git a/system/hardware/power.nix b/system/hardware/power.nix index b88d98e..209436f 100644 --- a/system/hardware/power.nix +++ b/system/hardware/power.nix @@ -1,18 +1,6 @@ { ... }: { - #services.auto-cpufreq.enable = true; - #services.auto-cpufreq.settings = { - # charger = { - # governor = "performance"; - # turbo = "auto"; - # }; - # battery = { - # governor = "schedutil"; - # scaling_max_freq = 3800000; - # turbo = "never"; - # }; - #}; services.tlp = { enable = true; settings = {