[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Fan speed regulation on G320 Laptop with it87 module



Hi,

Attached a little tools to help shut down fan on this kind of laptop
(Elite G320, Via Nehemiah based).


Ps: I've wrote first this script in perl, it seems less hangry than this
one in bash without I could explain it. If someone want the other...

Ps2: need Knoppix with kernel >= 2.6.11

Jody
#!/bin/bash
# Fichier de gestion de la vitesse de ventillo

lsmod | grep it87;

if [ $? = 1 ]
then modprobe it87 && modprobe i2c_isa
fi

vitesse_ventil="/sys/bus/i2c/devices/1-0290/driver/1-0290/pwm2";

while [ 1 ];do 

	temp=`cat /sys/bus/i2c/devices/1-0290/temp2_input`;

	# Fan off
	if [ $temp -le 40000 ] 
	then 
	echo 0 > $vitesse_ventil
	fi


	if [ $temp -gt 50000 ] && [ $temp -lt 55000 ] 
	then echo 100 > $vitesse_ventil 
	fi

	if [ $temp -gt 55000 ] && [ $temp -lt 60000 ] 
	then echo 150 > $vitesse_ventil 
	fi
	
	if [ $temp -gt 60000 ] && [ $temp -lt 63000 ]
	then echo 200 > $vitesse_ventil 
	fi
	
	if [ $temp -gt 63000 ] 
	then echo 250 > $vitesse_ventil 
	fi

	sleep 1;
done;

Reply to: