2024-04-07 22:16:33 -04:00
|
|
|
{
|
|
|
|
config,
|
2024-06-11 21:16:05 -04:00
|
|
|
lib,
|
|
|
|
pkgs,
|
2024-04-07 22:16:33 -04:00
|
|
|
...
|
|
|
|
}: {
|
2024-06-26 22:22:14 -04:00
|
|
|
config = lib.mkIf config.ar.hardware.laptop {
|
2024-03-30 14:48:48 -04:00
|
|
|
services = {
|
2024-06-27 16:48:16 -04:00
|
|
|
power-profiles-daemon.enable = lib.mkDefault false;
|
2024-03-30 14:48:48 -04:00
|
|
|
upower.enable = true;
|
2024-06-27 16:48:16 -04:00
|
|
|
tlp = {
|
|
|
|
enable = !config.services.power-profiles-daemon.enable;
|
|
|
|
settings = {
|
|
|
|
BAY_POWEROFF_ON_AC = 0;
|
|
|
|
BAY_POWEROFF_ON_BAT = 1;
|
|
|
|
CPU_BOOST_ON_AC = 1;
|
|
|
|
CPU_BOOST_ON_BAT = 0;
|
|
|
|
CPU_ENERGY_PERF_POLICY_ON_AC = "balance_performance";
|
|
|
|
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
|
|
|
CPU_HWP_DYN_BOOST_ON_AC = 1;
|
|
|
|
CPU_HWP_DYN_BOOST_ON_BAT = 0;
|
2024-06-30 19:37:27 -04:00
|
|
|
PCIE_ASPM_ON_AC = "default";
|
|
|
|
PCIE_ASPM_ON_BAT = "powersupersave";
|
2024-06-27 16:48:16 -04:00
|
|
|
PLATFORM_PROFILE_ON_AC = "balanced";
|
|
|
|
PLATFORM_PROFILE_ON_BAT = "low-power";
|
|
|
|
RESTORE_DEVICE_STATE_ON_STARTUP = 1;
|
|
|
|
TLP_DEFAULT_MODE = "AC";
|
|
|
|
TLP_PERSISTENT_DEFAULT = 0;
|
|
|
|
};
|
|
|
|
};
|
2024-03-30 14:48:48 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|