AmdCpu : Disable powersave by default.

This commit is contained in:
Dmitry Voronin 2024-08-24 20:06:51 +03:00
parent 32a4e80028
commit 6e6003c5cb
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
4 changed files with 12 additions and 9 deletions

View file

@ -18,8 +18,11 @@
virtmanager.enable = true; virtmanager.enable = true;
amd = { amd = {
compute.enable = true; compute.enable = true;
cpu.enable = true;
gpu.enable = true; gpu.enable = true;
cpu = {
enable = true;
powersave = true;
};
}; };
docker = { docker = {
enable = true; enable = true;

View file

@ -18,10 +18,7 @@
builder.server.enable = true; builder.server.enable = true;
desktop.sway.enable = true; desktop.sway.enable = true;
amd = { amd = {
cpu = { cpu.enable = true;
enable = true;
powersave.enable = false;
};
gpu.enable = true; gpu.enable = true;
}; };
ftpd = { ftpd = {

View file

@ -19,7 +19,10 @@
tablet.enable = true; tablet.enable = true;
amd = { amd = {
compute.enable = true; compute.enable = true;
cpu.enable = true; cpu = {
enable = true;
powersave = true;
};
gpu.enable = true; gpu.enable = true;
}; };
package = { package = {

View file

@ -8,7 +8,7 @@ in {
options = { options = {
module.amd.cpu = { module.amd.cpu = {
enable = mkEnableOption "Enable AMD Cpu support."; enable = mkEnableOption "Enable AMD Cpu support.";
powersave.enable = mkEnableOption "Enable AMD Cpu powersave." // { default = true; }; powersave = mkEnableOption "Enable AMD Cpu powersave.";
}; };
}; };
@ -17,7 +17,7 @@ in {
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
hardware.cpu.amd.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.amd.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
} }
(mkIf cfg.powersave.enable { (mkIf cfg.powersave {
module.powersave = { module.powersave = {
enable = true; enable = true;
cpu.boost = { inherit controlFile enableCmd disableCmd; }; cpu.boost = { inherit controlFile enableCmd disableCmd; };