|Giovanni Harting 1d2ce38e9b relicense to GPLv3||2 weeks ago|
|.gitignore||5 months ago|
|LICENSE||2 weeks ago|
|README.md||4 months ago|
|config-example.yaml||2 months ago|
|pyfan.py||2 months ago|
|pyfan.service||4 months ago|
This python script utilizes linux's hwmon interface and a PID controller for fan controlling. No external dependencies besides simple_pid and PyYAML are needed.
Put your config in /etc/pyfan (see example config) and enable pyfan as a service (see example service file).
It is recommended to use pwmconfig from lm_sensors to detect your fans.
To know which hwmon is what device and what pwm controls what fan, the following commands can help you:
List all devices + names:
Enable control for a specific pwm:
echo 1 > /sys/class/hwmon/hwmonX/pwmX_enable
Set fan speed:
echo [0-255] > /sys/class/hwmon/hwmonX/pwmX
After you have figured out which fan is controlled by what pwm, you can adjust your config. You can have as many thermal zones as you want, just repeate them like shown.