Problem with fan noise

From ThinkWiki
Revision as of 10:13, 9 May 2005 by UW(e) (Talk | contribs) (Minor suggestion for example script.)

Jump to: navigation, search

Information about the fan noise problem in Thinkpad models from 2003/2004.

Problem description

There seem to be two different occurances of the problem (or two different problems).

acceleration problem:

The Thinkpad Fan accelerates in regular intervals, making an annoying noise.

always on problem:

The Fan is always on, even though the processor is rather cool.

Affected Models

acceleration problem:

  • Thinkpad T40, T40p, T41, T42(?)

always on problem:

  • Thinkpad T40, T40p, T41, T41p, T42, T42p, T43
  • Thinkpad R50, R50p, R51, R52, R32
  • Thinkpad X40
  • Thinkpad A31p
  • Thinkpad 770X

Affected Operating Systems

acceleration problem:

  • Linux, all flavours

always on problem:

  • Linux, all flavours
  • FreeBSD 5.3
  • Windows XP
  • Windows 2000 pro

Status

acceleration problem:

IBM released an update to the embedded controller program that seems to at least partially solve this problem:

Version 3.03 - 1RHT70WW
NOTE: This version of Embedded Controller Program will only work with BIOS Version 3.06f (or higher).
   * (Fix) Reduced Fan noise in some models.

The update can be found here: http://www-306.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-50279

always on problem:

The problem is yet unsolved. But see the partial fix below.

IBM made a statement regarding this on their homepage: http://www-307.ibm.com/pc/support/site.wss/MIGR-56504.html

It seems that it's a feature of centrino - http://mailman.linux-thinkpad.org/pipermail/linux-thinkpad/2004-September/019737.html Perhaps it's fixable by adding the fans and temps to the dsdt?

Solutions

acceleration problem:

Replacing the fan

Some people reported that they replaced the original fan against one of a similar notebook without the problem has worked for them, i.e. changing a T41s fan against one from a T41p.

BIOS upgrade

You can try upgrading your embedded controller program to version 3.03 or newer.

The update can be found here: http://www-306.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-50279

always on problem:

It seems like for some people a combination of enabling dynamic frequency scaling and using the most recent radeon drivers (from xorg 6.8.x) with the DynamicClocks option enabled helped lowing the fan rotation and hence making it more quiet.

Also the fglrx driver from ATI is said to show the same effect when used together with dynamic frequency scaling.

On a 770X the fan can be fully controlled through ACPI. Thermal Zone THM5 (possibly the battery/charging circuit, it's definitely warmer when using 5v PCMCIA cards and AC) triggers it to turn on and not ever off by design. Can be solved by a custom DSDT, which also makes use of the variable-speed features of the fan (will release this once I've finished tweaking and testing it).

partial fix:

When loading IBM ThinkPad ACPI Extras v0.11 with experimental switch (modprobe ibm_acpi experimantal=1), it is possible to read and write the status of fan:

#cat /proc/acpi/ibm/fan
status:         enabled
speed:          3580
commands:       enable, disable

#echo disable > /proc/acpi/ibm/fan

cat /proc/acpi/ibm/fan
status:         disabled
speed:          0
commands:       enable, disable

But the fan will then never wake up. So, we need a small script witch is constantly checking the temperature and setting the fan on/off when needed. (deamon? cron job?) If anyone has an idea please post it here.

sh script example

#!/bin/sh

MAXTEMP=50

while [ 1 ];
do
        fan=no

        for temp in `sed s/temperatures:// < /proc/acpi/ibm/thermal`
        do
                test $temp -gt $MAXTEMP && fan=yes
        done

        command='disable'
        test "$fan" = "yes" && command='enable'
        echo $command > /proc/acpi/ibm/fan

        sleep 20
done

sh script example with more features


#!/bin/sh

# fan control-script
#
# based upon ibm-acpi 0.11 (experimental=1 !)
#
# eliminates anoying "fan always on" in battery mode
# works with hysteresis (DELTA) so that always-turn-on/turn-off is avoided
# fan acivates at MAXTEMP and cools down CPU, GPU etc. to MAXTEMP-DELTA than the fan is turned off
# furthermore detects if AC is on and gives back fan control to default behaviour than
#
# one can change MAXTEMP and DELTA to individual values
# but take care of your THINKPAD don`t melt it!
#
# have fun!
# mk 05.05.05

MAXTEMP=51
DELTA=4

SWITCHTEMP=$MAXTEMP

while [ 1 ];
do
   for ac in `sed s/state:// < /proc/acpi/ac_adapter/AC/state`
     do
      if [ "$ac" = "off-line" ]; then
          fan=no
          for temp in `sed s/temperatures:// < /proc/acpi/ibm/thermal`
            do
              test $temp -gt $SWITCHTEMP && fan=yes
            done

          if [ "$fan" = "yes" ]; then
            command='enable'
            SWITCHTEMP=`expr $MAXTEMP - $DELTA`
          else
            SWITCHTEMP=$MAXTEMP
            command='disable'
          fi

        else # ac-adapter on -> set fan control to standard behaviour
          command='enable'
        fi

        echo $command > /proc/acpi/ibm/fan
        sleep 15
      done 
   done

Hint:
For a little bit additional security, I would suggest to add the following line. This *might* help to enable the fan, in case the script gets killed.
trap "echo enable > /proc/acpi/ibm/fan" EXIT
ATTENTION!
However, no guarantee from me about that. Be careful and use at your own risk!

daemon script example

#! /bin/sh

N=/etc/init.d/fan

set -e

case "$1" in
  start)
        # make sure privileges don't persist across reboots
        if [ -d /var/run/fan ] && [ "x`ls /var/run/fan`" != x ]
        then
                touch -t 198501010000 /var/run/fan/*
        fi
        fan.sh &    # Script from above
        ;;
  stop|reload|restart|force-reload)
        killall fan.sh
        echo enable > /proc/acpi/ibm/fan
        ;;
  *)
        echo "Usage: $N {start|stop|restart|force-reload}" >&2
        exit 1
        ;;
esac

exit 0