Revert "amdgpu: remove manual fan control"

This reverts commit 1336203f52.
This commit is contained in:
Leonardo Eugênio 2025-02-01 22:19:20 -03:00
parent 43b501b261
commit 1c91c3700b
3 changed files with 74 additions and 1 deletions

View file

@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, lib, ... }:
let
undervoltGpu = pkgs.writeShellScript "undervolt-gpu" ''
set -xe
@ -17,6 +17,17 @@ in
"amdgpu.ppfeaturemask=0xfffd7fff" # enable undervolting
];
systemd.services.amd-fan-control = {
script = ''
${lib.getExe pkgs.amd-fan-control} /sys/class/drm/card1/device 60 100
'';
serviceConfig = {
Restart = "always";
RestartSec = 10;
};
wantedBy = [ "multi-user.target" ];
};
hardware.graphics.enable32Bit = true;
hardware.graphics.extraPackages = with pkgs; [