I used to manually disable fan writing "level 0" to /proc/acpi/ibm/fan
and fan stayed off. Recently I installed thinkfan
, started it, then stopped, but manual disabling it stopped working after such actions. Why? What could have changed in the system to result in such change for the fan?
System restart reverses it back - echo level 0 | sudo tee /proc/acpi/ibm/fan
works again, running and stopping thinkfan (even when fan has not started during run) messes up with writing to /proc/acpi/ibm/fan
as before, modification time of /proc/acpi/ibm/fan
stays with time of manual write, but output changes to "enabled".
Below is a reproducible example (at least for my downloaded Linux Mint 20.2. and my Thinkpad; I initially discovered it on another Thinkpad model). For some as of now non-understandable reason, thinkfan on liveUSB does not use systemd, but the result is the same: the fan starts in absence of the thinkfan process after being manually disabled; thinkfan is same version, 0.9.1 (as output from thinkfan -h
).
I've made USB with Linux Mint 20.2.
I'm booting it with "persistent" flag on the
vmlinuz
line instead of "quiet splash"I've run
echo options thinkpad_acpi fan_control=1' | sudo tee -a /etc/modprobe.d/thinkpad_acpi.conf
then rebootedAfter reboot, I'm able to manually set fan speed by
echo level 0 | sudo tee /proc/acpi/ibm/fan
I've installed
apt-get install stress
Fan speed remains 0 (as for noise and
cat /proc/acpi/ibm/fan
) when I dostress -c 2 -t 100
I've installed
apt-get install thinkfan
, but even after rebootsudo systemctl status/enable/start thinkfan
outputs Unit thinkfan.service not foundI've edited
/etc/thinkfan.conf.
to uncomment:
tp_fan /proc/acpi/ibm/fan
tp_thermal /proc/acpi/ibm/thermal (0, 10, 15, 2, 10, 5, 0, 3, 0, 3)However, I'm able to start thinkfan:
sudo thinkfan -n
in non-daemon mode. Fan started to start when I run stress. I've ended that run, it wrote cleaning up and resetting fan controlAfter that I've started
sudo thinkfan
-Daemon PID: 2548
, thenkill 2548
.I might have started thinkfan a couple of times as above.
Now (there are no thinkfan processes seen in System Monitor), after I do
echo level 0 | sudo tee /proc/acpi/ibm/fan
, I can seecat /proc/acpi/ibm/fan
:disabled, 0, 0
, but after I dostress -c 2 -t 100
after about 10 seconds I start to hear fan noise andcat /proc/acpi/ibm/fan
:enabled, 5578, auto
.By the way,
/proc/acpi/ibm/thermal
gives output of about 40 as the first number when idle and ~80 when stress starts (the other numbers stay the same).
Initial issue (just in case):
Started thinkfan after install by (as far as can recall) sudo systemctl enable thinkfan
. Wanted to go manually temporary and tried stop
, disable
: sudo systemctl disable thinkfan
, there is no process called thinkfan
running, output of sudo systemctl status thinkfan
:
● thinkfan.service - simple and lightweight fan control program
Loaded: loaded (/lib/systemd/system/thinkfan.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2021-11-11 18:09:56 MSK; 2 days ago
Main PID: 33742 (code=exited, status=1/FAILURE)
Nov 11 18:09:51 alex-ThinkPad-slim thinkfan[33742]: A sensor has vanished! Exiting since there's no safe way of handling this.
Nov 11 18:09:56 alex-ThinkPad-slim thinkfan[33742]: Cleaning up and resetting fan control.
Nov 11 18:09:56 alex-ThinkPad-slim systemd[1]: thinkfan.service: Main process exited, code=exited, status=1/FAILURE
Nov 11 18:09:56 alex-ThinkPad-slim systemd[1]: thinkfan.service: Failed with result 'exit-code'.
Nov 12 05:32:53 alex-ThinkPad-slim systemd[1]: /lib/systemd/system/thinkfan.service:9: PIDFile= references a path below legacy directory /var/run/, updating /var/run/thinkfan.pid → /run/thinkfan.pid; please update the unit file accordingly.
However, fan starts by itself after being manually turned off -- why?
$ cat /proc/acpi/ibm/fan
status: disabled
$ stress -c 2 -t 100
$ cat /proc/acpi/ibm/fan
status: enabled
thinkfan.service loaded failed failed simple and lightweight fan control program