diff --git a/config/modules/power-management/common.nix b/config/modules/power-management/common.nix index ad773d7..5948ff7 100644 --- a/config/modules/power-management/common.nix +++ b/config/modules/power-management/common.nix @@ -3,10 +3,11 @@ modules.common.provides = { laptop-power-management = { includes = [ - modules.auto-cpufreq + # modules.auto-cpufreq modules.battery-ac-targets modules.intel-mgm modules.tlp + # modules.ppd ]; }; }; diff --git a/config/modules/power-management/ppd.nix b/config/modules/power-management/ppd.nix new file mode 100644 index 0000000..ecbb655 --- /dev/null +++ b/config/modules/power-management/ppd.nix @@ -0,0 +1,11 @@ +{ den, modules, ... }: +{ + modules.ppd = { + nixos = { + services.power-profiles-daemon.enable = true; + powerManagement = { + cpuFreqGovernor = "schedutil"; + }; + }; + }; +} diff --git a/config/modules/power-management/tlp.nix b/config/modules/power-management/tlp.nix index 510b83f..6abeae7 100644 --- a/config/modules/power-management/tlp.nix +++ b/config/modules/power-management/tlp.nix @@ -5,6 +5,7 @@ nixos = { services.tlp = { enable = true; + pd.enable = true; settings = { # Wireless power saving WIFI_PWR_ON_BAT = "on"; @@ -35,12 +36,12 @@ CPU_MAX_PERF_ON_BAT = 30; - CPU_SCALING_GOVERNOR_ON_AC = "performance"; - CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; - CPU_HWP_DYN_BOOST_ON_AC = "1"; - CPU_HWP_DYN_BOOST_ON_BAT = "0"; - CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; - CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; + # CPU_SCALING_GOVERNOR_ON_AC = "performance"; + # CPU_SCALING_GOVERNOR_ON_BAT = "schedutil"; + # CPU_HWP_DYN_BOOST_ON_AC = "1"; + # CPU_HWP_DYN_BOOST_ON_BAT = "0"; + # CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; + # CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; MAX_LOST_WORK_SECS_ON_BAT = "60"; MAX_LOST_WORK_SECS_ON_AC = "15"; DISK_IDLE_SECS_ON_AC = "0"; @@ -49,6 +50,9 @@ DISK_IDLE_SECS_ON_BAT = "2"; SOUND_POWER_SAVE_ON_BAT = "1"; SOUND_POWER_SAVE_ON_AC = "1"; + SCHED_POWERSAVE_ON_AC = 0; + SCHED_POWERSAVE_ON_BAT = 1; + NMI_WATCHDOG = 0; PLATFORM_PROFILE_ON_AC = "balanced"; PLATFORM_PROFILE_ON_BAT = "quiet";