From 9bf57ae6e22caa4b911a425c710e5c83c5808096 Mon Sep 17 00:00:00 2001 From: coolneng Date: Tue, 18 Oct 2022 14:55:03 +0200 Subject: [PATCH] Save more power via TLP --- modules/power.nix | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/modules/power.nix b/modules/power.nix index 32ee8ab..e5092d4 100644 --- a/modules/power.nix +++ b/modules/power.nix @@ -5,7 +5,27 @@ services.auto-cpufreq.enable = true; # Enable the TLP daemon - services.tlp.enable = true; + services.tlp = { + enable = true; + settings = { + # Enable audio power saving for Intel HDA, AC97 devices (timeout in secs). + # A value of 0 disables, >=1 enables power saving (recommended: 1). + # Default: 0 (AC), 1 (BAT) + SOUND_POWER_SAVE_ON_AC = 0; + SOUND_POWER_SAVE_ON_BAT = 1; + + # Runtime Power Management for PCI(e) bus devices: on=disable, auto=enable. + # Default: on (AC), auto (BAT) + RUNTIME_PM_ON_AC = "on"; + RUNTIME_PM_ON_BAT = "auto"; + + # Battery feature drivers: 0=disable, 1=enable + # Default: 1 (all) + NATACPI_ENABLE = 1; + TPACPI_ENABLE = 1; + TPSMAPI_ENABLE = 1; + }; + }; # Suspend when the battery is critical services.udev.extraRules = ''