A customizable fan driver for the ThinkPad x220
Go to file
Michael De Roover c76fdaf788
Kernel module configuration requires root
2020-10-20 18:04:06 +02:00
README.md Update note on GitHub's renaming 2020-09-09 13:48:37 +02:00
install Kernel module configuration requires root 2020-10-20 18:04:06 +02:00
tpfan Forgot one property in tpfan, oops 2020-08-08 21:39:58 +02:00
tpfan.conf Add an extreme mode just for Winblows VM's 2020-08-08 21:31:36 +02:00


A customizable fan driver for the ThinkPad x220

This is a fan speed control script written in bash. Despite being very simple, it is an improvement to the stock fan control.

The ThinkPad x220's stock fan control seems to want to keep the processor at 50°C all the time. This is fine but the i5-2520M already idles at 50°C. Thus a modification was needed.

This script requires the manual fan control to be allowed by the system first. See ThinkWiki for more information. Generally speaking you have to insert options thinkpad_acpi fan_control=1 into /etc/modprobe.d/thinkpad_acpi.conf and reboot. ThinkWiki still covers Debian squeeze but this appears to be unchanged in Debian buster.

Afterwards you can clone this repository, run ./install in it and run tpfan. The configuration file can be found in /etc/tpfan.conf.

The script currently supports 3 modes of operation. The temperature and fan speed can be monitored using tpfan monitor. It can additionally be corrected using tpfan correct. Note that it while it is perfectly possible to run multiple corrective processes simultaneously, I don't know how well the fan controller chip actually deals with updates more than once a second. Try keeping the corrective processes at 1 or 2 at most. Finally a service mode has been implemented that doesn't clutter the system journal. This can be done by using tpfan service in the service file of whichever init system you are using.

It appears that this fan controller might work on other ThinkPads too. See if your ThinkPad appears on the aforementioned ThinkWiki page and give it a try. If it works, please do let me know!

Why is this repo's "main" branch called nigger?

With all the changes GitHub and ISC as well (for BIND anyway, ISC dhcp and Kea are somehow unchanged) are pushing, and now even RFC8499 changing DNS terminology to "primary" and "secondary" servers (but still leaving references to master elsewhere, because why do these things properly), I felt a strong need to not call my main branch the heavily loaded term "master". You know, it's so offensive. So I figured that I had to choose something less offensive. Nigger sounded just right. It's about as effective as changing a name to main too.

You can checkout to master if you desire. Or you can checkout to dev and get the latest features. I generally don't push changes unless I've tested them on my own x220 anyway. Should be stable enough.

Apparently GitHub will change to main at the first of October. See github/renaming for more details. Can't wait to see the mayhem!


Generally speaking the fan control only becomes more fine-grained with this script and shouldn't damage your laptop. However please ensure that you clean your fan and change the thermal grease often, twice a year or so. That will do the most by far to reduce fan speeds and temperature. And by manually controlling the fan, it goes without saying that there is no warranty anymore. You do this at your own risk.