This commit is contained in:
2026-02-23 09:25:07 +00:00
parent db22304952
commit a306a8cb9a
3 changed files with 23 additions and 7 deletions

View File

@@ -3,10 +3,11 @@
modules.common.provides = { modules.common.provides = {
laptop-power-management = { laptop-power-management = {
includes = [ includes = [
modules.auto-cpufreq # modules.auto-cpufreq
modules.battery-ac-targets modules.battery-ac-targets
modules.intel-mgm modules.intel-mgm
modules.tlp modules.tlp
# modules.ppd
]; ];
}; };
}; };

View File

@@ -0,0 +1,11 @@
{ den, modules, ... }:
{
modules.ppd = {
nixos = {
services.power-profiles-daemon.enable = true;
powerManagement = {
cpuFreqGovernor = "schedutil";
};
};
};
}

View File

@@ -5,6 +5,7 @@
nixos = { nixos = {
services.tlp = { services.tlp = {
enable = true; enable = true;
pd.enable = true;
settings = { settings = {
# Wireless power saving # Wireless power saving
WIFI_PWR_ON_BAT = "on"; WIFI_PWR_ON_BAT = "on";
@@ -35,12 +36,12 @@
CPU_MAX_PERF_ON_BAT = 30; CPU_MAX_PERF_ON_BAT = 30;
CPU_SCALING_GOVERNOR_ON_AC = "performance"; # CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; # CPU_SCALING_GOVERNOR_ON_BAT = "schedutil";
CPU_HWP_DYN_BOOST_ON_AC = "1"; # CPU_HWP_DYN_BOOST_ON_AC = "1";
CPU_HWP_DYN_BOOST_ON_BAT = "0"; # CPU_HWP_DYN_BOOST_ON_BAT = "0";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; # CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; # CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
MAX_LOST_WORK_SECS_ON_BAT = "60"; MAX_LOST_WORK_SECS_ON_BAT = "60";
MAX_LOST_WORK_SECS_ON_AC = "15"; MAX_LOST_WORK_SECS_ON_AC = "15";
DISK_IDLE_SECS_ON_AC = "0"; DISK_IDLE_SECS_ON_AC = "0";
@@ -49,6 +50,9 @@
DISK_IDLE_SECS_ON_BAT = "2"; DISK_IDLE_SECS_ON_BAT = "2";
SOUND_POWER_SAVE_ON_BAT = "1"; SOUND_POWER_SAVE_ON_BAT = "1";
SOUND_POWER_SAVE_ON_AC = "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_AC = "balanced";
PLATFORM_PROFILE_ON_BAT = "quiet"; PLATFORM_PROFILE_ON_BAT = "quiet";