Nvidia fanspeed adjustment

This is a simple script thats can lower or raise the speed of the fan on nvidia based graphic cards. Requires nvclock.

Usage

 * Lower speed by 10%: adjustspeed -10
 * Raise speed by 5%: adjustspeed 5
 * Set to stored speed: adjustspeed

 if [ ! -e ~/.fanspeed ]; then echo "Creating ~/.fanspeed with default speed (100%)" echo "100" > ~/.fanspeed fi speed=`cat ~/.fanspeed` if [ ! $1 ]; then echo "Setting speed to stored value ($speed%)" nvclock -F $speed -f exit 0 else diff=$1 fi speed=`expr $speed + $diff` if [ $speed -lt 30 ]; then speed=30 fi if [ $speed -gt 100 ]; then speed=100 fi
 * 1) !/bin/bash

nvclock -F $speed -f pkill osd_cat echo "$speed" > ~/.fanspeed echo "Fanspeed: $speed%" | \osd_cat -f "-*-courier-bold-r-normal-*-34-*-*-*-*-*-*-*" -o 50 -p top -A center -d 2