I have a Lenovo Thinkpad T420s. It’s a nice little laptop. But the fan runs, constantly, and annoys me. Thankfully, there’s a nice tool called thinkfan!

On Debian Stretch with a Linux 4.x kernel, here’s how you can set it up to work so that your fan only spins up at temperatures above normal levels, saving your battery and keeping you from going insane due to fan noise:

Install thinkfan:

$ sudo apt install thinkfan

Enable the thinkfan service in systemd:

$ sudo systemctl enable thinkfan.service

Make sure the thinkpad_acpi kernel module loads with fan control enabled:

$ echo "options thinkpad_acpi fan_control=1" | \
	sudo tee /etc/modprobe.d/thinkpad_acpi.conf

Create a thinkfan.conf file with sensible fan rates for sensible temperatures, which looks like this, which will turn off the fan until the CPU temperature reaches 48 degrees C and will turn the fan on full-blast above 63 degrees C:

# For Linux 4.x kernels which no longer have the /proc interface
hwmon /sys/devices/virtual/hwmon/hwmon0/temp1_input
(0,	0,	48)
(1,	45,	52)
(2,	49,	56)
(3,	53,	59)
(4,	56,	62)
(5,	59,	66)
(7,	63,	32767)

Finally, enable thinkfan to allow itself to start up at boot time:

$ sudo sed -i 's|START=no|START=yes|' /etc/default/thinkfan

You can now either reboot or start thinkfan manually using systemctl and enjoy your silence!


Published

17 October 2016