Setting up ThinkFan for Thinkpad T420
Recently I have formatted by laptop with Linux Mint 18.1 and i need to setup my thinkfan again. I am using Linux Mint 18.1 but any Ubuntu based distro should have no issues. So here we go.
Install thinkfan
sudo apt-get -y install tp-smapi-dkms thinkfan lm-sensors read-edid i2c-tools
check your fan
cat /proc/acpi/ibm/fan
it should show your level is on auto
find your sensor location
find /sys/devices -type f -name "temp*_input"
take note the output. this will be your hwmon location for thinkfan configuration file
now you can edit your thinkfan.conf using your preferred text editor
sudo nano /etc/thinkfan.conf
below is my setting. put your hwmon location accordingly.
tp_fan /proc/acpi/ibm/fan
hwmon /sys/devices/virtual/thermal/thermal_zone0/temp
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp1_input(0, 0, 42)
(1, 40, 47)
(2, 45, 52)
(3, 50, 57)
(4, 55, 62)
(5, 60, 77)
(7, 73, 93)
(127, 85, 32767)
Configure thinkpad_acpi modprobe
sudo echo "options thinkpad_acpi fan_control=1" | sudo tee /etc/modprobe.d/thinkfan.conf
sudo modprobe -rv thinkpad_acpisudo modprobe -v thinkpad_acpi
If you encounter “modprobe: FATAL: Module thinkpad_acpi is in use” just reboot your machine.
lets start thinkfan
sudo thinkfan -q
then try checking your fan again
cat /proc/acpi/ibm/fan
your level should be other than auto
reference: