How to properly control your Lenovo Thinkpad R61 fan rotation cycles on Linux with ThinkFan

Since quite a long I’m issuing issues with my fan rotation controlling software on Linux.
That is really annoying since every now and then I experience problems with overheats when my systemis under heavy loads.
That would interrupt my proper work with my notebook every now and then and had became a real pain in the asswith time.
I spend a lot time looking for a solution in the meantime trying all kind of scripts which mentioned on thinkwiki.org
I’ve had an unpleasent experiences with tpfand , tp-fancontrol as well as with the automated process to control fan through some kernel module options like:

options thinkpad_acpi fan_control=1

To solve my overheating issues when the temperature shown by lm-sensors was reaching 60 degrees andabove I had to manually change the fan rotation level with the command :

# increase thinkpad fan speed to max
root@noah:~# echo level 7 > /proc/acpi/ibm/fan

The manual way to increase fan rotation when my CPU was under a high load caused by the automated thinkpad_acpi kernel module wrongly controlling the fan speed was really irritating, therefore I looked for something online to manage the fan rotation to cool my cpu in a proper way, after the many failed attems to use some of the forementioned softwares as well as other techniques I found to be explained as a workarounds to tune the automated fan rotation speed.
I finally found Thinkfan . The wonderful guys from Debian has even prepared a packaged deb package of thinkfan, so as a debian user the whole thinkfan installation was as easy as:

root@noah:~# apt-get install thinkfan

Though thinkfan worked just fine most of the time and was able to control my fan speed automatically quite properly most of the time, it failed to do so every now and then.
Since failures to adjust properly the fan rotation speed on my Debian Linux when the system was under a stress was rare, I was quite happy with thinkfan as a fan manager for my desktop linux system most of the time.
The most often cases in which thinkfan failed to properly adjust my fan speed to cool my cpu properly was after system sleeps or hibernate
To work around this issue I have created a crontab which would periodically restart the thinkfan daemon, the crontab I used is as follows:

# restart thinkfan on every 30 minutes to prevent issues with thinkfan after hibernate and sleep on Debian Linux
0,30 * * * * /etc/init.d/thinkfan restart >/dev/null 2>&1

This kind of solution worked until recently when I have used apt-get to upgrade my system software to the latest versions, ever since then thinkfan misbehaving unabling to properly control my notebook lenovo thinkpad r61 fan speed.

The failure to control properly the fan speed was accompanied by the following thinkfan warning messages in /var/log/messages :

Jun 7 15:30:02 noah thinkfan: WARNING: Using default temperature inputs in /proc/acpi/ibm/thermal.
Jun 7 15:30:02 noah thinkfan: WARNING: You have not provided any correction values for any sensor, and your fan will only start at 55 °C. This can be dangerous for your hard drive.

I spend almost two hours Googling for the error and possible articles on how to configure my thinkfan /etc/thinkfan.conf to match my thinkpad r61 fan control but I couldn’t find anything meaningful in Google.

Thus I started experimenting changing values in my /etc/thinkfan.conf until I reached a moment the fan is properly controlled by thinkfan.

I thought this values could be of a great benefit to other Thinkpad R61 Linux users I decided to blog about my issues and my solution to fan control issues.
So if you are also in the same struggles with properly configuring the fan speed for thinkfan to match Thinkpad model R61, you will have to download my thinkpad r61 Correction values thinkfan.conf file
Our you can either just copy paste the following in your /etc/thinkfan.conf configuration file on your system:

(0, 38, 40)
(1, 42, 44)
(2, 46, 48)
(3, 50, 52)
(4, 54, 56)
(5, 58, 60)
(6, 62, 64)
(7, 66, 32767)

For other Lenovo / IBM Thinkpad model types the correction values might be close or even it’s possible that the same configuration to control your fan with thinkfan might be compatible with other Thinkpads.
If you test it on another thinkpad and you find it working or some tweakenings to the up-mentioned correction values help in tuning thinkfan on other Thinkpads, please post here!
Thanks God, now after simply restarting my thinkfan, my notebook fan is automatically properly set to rotate!

Share this on

Download PDFDownload PDF

Tags:

20 Responses to “How to properly control your Lenovo Thinkpad R61 fan rotation cycles on Linux with ThinkFan”

  1. [...] time ago before I have blogged about How to properly control your Lenovo Thinkpad R61 fan rotation cycles on Linux with Th…In this tiny article I have explained my previous obstacles of making my Notebook CPU cooling fan to [...]

  2. Petar Milin says:

    I wonder whether you could give more detailed explanation how to properly add crontab for thinkfan? Moreover, do we need it if we addjust /etc/thinkfan.conf?

    Thanks!
    PM

    • admin Epiphany Debian GNU/Linux says:

      Hi having the crontab is not absolutely necessery, however it works well for me that’s why I mentioned it.
      To add crontab type in your terminal for instance “crontab -u root -e”. Then you will have to deal with saving it after you paste what I point in the article should go in the crontab. Here it depends on your text editor if it’s vim or nano. If you’re with vi/vim you need to press “i” when the editor opens and laters press “esc” then “:x!” this will save the crontab and install it. If you’re with nano just place the crontab just like it’s said in the article and press “ctrl+x” this will save the edit.

      Regards,
      Georgi

  3. Jospeh Milich says:

    Hello! I’ve read some of your publish right here and uncovered it fascinating and it makes a whole lot of sense. Plus i love your theme below. Thumbs up! Maintain on sharing!

  4. Stone says:

    Well I’m sorry, but the values listed there don’t seem to work with the latest thinkfan, for the LOWER limits don’t overlap with the previous UPPER limits.
    I believe some easy adjustments will work.

    Cheers!

    • admin Epiphany Debian GNU/Linux says:

      if you have values that work and you can post info about your exact linux version it will be great.
      Hope it might benefit others.

      • Stone says:

        just like this: (/etc/thinkfan.conf)
        (0, 38, 42)
        (1, 40, 46)
        (2, 44, 50)
        (3, 48, 54)
        (4, 52, 58)
        (5, 56, 62)
        (6, 60, 66)
        (7, 64, 32767)

        I’m using Arch Linux, kernel 2.6.39, i686 Intel Pentium Dual, ThinkPad R61i.

  5. kleskjr says:

    Zdrasti Georgi,

    I have a question concerning the auto-start of the thinkfan daemon. The line “0,30 * * * * killall -HUP thinkfan” restarts the thinkfan every 30 minutes, but it does not start it when I boot the machine. Do you have a suggestion how thinkfan can be started automatically through crontab as well?

    Cheers for the posts,
    Nikolay

    • admin Epiphany Debian GNU/Linux says:

      Здрасти Nikolay,

      You can configure /etc/init.d/thinkfan to start up.
      Or if you’re missing the thinkfan script I can put a link here for you.

      Поздрав! :)

  6. nikolay says:

    Здрасти и thanks for the fast reply,

    I made a thinkfan_auto script which looks like this:
    #!/bin/bash
    sleep 30 && thinkfan ;

    Then I copied it it /etc/init.d/ and run sudo update-rc.d thinkfan_auto defaults. But the program still doesn’t start at boot.

    Any suggestion on how the script should look like is welcomed.

    Благодаря!
    Николай

    • admin Epiphany Debian GNU/Linux says:

      Здрасти и ur welcome :)
      You can download the script I use from below link.
      http://www.pc-freak.net/files/thinkfan

      Add the script to be loaded in your runlelvel, the Debian standard desktop runlevel is 2.

      hipo@noah:/etc/init.d$ /sbin/runlevel
      N 2

      Issue the commands to add them in runlevel 2.
      # cd /etc/rc2.d/; ln -sf /etc/init.d/thinkfan S19thinkfan

      To be honest I never get used to update-rc.d ;)

      If I can further help it will be a pleasure.

      Всичко най!
      Георги

  7. nikolay says:

    Thanks for the reply Georgi,

    somehow I managed to get it working yesterday. I found the script you posted, and then enabled thinkfan in /etc/default/thinkfan (as said in the script). As I put the program thinkfan (the binary file) in /usr/local/sbin, I had to change the path in the script from DAEMON=/usr/sbin/$NAME to DAEMON=/usr/local/sbin/$NAME. At the end I run sudo update-rc.d -f thinkfan start 99 2 3 4 5 . and it worked :)

    I don’t get why the scripts in /etc/init.d can not be a simple one line code (like in my previous post). Is that a security reason, or there is something deeper that I can’t understand?

    Благодаря за помощта!
    Поздравления из блога ти, доста интересни статии имаш. Най-вероятно ще се видим пак по коментарите под тях ;)
    Поздрави, Николай

    • admin Epiphany Debian GNU/Linux says:

      Ur welcome ;)
      Glad you make it. The reason behind the scripts are not just few lines is that if there are just few lines is versatile, it needs to make different checks related to the service activity up/down restart/stop/start options for the service etc.

      Няма проблем за помощта, радвам се че съм помогнал и че с нещо ти е бил полезен блога.
      Ще се виждаме из коментарите.

      Всичко най!
      Георги

  8. tm says:

    Is there a way to do this for idiots

  9. Kattie Draffen says:

    Hi, are you the administrator of this blog? I have some urgent news. Do Not fall for any charlatans trying to buy your site for only a few bucks…you’re sitting on a huge GOLDMINE. You see, I own a couple blogs myself, and ever since I put a few small lines of code in them (get it here —> http://doiop.com/Make1407PerDay <—-), they have been raking in for me a stable $300-$600 a day. Each day, whether or not I feel like working and I can prove it. CNN and BBC have called it the most revolutionary cash funnel in 2011, I highly suggest you listed to the guy's story all the way to the end. It won't cost you anything to see how he transformed himself by using this powerful tool: http://doiop.com/Make1407PerDay

  10. Tamera says:

    É pá! É que nao quero que te falte nada!!!

Leave a Reply