From 71a606119c8ff055296baf38bfcd42d6a781dde9 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Thu, 27 Jun 2024 16:48:16 -0400 Subject: [PATCH] hardware/laptop: power-profiles-daemon -> tlp --- hardwareModules/laptop/default.nix | 20 +++++++++++++++++++- hosts/fallarbor/hardware.nix | 1 - 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/hardwareModules/laptop/default.nix b/hardwareModules/laptop/default.nix index 5aabd283..6f2b4553 100644 --- a/hardwareModules/laptop/default.nix +++ b/hardwareModules/laptop/default.nix @@ -6,8 +6,26 @@ }: { config = lib.mkIf config.ar.hardware.laptop { services = { - power-profiles-daemon.enable = true; + power-profiles-daemon.enable = lib.mkDefault false; upower.enable = true; + 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; + 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; + }; + }; }; }; } diff --git a/hosts/fallarbor/hardware.nix b/hosts/fallarbor/hardware.nix index b31ae153..9adf8879 100644 --- a/hosts/fallarbor/hardware.nix +++ b/hosts/fallarbor/hardware.nix @@ -32,7 +32,6 @@ hardware = { acpilight.enable = true; enableAllFirmware = true; - sensor.iio.enable = true; };