View Single Post
Old 06-17-11, 03:30 PM   #18
jeisom
Registered User
 
Join Date: Dec 2005
Location: My own little world
Posts: 117
Default Re: multiple monitors, higher GPU temperature

Here is a bash script that I use to adjust the speed based on performance level. My card has 4 levels so you'd need to treak it. thanks for the info on "[gpu:0]/GPUFanControlState=1". I missed that command. had everything else working.


Code:
#!/bin/bash
#
#
FAN0=61
FAN1=75
FAN2=75
FAN3=91


while 

true

do

NewSpeed=61
PERFLEVEL=`nvidia-settings -q GPUCurrentPerfLevel | grep Attribute | cut -d " " -f 6| cut -d . -f 1`
FANSPEED=`nvidia-settings -q "[fan:0]/GPUCurrentFanSpeed"| grep Attribute | cut -d " " -f 6 | cut -d . -f 1`
case $PERFLEVEL in
0)
    NEWSPEED=$FAN0
    ;;
1)
    NEWSPEED=$FAN1
    ;;
2)
    NEWSPEED=$FAN2
    ;;
3)
    NEWSPEED=$FAN3
    ;;
*)
    DATETIME=`date`
    echo "$DATETIME nvfanspeed: error,  exiting ..."
    exit 1
   ;;
esac

if [ "$FANSPEED" != "$NEWSPEED" ] ; then
    DATETIME=`date`
    `nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUCurrentFanSpeed=$NEWSPEED" > /dev/null`
    echo -e "$DATETIME nvfanspeed: setting to $NEWSPEED%"
fi 

    sleep 2;
done
jeisom is offline   Reply With Quote