Ubuntu – thinkfan control doesn’t use the fan full potential when needed

fanlaptopoverheatingtemperature

I own a Thinkpad x201 and is overheating very fast because of the environmental temperature and eventually kills himself without notice (and it really grinds my gears).

Outside there are 34 degrees C while the computer rises its temperature at 80 with no important tasks and reaches (with 1 deg each second) to 100 degrees with a heavier task.

I followed a guideline to start the fan earlier so it will maintain constant temperature or when is at a critical temperature to use the maximum speed but it still sticks to the auto values.

The technical aspects

The resource that I used is located here : http://staff.science.uva.nl/~kholshei/thinkfan_guide/

I adjusted the values so that the fan would start on lower temperatures starting with 0 to 20 degrees for the level 0 and so on.

My configuration for /etc/thinlfan.conf is :

$ tail -n 15 /etc/thinkfan.conf

sensor /sys/devices/virtual/hwmon/hwmon0/temp1_input
sensor /sys/devices/platform/coretemp.0/temp4_input
sensor /sys/devices/platform/coretemp.0/temp2_input

(0, 0, 21)
(1, 20, 22)
(2, 21, 25)
(3, 24, 28)
(4, 26, 33)
(5, 30, 40)
(6, 36, 49)
(7, 44, 62)
(128, 60, 65)
(129, 63, 100000)

The last two values are experimental.

when I run:

$ sudo thinkfan -n

WARNING: Using default fan control in /proc/acpi/ibm/fan.

when I run:

$ echo level disengaged | sudo tee /proc/acpi/ibm/fan 

The fan spins at aprox. 6500 RPM which is actually effective (the temperature drops slowly) but it holds on this level for approximately 5 seconds after it switches back to auto.

My question is : How can I manually set the fan speed to it's full potential in these hot days / How can I adjust the values so that the temperature won't raise so much ?

Today is the first time when I try this, so don't expect from me to have a clue of what can I try else than setting a cron job that would set the level on each second – which is an afoul idea.

And the last thing : I can't afford to stop working and the most important I prefer changing the fan once in a while rather than the processor.

Thanks for your help and understanding, if you need any other detail let me know.

Oh… here is my lsb_release:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 13.10
Release:        13.10
Codename:       saucy

…and uname:

$  uname -r      
3.11.0-23-generic

Best Answer

I used in my Lenovo Thinkpad x220 (this is an updated answer that related to systems with systemd

sudo -i
  • install thinkfan

    apt install thinkfan
    
  • configure kernel module

    echo "options thinkpad_acpi fan_control=1" > /etc/modprobe.d/thinkfan.conf
    
  • reload kernel module

    modprobe thinkpad_acpi
    
  • configure default thinkfan configuration

    sed -i 's|START=no|START=yes|' /etc/default/thinkfan
    sed -i 's|DAEMON_ARGS="-q"|DAEMON_ARGS="-q -b 1 -s 15"|' /etc/default/thinkfan
    
  • Check your sensors

    find /sys/devices -type f -name "temp*_input"
    

and this is the result in my Lenovo Thinkpad x220:

/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
  • write in /etc/thinkpad.conf based on the results above

    tp_fan /proc/acpi/ibm/fan
    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,      40)
    (1,     32,     55)
    (2,     54,     66)
    (3,     65,     76)
    (4,     75,     80)
    (5,     78,     85)
    (6,     82,     88)
    (7,     85,     32767)
    
  • Enable the service so it will be started automatically at every boot and drop privileges.

    systemctl enable thinkfan
    exit
    
  • Reboot your notebook

    systemctl enable thinkfan
    
  • After reboot, check the service

    systemctl status thinkfan.service
    

the result will be like this:

● thinkfan.service - simple and lightweight fan control program
   Loaded: loaded (/lib/systemd/system/thinkfan.service; enabled; vendor preset: enabled)
   Active: active (running) since Jum 2016-10-07 20:09:30 WIB; 28min ago
  Process: 2494 ExecStart=/usr/sbin/thinkfan (code=exited, status=0/SUCCESS)
 Main PID: 2496 (thinkfan)
   CGroup: /system.slice/thinkfan.service
           └─2496 /usr/sbin/thinkfan

Okt 07 20:09:30 thinkpad-x220 systemd[1]: Starting simple and lightweight fan control program...
Okt 07 20:09:30 thinkpad-x220 thinkfan[2494]: thinkfan 0.9.1 starting...
Okt 07 20:09:30 thinkpad-x220 thinkfan[2494]: Daemon PID: 2496
Okt 07 20:09:30 thinkpad-x220 systemd[1]: Started simple and lightweight fan control program.
Related Question