[ltp] Fan management for thinkpad

Paul RIVIER linux-thinkpad@linux-thinkpad.org
Mon, 11 Jul 2005 16:28:12 +0200


Did anybody try it ? Isn't there anybody interested by this feature ?

paul

Paul RIVIER wrote:

> Hi,
>
> I wrote a script as to manage the fan behavior (ibm_manage_fan.sh), it
> is really easy to use so I give it to you as it is :)
> It is associated with an init script (ibm_fan_rc), as to manage it in a
> proper maner.
> Using this your fan will run only if necessary.
> !!! Check on the ibm-acpi homepage that your laptop is supported for 
> fan control !
> I plan to work on ibm-acpi module as soon as I get free time :)
>
>
> Paul
>
>------------------------------------------------------------------------
>
>#!/bin/sh
>#
># Please copy this file in /etc/init.d and make it executable
> 
># description: Starts and stop ibm_manage_fan as to control the fan on ibm thinkpads
># Read /usr/sbin/ibm_manage_fan.sh !
> 
>
>if [ ! -f /proc/acpi/ibm/fan ] ; then
>	echo "Please use ibm-acpi 0.11 or higher, with experimental=1"
>	exit -1
>fi
>
>if [ ! -f /usr/sbin/ibm_manage_fan.sh -a -x /usr/sbin/ibm_manage_fan.sh ] ; then 
>	echo "Please copy ibm_manage_fan in /usr/sbin and make it executable"
>	exit -1
>fi
>
># Enable ibm_manage_fan when the system is booted
>
>case $1 in
>  start)
>    if [ -f /var/run/ibm-manage-fan-enabled ] ; then
>	echo "Thinkpad fan management is already running ..."
>	exit 0
>    fi
>    echo -n "Initializing thinkpad fan management ... "
>    touch /var/run/ibm-manage-fan-enabled
>    /usr/sbin/ibm_manage_fan.sh &
>    echo "done."
>    exit 0
>    ;;
>
>  restart|reload|force-reload)
>    set -e
>    echo -n "Restarting thinkpad fan management... "
>    $0 stop > /dev/null
>    $0 start > /dev/null
>    echo "done."
>    exit 0
>    ;;
>
>  stop)
>    echo -n "Stopping thinkpad fan management ... "
>    rm -f /var/run/ibm-manage-fan-enabled
>    sleep 5
>    echo -n enable > /proc/acpi/ibm/fan
>    echo "done."
>    exit 0
>    ;;
>
>  *)
>      echo "Usage: $0 {stop|start|restart|reload|force-reload}" >&2
>      exit 1
>    ;;
>esac
>
>
>  
>