Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Thinkpad T420 thinkfan setup in jessie

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
juhaszjozsef
Posts: 7
Joined: 2011-11-24 18:07

Thinkpad T420 thinkfan setup in jessie

#1 Post by juhaszjozsef »

The aim of this howto is to get thinkfan working on debian jessie for Thinkpads.
The default fan settings make the fan run pretty loud for me, so I've started to tinker around with thinkfan.
Unfortunately thinkfan needs some config to work (not that hard)...

Thinkfan
http://thinkwiki.de/Thinkfan

Install packages
First of all, you have to install a few packages not installed by default:
Open a terminal and issue as root:

Code: Select all

apt-get install thinkfan lm-sensors
After installing packages start:

Code: Select all

sensors-detect
default answers (just hit enter) should be okay

Look for thermal sensors and note the output:

Code: Select all

find /sys/devices -type f -name "temp*_input"
mine is something like this:

Code: Select all

/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
Configuration
Now open and edit /etc/thinkfan.conf as root:
at the very end of the file mine looks like:

Code: Select all

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, 55)
(1, 48, 60)
(2, 50, 61)
(3, 52, 63)
(4, 56, 65)
(5, 59, 66)
(7, 63, 32767)
Please note, that the values in brackets are for the fan levels with the minimal and maximal tempratures before changing up/down the fan level.
Eg.: (0, 0, 55)
means: fan level: 0 between 0-55 C.
Fan turns on (at fan speed level 1) above 55C turns off below 48C and steps to fan level 2 above 60C. (because of level 1 config (1, 48, 60)
remember each line is:
FAN_LEVEL, MIN_TEMP, MAX_TEMP

Enable service
Now you have to enable fan level settings via a kernel module:
Issue command as root:

Code: Select all

modprobe thinkpad_acpi fan_control=1
To make the module load at boot (issue commands as root from terminal):

Code: Select all

echo "options thinkpad_acpi fan_control=1" | sudo tee /etc/modprobe.d/thinkpad_acpi.conf
Now start the thinkfan service from command line (also as root)

Code: Select all

systemctl start thinkfan.service
if there is no error, check service status:

Code: Select all

systemctl status thinkfan.service
Enable the service to start atboot time:

Code: Select all

systemctl enable thinkfan.service
You can also check if the service is really working by checking (from terminal)

Code: Select all

cat /proc/acpi/ibm/fan 
my output is:

Code: Select all

status:         enabled
speed:          1967
level:          1
commands:       level <level> (<level> is 0-7, auto, disengaged, full-speed)
commands:       enable, disable
commands:       watchdog <timeout> (<timeout> is 0 (off), 1-120 (seconds))
Note, that the level is a number and not auto!!!
(if it is auto, then probably your thinkpad_acpi kernel module isn't loaded)

Simple KDE applet to check temperature: (Simple CPU Sensor)
https://opendesktop.org/content/show.php?content=135310

fmforever
Posts: 1
Joined: 2015-07-20 14:24

Re: Thinkpad T420 thinkfan setup in jessie

#2 Post by fmforever »

Thanks for the post above.

To get thinkfan working on my T420 under Mint 17.2, I also had to edit /etc/default/thinkfan so the line beginning "START" reads "START=yes". Mint 17.2 is based on Ubu 14.4 and doesn't use systemd.

It's so nice not listening to the effing fan! Thanks again.

Post Reply