Difference between revisions of "Problem with fan noise"

From ThinkWiki
Jump to: navigation, search
(Minor suggestion for example script.)
Line 76: Line 76:
  
 
====partial fix:====
 
====partial fix:====
 +
{{WARN|This circumvents the BIOS fan control, so be careful and use at your own risk! Don't toast your ThinkPad.}}
 
When loading [http://ibm-acpi.sourceforge.net/ 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:
 
When loading [http://ibm-acpi.sourceforge.net/ 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:
  
Line 90: Line 91:
 
  commands:      enable, disable
 
  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.
+
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.
  
 
'''sh script example'''
 
'''sh script example'''
  
<pre>
+
#!/bin/sh
#!/bin/sh
+
 
+
MAXTEMP=50
MAXTEMP=50
+
 
+
while [ 1 ];
while [ 1 ];
+
do
do
 
 
         fan=no
 
         fan=no
 
+
 
         for temp in `sed s/temperatures:// < /proc/acpi/ibm/thermal`
 
         for temp in `sed s/temperatures:// < /proc/acpi/ibm/thermal`
 
         do
 
         do
 
                 test $temp -gt $MAXTEMP && fan=yes
 
                 test $temp -gt $MAXTEMP && fan=yes
 
         done
 
         done
 
+
 
         command='disable'
 
         command='disable'
 
         test "$fan" = "yes" && command='enable'
 
         test "$fan" = "yes" && command='enable'
 
         echo $command > /proc/acpi/ibm/fan
 
         echo $command > /proc/acpi/ibm/fan
 
+
 
         sleep 20
 
         sleep 20
done
+
done
</pre>
 
  
 
'''sh script example with more features'''
 
'''sh script example with more features'''
  
<pre>
+
#!/bin/sh
 
+
#!/bin/sh
+
# fan control-script
 
+
#
# fan control-script
+
# based upon ibm-acpi 0.11 (experimental=1 !)
#
+
#
# 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
# eliminates anoying "fan always on" in battery mode
+
# fan acivates at MAXTEMP and cools down CPU, GPU etc. to MAXTEMP-DELTA than the fan is turned off
# works with hysteresis (DELTA) so that always-turn-on/turn-off is avoided
+
# furthermore detects if AC is on and gives back fan control to default behaviour than
# 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!
# 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
# have fun!
+
# mk 05.05.05
+
MAXTEMP=51
 
+
DELTA=4
MAXTEMP=51
+
DELTA=4
+
SWITCHTEMP=$MAXTEMP
 
+
SWITCHTEMP=$MAXTEMP
+
#make sure the script doesn't leave the fan off on error
 
+
trap "echo enable > /proc/acpi/ibm/fan" EXIT
while [ 1 ];
+
do
+
while [ 1 ];
 +
do
 
   for ac in `sed s/state:// < /proc/acpi/ac_adapter/AC/state`
 
   for ac in `sed s/state:// < /proc/acpi/ac_adapter/AC/state`
 
     do
 
     do
Line 152: Line 152:
 
               test $temp -gt $SWITCHTEMP && fan=yes
 
               test $temp -gt $SWITCHTEMP && fan=yes
 
             done
 
             done
 
+
 
           if [ "$fan" = "yes" ]; then
 
           if [ "$fan" = "yes" ]; then
 
             command='enable'
 
             command='enable'
Line 160: Line 160:
 
             command='disable'
 
             command='disable'
 
           fi
 
           fi
 
+
 
         else # ac-adapter on -> set fan control to standard behaviour
 
         else # ac-adapter on -> set fan control to standard behaviour
 
           command='enable'
 
           command='enable'
 
         fi
 
         fi
 
+
 
         echo $command > /proc/acpi/ibm/fan
 
         echo $command > /proc/acpi/ibm/fan
 
         sleep 15
 
         sleep 15
Line 170: Line 170:
 
   done
 
   done
  
</pre>
+
'''init script example'''
  
{{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.}}
+
#! /bin/sh
<pre>
+
trap "echo enable > /proc/acpi/ibm/fan" EXIT
+
N=/etc/init.d/fan
</pre>
+
{{WARN|However, no guarantee from me about that. Be careful and use at your own risk!}}
+
set -e
 
+
'''daemon script example'''
+
case "$1" in
 
 
<pre>
 
#! /bin/sh
 
 
 
N=/etc/init.d/fan
 
 
 
set -e
 
 
 
case "$1" in
 
 
   start)
 
   start)
 
         # make sure privileges don't persist across reboots
 
         # make sure privileges don't persist across reboots
Line 204: Line 195:
 
         exit 1
 
         exit 1
 
         ;;
 
         ;;
esac
+
esac
 +
 +
exit 0
  
exit 0
 
</pre>
 
  
 
[[Category:770X]] [[Category:A31p]] [[Category:R32]] [[Category:R50]] [[Category:R50p]] [[Category:R51]] [[Category:R52]] [[Category:T40]] [[Category:T40p]] [[Category:T41]] [[Category:T41p]] [[Category:T42]] [[Category:T42p]] [[Category:T43]] [[Category:T43p]] [[Category:X40]] [[Category:X41]]
 
[[Category:770X]] [[Category:A31p]] [[Category:R32]] [[Category:R50]] [[Category:R50p]] [[Category:R51]] [[Category:R52]] [[Category:T40]] [[Category:T40p]] [[Category:T41]] [[Category:T41p]] [[Category:T42]] [[Category:T42p]] [[Category:T43]] [[Category:T43p]] [[Category:X40]] [[Category:X41]]

Revision as of 12:34, 9 May 2005

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:

ATTENTION!
This circumvents the BIOS fan control, so be careful and use at your own risk! Don't toast your ThinkPad.

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.

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

#make sure the script doesn't leave the fan off on error
trap "echo enable > /proc/acpi/ibm/fan" EXIT

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

init 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