While the fan behaves reasonably under Debian 8, it may be useful to increase its usage when running often short but CPU consuming processes. Thinkfan was originally created to solve the problem of unnecessary high fan consumption. It provides an easy way in general to control the fan level for given temperature ranges.
Contents
# apt-get install thinkfan lm-sensors
Setting up thinkfan (0.9.2-1) ... Job for thinkfan.service
failed. See 'systemctl status thinkfan.service' and 'journalctl>
-xn' for details. invoke-rc.d: initscript thinkfan, action
"start" failed. dpkg: error processing package thinkfan
(--configure): subprocess installed post-installation script
returned error exit status 1 Errors were encountered while
processing: thinkfan E: Sub-process /usr/bin/dpkg returned an
error code (1)
# sensors-detect
$ find /sys/devices -type f -name "temp*_input"
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/hwmon/hwmon3/temp1_input
/sys/devices/virtual/hwmon/hwmon0/temp1_input
/sys/devices/platform/coretemp.0/hwmon/hwmon2/temp3_input
/sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input
/sys/devices/platform/coretemp.0/hwmon/hwmon2/temp2_input
/etc/thinkfan.conf
hwmon /sys/devices/virtual/hwmon/hwmon0/temp1_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp3_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp2_input
(0, 0, 55)
(1, 48, 60)
(2, 50, 61)
(3, 52, 63)
(4, 56, 65)
(5, 59, 66)
(7, 63, 32767)
(LEVEL, LOW, HIGH)
LEVEL is the fan level to use (0-7 with thinkpad_acpi)
LOW is the temperature at which to step down to the previous level
HIGH is the temperature at which to step up to the next level
All numbers are integers.
/usr/share/doc/thinkfan/examples/thinkfan.conf.simple
# modprobe thinkpad_acpi fan_control=1
echo level 4 | sudo tee /proc/acpi/ibm/fan
echo level disengaged | sudo tee /proc/acpi/ibm/fan
echo level auto | sudo tee /proc/acpi/ibm/fan
# systemctl start thinkfan.service
$ systemctl status thinkfan.service
$ cat /proc/acpi/ibm/fan
status: enabled
speed: 1985
level: 1
commands: level (level is 0-7, auto, disengaged, full-speed)
commands: enable, disable
commands: watchdog (timeout is 0 (off), 1-120 (seconds))
where ' level' is set between 0-7. If instead of being set to a number it is set to 'auto', then probably thinkfan is not active.
$ sensors
# echo "options thinkpad_acpi fan_control=1" | sudo tee /etc/modprobe.d/thinkpad_acpi.conf
and enable the service at boot# systemctl enable thinkfan.service
If the temperature rises significantly (> 80C) when intense CPU usage is required, an hardware problem is likely.
First, you may want to clean the fan without diassembling the heat sink, e.g., aspiring the dust with a vacuum cleaner from the fan air input grid (remeber that an air fan is supposed to circulate the worm air, rather than directly cooling the CPU).
If it does not help, or if you wish anyway to disassemble the machine to clean the fan, the replacement of the thermal paste is probably required. Check your hardware maintenance manual to see how to disassemble the heatsink. Other unofficial sources (e.g. videos) may also be useful, but the official manual should be consulted, since this is a potentially dangerous procedure (even if easy).
Apart from mechanical solutions, it is also possible to force a reduced CPU usage. E.g., it may be required that CPUs are loaded only up to 80% of their capacities:# echo 80 > /sys/devices/system/cpu/intel_pstate/max_perf_pct
As described above, Thinkfan systemd service can be loaded at boot. However, hwmon devices location can change. See also the associated bug report. This causes Thinkfan service to fail.
The configure_thinkfan script available at this URL automatically retrieves the hwmon sensors and modifies accordingly an existing /etc/thinkfan.conf configuration file.
The script will be executed with root permissions. It is important to understand the security implications: unprivileged attackers may temper with the script to gain root access.