2024-05-04 23:15:57 +03:00
|
|
|
# AMD CPU boost control.
|
2024-05-06 19:34:00 +03:00
|
|
|
{ pkgs, ... } @args: let
|
|
|
|
controlFile = "/sys/devices/system/cpu/cpufreq/boost";
|
2024-05-06 23:21:25 +03:00
|
|
|
enable = "0";
|
|
|
|
disable = "1";
|
2024-05-06 19:34:00 +03:00
|
|
|
|
|
|
|
script = pkgs.writeShellScriptBin "powersave" (import ./powersave/Script.nix {
|
2024-05-12 02:40:37 +03:00
|
|
|
inherit controlFile enable disable;
|
2024-05-06 19:34:00 +03:00
|
|
|
}).script;
|
|
|
|
in {
|
2024-03-04 00:34:39 +03:00
|
|
|
# Requirements:
|
|
|
|
# CPPC (Collaborative Power Control) - Disabled.
|
|
|
|
# PSS (Cool and Quiet) - Enabled.
|
2024-05-06 19:34:00 +03:00
|
|
|
imports = [
|
|
|
|
(import ./powersave ({
|
2024-05-12 02:40:37 +03:00
|
|
|
inherit controlFile enable disable;
|
2024-05-06 19:34:00 +03:00
|
|
|
} // args))
|
|
|
|
];
|
|
|
|
|
|
|
|
environment.systemPackages = [ script ];
|
2024-03-04 00:34:39 +03:00
|
|
|
}
|