For official cooling fan from allnet or the same fan from Li Xue Fan installed on Rock Pi 5 Model B.
Modify the pwm values/logic in file fan_pwm
to build your own PWM curve or fit other fan.
- Clone or download this repo
- Ensure you are at root shell
- Copy file 'fan_pwm' to '/usr/local/bin/.':
cp fan_pwm /usr/local/bin/.
- Allow executable if needed:
sudo chmod +x /usr/local/bin/fan_pwm
- Copy service file 'fan_pwm.service' to '/etc/systemd/system/.':
cp fan_pwm.service /etc/systemd/system/.
- Reload service:
systemctl daemon-reload
- Start service:
systemctl start fan_pwm
- Enable service to start after boot:
systemctl enable fan_pwm