ec_su_axb35 fan curve systemd service
- Shell 100%
| etc | Add default fan3 mode | |
| PKGBUILD | Bump pkgver | |
| usr/local/bin | Only apply fan values if config differs | |
| LICENSE | LICENSE added | |
| README.md | Update README | |
ec_su_axb35 fan curve systemd service
This repository contains a small systemd oneshot service for loading the
ec_su_axb35 kernel module and applying fan ramp-up/ramp-down curves from
configuration files.
The Linux kernel module can be found here: https://github.com/cmetz/ec-su_axb35-linux
Files
usr/local/bin/ec-su-axb35-fan-apply: root-run helper that loads the module and applies all fan configs.etc/systemd/system/ec-su-axb35-fan.service: systemd unit.etc/ec-su-axb35-fan.d/fan3.conf: example fan config.
Install
From this repository:
sudo install -Dm755 usr/local/bin/ec-su-axb35-fan-apply /usr/local/bin/ec-su-axb35-fan-apply
sudo install -Dm644 etc/systemd/system/ec-su-axb35-fan.service /etc/systemd/system/ec-su-axb35-fan.service
sudo install -Dm644 etc/ec-su-axb35-fan.d/fan3.conf /etc/ec-su-axb35-fan.d/fan3.conf
sudo systemctl daemon-reload
sudo systemctl enable --now ec-su-axb35-fan.service
To apply changes after editing a config:
sudo systemctl restart ec-su-axb35-fan.service
Config
Create one file per fan in /etc/ec-su-axb35-fan.d/*.conf:
FAN=fan3
SET_RAMPUP_CURVE=35,44,67,79,95
SET_RAMPDOWN_CURVE=30,40,62,75,91
- Each
SET_*entry writes to the matching lowercase sysfs attribute. - For example,
SET_MODE=autowritesautoto/sys/class/ec_su_axb35/${FAN}/mode. - Attributes are only written when the live sysfs value differs from the config
value.
- This avoids unnecessary
ec_writes by the driver.
- This avoids unnecessary
- Values whose key starts with
SET_RAMPmust be comma-separated numbers. SET_MODE, when used, must be one ofauto,fixed, orcurve.
For additional fans, add more .conf files with different FAN values.