From 52acebc8ef110156ff44ae734b248a82b566c086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Tue, 9 Apr 2024 09:04:49 +0300 Subject: [PATCH] fwminex: add throttled --- hosts/fwminex/configuration.nix | 136 ++++++++++++++++---------------- 1 file changed, 69 insertions(+), 67 deletions(-) diff --git a/hosts/fwminex/configuration.nix b/hosts/fwminex/configuration.nix index 31798e9..3453379 100644 --- a/hosts/fwminex/configuration.nix +++ b/hosts/fwminex/configuration.nix @@ -123,63 +123,81 @@ in { }; }; - services.autorandr = { - profiles = { - default = { - fingerprint = {inherit (randr) eDP-1;}; - config = { - DP-1.enable = false; - DP-2.enable = false; - DP-3.enable = false; - DP-4.enable = false; - eDP-1 = { - enable = true; - primary = true; - mode = "1920x1200"; - crtc = 0; - position = "0x0"; - rate = "59.88"; + services = { + throttled.enable = true; + tlp = { + enable = true; + settings = { + CPU_BOOST_ON_BAT = 0; + CPU_HWP_DYN_BOOST_ON_BAT = 0; + CPU_SCALING_GOVERNOR_ON_AC = "performance"; + CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; + CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; + CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; + PLATFORM_PROFILE_ON_BAT = "low-power"; + START_CHARGE_THRESH_BAT1 = 90; + STOP_CHARGE_THRESH_BAT1 = 97; + RUNTIME_PM_ON_BAT = "auto"; + }; + }; + autorandr = { + profiles = { + default = { + fingerprint = {inherit (randr) eDP-1;}; + config = { + DP-1.enable = false; + DP-2.enable = false; + DP-3.enable = false; + DP-4.enable = false; + eDP-1 = { + enable = true; + primary = true; + mode = "1920x1200"; + crtc = 0; + position = "0x0"; + rate = "59.88"; + }; }; }; - }; - home1 = { - fingerprint = {inherit (randr) eDP-1 DP-4;}; - config = { - eDP-1.enable = false; - DP-1.enable = false; - DP-2.enable = false; - DP-4 = { - enable = true; - mode = "2560x1440"; - position = "0x0"; - primary = true; - crtc = 0; - rate = "59.95"; + home1 = { + fingerprint = {inherit (randr) eDP-1 DP-4;}; + config = { + eDP-1.enable = false; + DP-1.enable = false; + DP-2.enable = false; + DP-4 = { + enable = true; + mode = "2560x1440"; + position = "0x0"; + primary = true; + crtc = 0; + rate = "59.95"; + }; }; }; - }; - dualhome = { - fingerprint = {inherit (randr) eDP-1 DP-3 DP-4;}; - config = { - eDP-1.enable = false; - DP-1.enable = false; - DP-2.enable = false; - DP-3 = { - enable = true; - mode = "2560x1440"; - position = "0x0"; - crtc = 1; - rate = "59.95"; - }; - DP-4 = { - enable = true; - mode = "2560x1440"; - position = "2560x0"; - primary = true; - crtc = 0; - rate = "59.95"; + dualhome = { + fingerprint = {inherit (randr) eDP-1 DP-3 DP-4;}; + config = { + eDP-1.enable = false; + DP-1.enable = false; + DP-2.enable = false; + DP-3 = { + enable = true; + mode = "2560x1440"; + position = "0x0"; + crtc = 1; + rate = "59.95"; + }; + DP-4 = { + enable = true; + mode = "2560x1440"; + position = "2560x0"; + primary = true; + crtc = 0; + rate = "59.95"; + }; }; }; }; @@ -195,20 +213,4 @@ in { domain = "motiejus.jakst"; firewall.rejectPackets = true; }; - - services.tlp = { - enable = true; - settings = { - CPU_BOOST_ON_BAT = 0; - CPU_HWP_DYN_BOOST_ON_BAT = 0; - CPU_SCALING_GOVERNOR_ON_AC = "performance"; - CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; - CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; - CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; - PLATFORM_PROFILE_ON_BAT = "low-power"; - START_CHARGE_THRESH_BAT1 = 90; - STOP_CHARGE_THRESH_BAT1 = 97; - RUNTIME_PM_ON_BAT = "auto"; - }; - }; }