From c17ee12f9ac1bf1f7a064724ab3369d6d2f8f826 Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Tue, 13 Feb 2024 11:31:01 +0100 Subject: [PATCH] Ryzenadj service Set's my laptop's power usage settings to something a lot more manageable. When it comes to heat especially. --- hosts/default/configuration.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hosts/default/configuration.nix b/hosts/default/configuration.nix index b67bbc0..5f09266 100644 --- a/hosts/default/configuration.nix +++ b/hosts/default/configuration.nix @@ -301,6 +301,20 @@ options = "--delete-older-than 15d"; }; + # Set power settings for my laptop cpu + systemd.services.ryzenadj = { + enable = true; + description = "Set my ryzen cpu power."; + serviceConfig = { + Type = "oneshot"; + ExecStart = toString ( + pkgs.writeShellScript "ryzenadj-setup" '' + ${pkgs.ryzenadj}/bin/ryzenadj --stapm-limit 35000 --fast-limit 35000 --slow-limit 35000 --slow-time 60 --stapm-time 1000 --tctl-temp 75 --vrmmax-current 65000 + ''); + }; + wantedBy = ["default.target"]; + }; + # DO NOT CHANGE system.stateVersion = "23.11";