From 8293ebafb4bfa8e3960dc35d4c7ef9634fb87f43 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 20 Jun 2021 15:38:01 +0200 Subject: [PATCH] Improve power management --- hosts/dumpyourvms/dumpyourvms.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/hosts/dumpyourvms/dumpyourvms.nix b/hosts/dumpyourvms/dumpyourvms.nix index f20f34b4..63b2308e 100644 --- a/hosts/dumpyourvms/dumpyourvms.nix +++ b/hosts/dumpyourvms/dumpyourvms.nix @@ -13,7 +13,7 @@ in pub-solar.x-os.keyfile = "/etc/nixos/hosts/dumpyourvms/secrets/keyfile.bin"; # fix backlight for keyboard and brightness, adjust function key binding - boot.kernelParams = [ "acpi_backlight=video" "hid_apple.fnmode=2" ]; + boot.kernelParams = [ "acpi_backlight=video" "hid_apple.fnmode=2" "intel_pstate=active" ]; boot.loader.efi.canTouchEfiVariables = true; hardware = { @@ -33,6 +33,17 @@ in # Thunderbolt tools services.hardware.bolt.enable = true; + # TLP for power management + services.tlp = { + enable = true; + settings = { + CPU_SCALING_GOVERNOR_ON_AC = "performance"; + CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; + CPU_BOOST_ON_AC = 1; + CPU_BOOST_ON_BAT = 0; + }; + }; + services.udev.extraRules = # Disable XHC1 wakeup signal to avoid resume getting triggered some time # after suspend. Reboot required for this to take effect.