Your T43 Fan Script
Posted: Sat Nov 12, 2005 10:49 pm
Hello all,
I've been fooling around with the ibm-acpi module, which now allows us to manipulate the fan manually depending on the thermal readings. I realize it's dangerous to do this, so I thought I would share the script I am using. Do you see any harm with it?
Furthermore, I was curious what other T43 owners were using? So, please share what script you're using or none if you aren't!
Well, here is mine adapted from http://www.thinkwiki.org/wiki/ACPI_fan_ ... ol_scripts:
Thanks,
-Brian
I've been fooling around with the ibm-acpi module, which now allows us to manipulate the fan manually depending on the thermal readings. I realize it's dangerous to do this, so I thought I would share the script I am using. Do you see any harm with it?
Furthermore, I was curious what other T43 owners were using? So, please share what script you're using or none if you aren't!
Well, here is mine adapted from http://www.thinkwiki.org/wiki/ACPI_fan_ ... ol_scripts:
Code: Select all
#!/bin/sh
IBM_ACPI=/proc/acpi/ibm
THERMAL=$IBM_ACPI/thermal
FAN=$IBM_ACPI/fan
NO_FAN_TRIPPOINT=50
FIXED_FAN_TRIPPOINT=55
AUTO_FAN_TRIPPOINT=60
SLEEP_SECONDS=5
trap "echo enable > $FAN; exit 0" HUP KILL INT ABRT STOP QUIT SEGV TERM
echo disable > $FAN
while [ 1 ];
do
TEMPERATURES=`sed s/temperatures:// < $THERMAL`
MAX_TEMPERATURE=0
for TEMPERATURE in $TEMPERATURES
do
if [ $TEMPERATURE -gt $MAX_TEMPERATURE ] ; then
MAX_TEMPERATURE=$TEMPERATURE
fi
done
if [ $MAX_TEMPERATURE -le $NO_FAN_TRIPPOINT ] ; then
echo disable > /proc/acpi/ibm/fan
elif [ $MAX_TEMPERATURE -ge $FIXED_FAN_TRIPPOINT ] && \
[ $MAX_TEMPERATURE -lt $AUTO_FAN_TRIPPOINT ] ; then
echo 0x2F 0x02 > /proc/acpi/ibm/ecdump
elif [ $MAX_TEMPERATURE -ge $AUTO_FAN_TRIPPOINT ] ; then
echo enable > /proc/acpi/ibm/fan
fi
sleep $SLEEP_SECONDS
done-Brian