View on GitHub


simple fan control script for thinkpad

Download this project as a .zip file Download this project as a tar.gz file


simple fan control script for thinkpad


thinkfan-sh is released under the MIT Public License

Description is just a very simple shell script that handles fan speed on thinkpad computers under GNU/Linux using /proc/acpi/ibm/fan and /proc/acpi/ibm/thermal.


This script plays around your fan speed, so it could be a dangerous for your computer. Use it carefully.

A nice visible temperature widget might be a good idea.

Some tuning might also be good.

Using the script

Installation and configuration

As root:

curl -o /usr/local/bin/
vim /usr/local/bin/ #edit some parameters to your taste
chmod 700 /usr/local/bin/

On some distros you may need to add thinkpad_acpi.fan_control=1 to your kernel comand line (hint, look at /boot/grub/grub.cfg).

Making it start on boot


This script has three "fan states":

It also has four "temperature thresholds":

It works like that:

LIMIT_1_UP is greater than LIMIT_1_DOWN in order to prevent the fan to switch every second from low to mid.

The same principal is used to switch between mid (2) and high (3) with LIMIT_2_UP and LIMIT_2_DOWN.

Tuning the script

There are several things you can tun inside this script.

The temperature thresholds in Celsius degree:

Note that LIMIT_N_DOWN must lower than LIMIT_N_UP.

The different fan speeds:

The value is an integer between 0 (fan disabled) and 7 (fan at max speed).

Note that there could be less than 8 speeds ( 4 and 5 could mean the same speed for example).

The default values are those used on my thinkpad T60 (the hotter one), I can set STATE_1_LEVEL to 0 on my thinkpad x60.

Hope it helps to make your thinkpad a little quieter.