Files
PyFan/README.md

32 lines
1.0 KiB
Markdown
Raw Normal View History

2020-03-01 20:41:28 +01:00
# PyFan
2019-09-03 15:25:29 +02:00
2019-10-04 11:26:12 +02:00
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.
2019-09-03 15:26:39 +02:00
2020-03-01 20:39:35 +01:00
## Installation
### Archlinux
2020-03-01 20:34:31 +01:00
[AUR package](https://aur.archlinux.org/packages/pyfan/)
2020-03-01 20:39:35 +01:00
### Other
2020-03-01 20:34:31 +01:00
Put pyfan.py into /usr/local/sbin and give it +x.
2020-03-01 20:39:35 +01:00
## Usage
2019-09-03 15:26:39 +02:00
2019-09-11 15:08:57 +02:00
Put your config in /etc/pyfan (see example config) and enable pyfan as a service (see example service file).
2020-03-01 20:39:35 +01:00
## Finding your fans
2019-09-11 15:08:57 +02:00
> It is recommended to use pwmconfig from lm_sensors to detect your fans.
2019-09-03 15:26:39 +02:00
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.