Fan control utilising hwmon and pid.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Giovanni Harting d6ab4d8451 use correct variable for parent pyfan, fixes #3 6 months ago
.gitignore made .gitignore include idea 1 year ago
LICENSE relicense to GPLv3 7 months ago
README.md Update 'README.md' 7 months ago
config-example.yaml fixed some typos and restructured some text. 7 months ago
pyfan.py use correct variable for parent pyfan, fixes #3 6 months ago
pyfan.service Switched back to sbin 1 year ago

README.md

PyFan

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.

Installation

Archlinux

AUR package

Other

Put pyfan.py into /usr/local/sbin and give it +x.

Usage

Put your config in /etc/pyfan (see example config) and enable pyfan as a service (see example service file).

Finding your fans

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: tail /sys/class/hwmon/hwmon*/name

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.