Closed binarious closed 2 years ago
It looks like thinkfan
is started too early, before /proc/acpi/ibm/fan
is available.
I guess so. Maybe the After=lm_sensors.service
in the service file of the AUR is wrong/incomplete, but I'm not sure. What service does provide /proc/acpi/ibm/fan
so that it should be waited for?
/proc/acpi/ibm/fan
is provided by thinkpad_acpi
, which is a module, not a service.
I'm not sure what service would make sense for After=
. Maybe delaying the start up of thinkfan
by a few seconds would make sense in this situation?
Hi @binarious, the latest master
version supports a new config setting max_errors: NUM
that will let thinkfan retry the initialization of a given fan or sensor NUM
times. Alternatively, you can mark a fan/sensor with optional: true
to allow retrying indefinitely. So if you want to help testing this new feature (which is slated for the 2.0 release), you can try something like this:
sensors:
- hwmon: /sys/class/hwmon
name: thinkpad
indices: [1]
max_errors: 10 # <<< New config option
fans:
- tpacpi: /proc/acpi/ibm/fan
max_errors: 10 # <<< New config option
levels:
- [0, 0, 50]
- [1, 45, 65]
- ["level auto", 60, 85]
- ["level disengaged", 80, 255]
If a fan or sensor is unavailable, it is retried every loop, so if your're using the default sleep time of 5 seconds, that should give you ~50 seconds of retries before thinkfan fails to start.
Hi @vmatare, confirmed fixed. Thank you!
I faced the same issue with thinkfan 1.3.1 on Debian bookworm and kernel 6.1.10. /proc/acpi/ibm/fan was not available so I added a thinkfan.timer until the new thinkfan version is available.
/etc/systemd/system/thinkfan.timer
[Unit]
Description=Delaying thinkfan start
[Timer]
OnStartupSec=20
AccuracySec=5
sudo systemctl disable thinkfan.service
sudo systemctl add-wants multi-user.target thinkfan.timer
sudo systemctl daemon-reload
Now it is starting correctly.
Steps to reproduce
Expected behavior Thinkfan service is running without errors.
Actual behavior Thinkfan fails with the following error:
After
sudo systemctl restart thinkfan.service
it starts working again:thinkfan.yaml
Additional details
thinkfan
.