hitagi: Add manual fan control for case fans

The firmware does not allow using multiple sensors (CPU and GPU) for one
fan output.
This commit is contained in:
Simon Bruder 2023-01-22 16:35:02 +01:00
parent 049dfd4be8
commit 8b760909f8
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC

View file

@ -6,8 +6,13 @@
]; ];
boot = { boot = {
kernelModules = [ "kvm-amd" ]; # fan control configuration from https://gist.github.com/bakman2/e801f342aaa7cade62d7bd54fd3eabd8
extraModulePackages = [ ]; kernelModules = [ "kvm-amd" "it87" ];
kernelParams = [ "acpi_enforce_resources=lax" ]; # allow it87 to load
extraModulePackages = with config.boot.kernelPackages; [ it87 ];
extraModprobeConfig = ''
options it87 force_id=0x8688
'';
loader = { loader = {
grub.enable = false; grub.enable = false;
systemd-boot.enable = true; systemd-boot.enable = true;
@ -98,4 +103,38 @@
Type = "oneshot"; Type = "oneshot";
}; };
}; };
sbruder.fancontrol = {
enable = true;
enableDefaultMapping = true;
fans = {
front = {
pwmFile = "/sys/class/hwmon/hwmon1/pwm4";
rpmFile = "/sys/class/hwmon/hwmon1/fan4_input";
pwmLineStart = 50;
neverStop = true;
};
back = {
pwmFile = "/sys/class/hwmon/hwmon1/pwm2";
rpmFile = "/sys/class/hwmon/hwmon1/fan2_input";
};
};
sensors = {
cpu = {
file = "/sys/class/hwmon/hwmon2/temp3_input";
min = 50;
max = 80;
};
gpu = {
file = "/sys/class/hwmon/hwmon4/temp1_input";
min = 50;
max = 70;
};
nvme = {
file = "/sys/class/hwmon/hwmon0/temp1_input";
min = 40;
max = 70;
};
};
};
} }