The following might work: https://github.com/tuxd3v/ats
But I started to work on a DietPi script to implement fan control. But currently the API is known to work with C2 only. Didn’t have the time and priority to implement further devices: https://github.com/MichaIng/DietPi/blob/dev/.meta/dietpi-fan_control
But the above outputs could help to check how RockPro64 implements PWM control.
I have almost the same problem:
I’ve just installed DietPi on my RockPro64. The fan is always on.
I’ve managed to install ATS but it doesn’t to work cause the fan is always on.
Do you have of what could be the root cause of that?
I’ve found the solution:
I had to modify the /etc/ats.conf file.
“/sys/devices/platform/pwm-fan/hwmon/hwmon0/pwm1” and cat /sys/class/hwmon/hwmon0/pwm1 don’t exit.
For me it was cat /sys/devices/platform/pwm-fan/hwmon/hwmon3/pwm1 and cat /sys/class/hwmon/hwmon3/pwm1
Many thanks for reporting. Good to know it uses hwmon3, through strange when hwmon0 is unused .
I collected the info here: https://github.com/MichaIng/DietPi/issues/1818
Probably someone finds time to implement a few more devices for our fan control script, but good to know that ATS works.
I’m glad to help.
Though, I’ve rebooted my devices this morning and it changed to hwmon2.
I don’t what made it change that but when I replaced by hwmon2 on ats.conf, everything went ok.
line 1) apt-get works
line 2+3) The results of the 2 update command lines:
root@DietPi:~# update-alternatives --install /usr/bin/lua lua /usr/bin/lua5.3 1
update-alternatives: error: alternative link /usr/bin/lua is already managed by lua-interpreter
root@DietPi:~# update-alternatives --install /usr/bin/luac luac /usr/bin/luac5.3 1
update-alternatives: error: alternative link /usr/bin/luac is already managed by lua-compiler
line 4) apt-get works
checking status doesn’t work:
root@DietPi:~# systemctl status ats
Unit ats.service could not be found.
─────────────────────────────────────────────────────
DietPi v7.9.3 : 20:53 - Wed 12/22/21
─────────────────────────────────────────────────────
- Device model : ROCKPro64 (aarch64)
- CPU temp : 31 °C / 87 °F : Cool runnings
- LAN IP : X.X.X.X (eth0)
- MOTD : WARNING: Learn whether your system is affected by the
Java Log4j vulnerability CVE-2021-44228 and how to mitigate:
https://dietpi.com/blog/?p=1172
─────────────────────────────────────────────────────
DietPi Team : MichaIng (lead), Daniel Knight (founder), Joulinar (support)
Image by : DietPi Core Team (pre-image: Armbian)
Web : https://dietpi.com | https://twitter.com/DietPi_
Patreon Legends : Camry2731
Contribute : https://dietpi.com/contribute.html
DietPi Hosting : Powered by https://myvirtualserver.com
dietpi-launcher : All the DietPi programs in one place
dietpi-config : Feature rich configuration tool for your device
dietpi-software : Select optimised software for installation
htop : Resource monitor
cpu : Shows CPU information and stats
root@DietPi:/#
Jep, as it ships an own systemd unit (doesn’t it?), no need to start via via custom.sh (which would require to enable the dietpi-autostart option). Use systemctl as Joulinar suggested, to also start it in the same turn (without reboot):