amdgpu: add custom fan control

This commit is contained in:
Leonardo Eugênio 2024-11-03 04:17:56 -03:00
parent 7ccbca83bc
commit ee22f17dbe
3 changed files with 59 additions and 1 deletions

View file

@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, lib, ... }:
let
undervoltGpu = pkgs.writeShellScript "undervolt-gpu" ''
set -xe
@ -18,6 +18,13 @@ 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
'';
wantedBy = [ "multi-user.target" ];
};
hardware.opengl.driSupport = true;
# # For 32 bit applications
hardware.opengl.driSupport32Bit = true;