Skip to content

Commit

Permalink
pine64-rockpro64: add fancontrol
Browse files Browse the repository at this point in the history
rk3399's operating temps are -20 to 80°C. It has sensors for CPU and GPU.
The MINSTART/-STOP values are a result of empirical testing.
  • Loading branch information
Samtinel committed Oct 31, 2023
1 parent 80d98a7 commit c0605ae
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions pine64/rockpro64/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,24 @@
"pcie_rockchip_host"
"phy_rockchip_pcie"
];
# control the fan on the rockpro64 like in the NAS case
hardware.fancontrol = {
enable = lib.mkDefault true;
config = lib.mkDefault ''
INTERVAL=3
DEVPATH=hwmon0=devices/virtual/thermal/thermal_zone0 hwmon1=devices/virtual/thermal/thermal_zone1 hwmon3=devices/platform/pwm-fan
DEVNAME=hwmon0=cpu_thermal hwmon1=gpu_thermal hwmon3=pwmfan
# there can only be one sensor mapped to one pwm
# therefore you'll have to decide if you want to check cpu temps
# just replace hwmon0 with hwmon1 below
# https://github.com/lm-sensors/lm-sensors/issues/228
FCTEMPS=hwmon3/pwm1=hwmon0/temp1_input
MINTEMP=hwmon3/pwm1=40
MAXTEMP=hwmon3/pwm1=80
MINSTART=hwmon3/pwm1=35
MINSTOP=hwmon3/pwm1=30
MINPWM=hwmon3/pwm1=0
MAXPWM=hwmon3/pwm1=255
'';
};
}

0 comments on commit c0605ae

Please sign in to comment.