Revert "amdgpu: remove manual fan control"

This reverts commit 38dfa39c6d.
This commit is contained in:
Leonardo Eugênio 2025-02-20 22:01:07 -03:00
parent 03dd6d96aa
commit 90125795a9
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 85
'';
serviceConfig = {
Restart = "always";
RestartSec = 10;
};
wantedBy = [ "multi-user.target" ];
};
hardware.graphics.enable32Bit = true;
hardware.graphics.extraPackages = with pkgs; [