Fan Control on Armbian's Ubuntu 20.04 ROCKPro64 Server Image
When my old desktop PC that was acting as a home server failed on me recently, I switched back to using my ROCKPro64 for the job. Previously I’d used it with ayufan’s Debian Buster image, but this time I decided to try out Armbian’s Ubuntu 20.04 server image based on the 5.9 Linux kernel. Everything went beautifully – even installing the ZFS DKMS module – except that there doesn’t seem to be any built-in fan control.
Check out the dedicated page about my home server if you’re interested in more of the details of how it’s set up!
Thankfully, this forum post had all the information I needed to eventually get ATS working. However, it took some digging and experimentation, so I’ve documented the process below. (All of these commands should be run as root.)
# modprobe pwm-fan
# apt install lua5.3 liblua5.3-dev luarocks gcc make # luarocks build https://raw.githubusercontent.com/tuxd3v/ats/master/ats-0.2-0.rockspec
# sed -i 's/hwmon0/hwmon3/' /etc/ats.conf
Step 3 was where the trickiness came in. Originally
/sys/class/hwmon/hwmon0/pwm1, but that file didn’t exist on my system, even after loading the
pwm-fanmodule. With a little poking around and some help from the above-mentioned forum post, I did find
/sys/class/hwmon/hwmon2/pwm1, and changing
PWM_CTLto reflect that (plus a
systemctl restart ats) initially got the fan control working. However, after a reboot, that
pwm1file had moved to
/sys/class/hwmon/hwmon3/pwm1and seems to have stayed there since. I’m not quite sure why my system is different in that way, but I’m glad that it’s working!
[Last updated January 20, 2021]