Controlling fan with Thinkfan on Lenovo Thinkpad R61 on Debian GNU/Linux (adjusting proper fan cycling)

Some time ago before I have blogged about How to properly control your Lenovo Thinkpad R61 fan rotation cycles on Linux with ThinkFan
In this tiny article I have explained my previous obstacles of making my Notebook CPU cooling fan to properly rotate and cool up my Central Processing Unit.

However just recently I’ve upgraded my Debian Unstable – Squeeze/Sid through the apt-get manager to the newest possible package updates.
The upgraded bundle of packages also updated my sid thinkfan package to:

hipo@noah:~$ dpkg -l |grep -i thinkfan
ii thinkfan 0.7.1-1 simple and lightweight fan control program

I was unpleasently suprised when I tried to restart thinkfan using the thinkfan init.d script I have used until recently /etc/init.d/thinkfan , cause /etc/init.d/thinkfan was no longer be.

Furthermore I give a try to directly launch the thinkfan daemon from the terminal trying to backround the service, like so:

noah:~# thinkfan &
WARNING: Using default temperature inputs in /proc/acpi/ibm/thermal.
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.

Though this started up the thinkfan daemon as you can see the note in the message below it started up with a consistent cycling cooling to keep the CPU wamrth sticked to 55 ° degrees:
<</p>

Share this on:

Download PDFDownload PDF

Tags: , , , , , , , , , , , , , ,

13 Responses to “Controlling fan with Thinkfan on Lenovo Thinkpad R61 on Debian GNU/Linux (adjusting proper fan cycling)”

  1. mondo says:
    Firefox 3.6.8 Firefox 3.6.8 Linux Mint 9 Linux Mint 9
    Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.8) Gecko/20100723 Linux Mint/9 (Isadora) Firefox/3.6.8

    I put your edited conf file on my T43 and edited crontab. Made the difference, thanks!

    View CommentView Comment
    • admin says:
      Epiphany 2.29.92 Epiphany 2.29.92 Debian GNU/Linux x64 Debian GNU/Linux x64
      Mozilla/5.0 (X11; U; Linux x86_64; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) Safari/531.2+ Debian/squeeze/sid () Epiphany/2.29.92

      Heya,

      I’m glad it worked out for you I guess,
      this configurations should be also good to properly rotate the fan of many other Thinkpads like the many
      other T series thinkpads (T61 etc) as well as probably many others from the R series

      View CommentView Comment
  2. Deanne @ Lenovo Factory says:
    Firefox 3.5.3 Firefox 3.5.3 Windows XP Windows XP
    Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3

    Hello there, just wandered by. I have a Lenovo site. Amazing the amount of information on the web. Wasn’t exactly what I was looking for, but interesting page. Have a good day.

    View CommentView Comment
  3. Seth Rustad says:
    Firefox 3.5.3 Firefox 3.5.3 Windows XP Windows XP
    Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3

    There are some attention-grabbing deadlines on this article however I don’t know if I see all of them heart to heart. There may be some validity but I’ll take maintain opinion till I look into it further. Good article , thanks and we want extra! Added to FeedBurner as well

    View CommentView Comment
  4. hip0 says:
    Epiphany 2.30.6 Epiphany 2.30.6 Debian GNU/Linux x64 Debian GNU/Linux x64
    Mozilla/5.0 (X11; U; Linux x86_64; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) Version/5.0 Safari/531.2+ Debian/squeeze (2.30.6-1) Epiphany/2.30.6

    Hi,
    One more thing in my post recommend to use a cron similar to:
    0,30 * * * * killall -HUP thinkfan
    A good tip here is to set to this cron line also the output of it to go to /dev/null for example:
    0,30 * * * * killall -HUP thinkfan >/dev/null 2>&3
    If you don’t place the cron by redirecting standard error and warning messages to /dev/null then on your physical console you will experience a very annoying messages from the thinkfan restart.

    Hope that helps

    View CommentView Comment
  5. Alan Chambers says:
    Firefox 7.0.1 Firefox 7.0.1 GNU/Linux GNU/Linux
    Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1

    Hi. My recent upgrade to Ubuntu 11.10, which now has DejaDup built-in quite nicely as its backup tool, caused me to discover that my T500 is running too hot – in fact, when doing a backup it frequently shuts down because it’s reached 100C. I discovered all this gradually from looking at the logs for the reason for the shutdown, then googling and finding a lot written about ThinkPads overheating with Linux.

    So, having understood the issues better, and played with setting different values to /proc/acpi/ibm/fan, I realised I needed a utility to automatically manage temperature and Thinkfan seems perfect (well, actually, the perfect solution would be for the Linux kernel to manage temperature better but I can’t make that happen!).

    I noticed, when playing with setting “level” in /proc/acpi/ibm/fan, that the value of “disengaged” causes the fan to run at about 5000rpm, whereas level 7 only results in around 3500rpm. By the way, before I touched any of these things, it never went about about 3100rpm.

    My problem is that Thinkfan has a series of fan speeds that one sets in the conf file, of which the maximum is 7, which on my machine results in a fan speed of 3500rpm. During a backup, this still wasn’t enough to keep the machine cool – some of the sensors still reached well into the 90s before I stopped the backup. With the fan manually controlled to 5000rpm (i.e. “disengaged”), the temperature remained in the 60s and 70s.

    Do you know why Level 7 doesn’t result in the maximum fan speed? Is there anything I can do in Thinkfan to access the higher speeds automatically when needed?

    It’s a potentially very useful tool – thanks for sharing it.

    Alan

    View CommentView Comment
    • admin says:
      Epiphany 2.30.6 Epiphany 2.30.6 Debian GNU/Linux x64 Debian GNU/Linux x64
      Mozilla/5.0 (X11; U; Linux x86_64; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) Version/5.0 Safari/531.2+ Debian/squeeze (2.30.6-1) Epiphany/2.30.6

      If you experience this odditiy only during backup creation. It might be nice to check out
      ionice command and run the backup to be transferred to your notebook with “ionice -c 3”.
      You can also set the fan speed to level 7 every one minute via cron maybe this will help.

      View CommentView Comment
      • admin says:
        Epiphany 2.30.6 Epiphany 2.30.6 Debian GNU/Linux x64 Debian GNU/Linux x64
        Mozilla/5.0 (X11; U; Linux x86_64; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) Version/5.0 Safari/531.2+ Debian/squeeze (2.30.6-1) Epiphany/2.30.6

        tell me if you come up with solution. I’m very interested to hear how things went.

        best!
        Georgi

        View CommentView Comment
      • Alan Chambers says:
        Firefox 7.0.1 Firefox 7.0.1 GNU/Linux GNU/Linux
        Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1

        Hi – yes – thanks for these ideas. I’ve just played with setting ionice to 3 (I hadn’t come across that possibility before) and also setting nice to 19, to reduce it’s priority all round. I tried another backup the temperature was still well into the 90s. I guess as not much else was running lowering priorities wasn’t going to make much difference.

        My biggest puzzle is why setting Level 7 doesn’t drive the fan at full speed as it’s supposed to. I think if Thinkfan could somehow persuade the fan to go at full speed (rather than the 3500rpm that seems to correspond to Level 7), my troubles would be over!

        Thanks again for your suggestions.

        Alan

        View CommentView Comment
        • admin says:
          Epiphany 2.30.6 Epiphany 2.30.6 Debian GNU/Linux x64 Debian GNU/Linux x64
          Mozilla/5.0 (X11; U; Linux x86_64; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) Version/5.0 Safari/531.2+ Debian/squeeze (2.30.6-1) Epiphany/2.30.6

          What I don’t get is your fan level speed showing set to 7 when you cat the /proc/acpi/ibm../ ?

          View CommentView Comment
    • Alan Chambers says:
      Firefox 7.0.1 Firefox 7.0.1 GNU/Linux GNU/Linux
      Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1

      Yes – to answer your question – cat /proc/acpi/ibm/fan does show level 7 and the fan speed is about 3500, which is consistent with my various tests. The only setting I’ve found that drives the fan faster is “level disengaged”.

      So, in a spirit of adventure, I’ve made a very small mod to your code, adding a line that tests for a new level 99 in the config file which I’ve set to cover the range 70 to 999. In the code where the level is set (in system.c in the function setfan_ibm()) I’ve copied the code you have that sets “level disengaged” if cur_lvl == INT_MIN, adding a line that also checks for cur_val == 99, and also setting “level disengaged” in that case too.

      Now, when I do my backup, the fan quickly notches up to level 7 (3500rpm) and then after a couple of minutes as the temperature rises, sets “level disengaged”, which puts the fan speed to 5000rpm, which manages to keep the temperature in the low 80s, rather than the high 90s as before.

      If I only understood the purpose of “level disengaged”, I’d be happy!

      (By the way, this is the first C code I’ve ever compiled on a Linux system – I’ve been writing Java for so many years now. I was surprised how easy it was.)

      View CommentView Comment
      • admin says:
        Epiphany 2.30.6 Epiphany 2.30.6 Debian GNU/Linux x64 Debian GNU/Linux x64
        Mozilla/5.0 (X11; U; Linux x86_64; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) Version/5.0 Safari/531.2+ Debian/squeeze (2.30.6-1) Epiphany/2.30.6

        Yep, compiling on Linux is a piece of cake. Good you made it to decrease your CPU temperature. Still 80 degrees is too high temperature and if your CPU works for too long time under this temperature its scheduled live will decrease tremendously.
        try to set a root crontab to execute on cron:
        echo level 7 > /proc/acpi/ibm/fan >/dev/null 2>&1
        from cmd line quickest way under root (if you don’t have other crons running) would be:
        # echo ‘*/1 * * * * echo level 7 > /proc/acpi/ibm/fan >/dev/null 2>&1’ | crontab –

        best!
        Georgi

        View CommentView Comment
    • Martin Roth says:
      Firefox 9.0.1 Firefox 9.0.1 Ubuntu x64 Ubuntu x64
      Mozilla/5.0 (Ubuntu; X11; Linux x86_64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1

      Just a note since I haven’t seen this anywhere else:

      Setting the fan level to 64 boosts the speed on my W500 up to 5000 RPM and actually cools down my machine.

      Here are the sensor values I’m currently using:

      (3, 0, 40)
      (5, 35, 60)
      (7, 54, 68)
      (64, 65, 32767)

      View CommentView Comment