this howto allows you to build nvclock from cvs and use automated fan control with a demonized perl script.
sorry, my english is a bit rusty...
get, configure, make and install nvclock from cvs
first we make sure, that no nvclock package is installed and install needed packages.
Code:
sudo aptitude remove nvclock
sudo aptitude install cvs automake
you need to get, configure and make the newest nvclock source from cvs.
Code:
cd /usr/local/src
sudo cvs -z3 -d:pserver:anonymous@nvclock.cvs.sourceforge.net:/cvsroot/nvclock co -P nvclock
cd nvclock
sudo sh autogen.sh
sudo ./configure
sudo make
test nvclock
Code:
./src/nvclock -i
./src/nvclock -F 100 -f
if these two commands work, install nvclock
some times the installation fails. in this case just cp nvclock by hand
Code:
sudo cp /usr/local/src/nvclock/src/nvclock /usr/bin/nvclock
use automated fan control
we use automated fan control with a litle perl script.
touch a new file and chmod it.
Code:
sudo touch /usr/bin/auto_fan
chmod 755 /usr/bin/auto_fan
insert this code in the new file, with a text editor of your choice
Code:
#!/usr/bin/perl
use strict;
use warnings;
my $nextDown = time();
while(1) {
my ($tempGPU, $speedFan) = (qx(nvclock -i) =~ /GPU temperature: (\d+)C.*Fanspeed: (\d+)/s);
my $newSpeed = $tempGPU * 2 - 100;
$newSpeed = 20 if($newSpeed < 20);
$newSpeed = 100 if($newSpeed > 100);
# print "GPU: $tempGPU°C Board: $tempBoard°C OldFan: $speedFan% NewFan: $newSpeed\n";
if($speedFan < $newSpeed) {
system("nvclock -F $newSpeed -f > /dev/null");
} else {
if($nextDown < time()) {
system("nvclock -F $newSpeed -f > /dev/null");
$nextDown = time()+30;
}
}
sleep(2);
}
the line my $newSpeed = $tempGPU * 2 - 100; controls the fan speed settings. with this settings fan speed will be 20%@60°C and 100%@100°C. my fan runs 34%@64°C GPU in almost every game. in idle (listening ogg files in the evening, while loading new oggs
) the fan slows down to 20%.
you should nice auto_fan to 15, else it lags in games, when auto_fan is running
Code:
nice -n 15 auto_fan
you can demonize this perl with start-stop-daemon.
start auto_fan
Code:
start-stop-daemon --start --oknodo --nicelevel 15 --pidfile /var/run/auto_fan.pid -m -b --exec /usr/bin/auto_fan
stop auto_fan
Code:
start-stop-daemon --stop --oknodo --pidfile /var/run/auto_fan.pid
i inserted this two lines in /etc/init.d/gdm
find log_begin_msg "Starting GNOME Display Manager..." and insert the start command after it.
find log_begin_msg "Stopping GNOME Display Manager..." and insert the stop command after it.
have fun and a whispering quit nv card.
Bookmarks