PDA

View Full Version : [Tutorial] starting with Nvidia GPU clock and the maximum fan speed by 70%.



eduardofgd
30th April 2013, 10:00 PM
[Tutorial]Booting the system with the Nvidia GPU on the maximum clock, and with the fan speed at 70%.

After some research and experimentation, I found a solution to start the Nvidia GPUs, on Linux, with the maximum clock and fan speed by 70%, preventing overheating. Just follow the steps below:

1. Install the proprietary driver for your Nvidia card:
a) On Debian-derived systems, open a terminal and run the command "$ sudo apt-get update && sudo apt-get install nvidia-current -y";
b) On Red Hat-derived systems, open a terminal and run the command "# yum install akmod-nvidia";
c) In Slackware systems, you're by yourself. I have no business with the devil.

2. Open the terminal and run the command "$ sudo gedit /etc/X11/xorg.conf" (this command will open the xorg.conf configuration file for editing);
3. In the "Device" section, paste the following:

# added manually:
Option "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x3322; PowerMizerDefaultAC=0x1"
Option "Coolbits" "4"
EndSection

4. Save and exit gedit;
5. Then open gedit again and paste the following shell script:

#!/bin/bash
# read the current fan speed from nvidia-settings
current_speed=`nvidia-settings -t -q [fan:0]/GPUCurrentFanSpeed`
new_speed=0

#read arguments from command line
case "$1" in
#if argument is "up", increase fan speed by 10%, unless already at 100%
"up") let "new_speed = $current_speed + 40"
if [ $new_speed -gt 100 ]
then
new_speed=100
fi
eval "nvidia-settings -a [gpu:0]/GPUFanControlState=1 -a [fan:0]/GPUCurrentFanSpeed=$new_speed"
;;
#if argument is "down", decrease fan speed by 10%, unless already at 35
"down") let "new_speed = $current_speed - 10"
if [ $new_speed -lt 35 ]
then
new_speed=35
fi
eval "nvidia-settings -a [gpu:0]/GPUFanControlState=1 -a [fan:0]/GPUCurrentFanSpeed=$new_speed"
;;
#if "min", set fan speed to 35%
"min") nvidia-settings -a [gpu:0]/GPUFanControlState=1 -a [fan:0]/GPUCurrentFanSpeed=35
;;
#if "maX2, set fan speed to 100%
"max") nvidia-settings -a [gpu:0]/GPUFanControlState=1 -a [fan:0]/GPUCurrentFanSpeed=100
;;
#if "mid", set fan speed to 60%
"mid") nvidia-settings -a [gpu:0]/GPUFanControlState=1 -a [fan:0]/GPUCurrentFanSpeed=60
;;
esac

exit 0

6. Save the file with the name "nvfanspeedadjust" and exit gedit;
7. In the terminal, run the command "$ chmod +x nvfanspeedadjust" to make it executable;
8. Copy the newly created file to the folder "~/.nvfanspeedautoadjust";
9. Then open gedit again and paste the following:

[Desktop Entry]
Type=Application
Exec=/home/user/.nvfanspeedadjust/nvfanspeedadjust up
Hidden=false
X-GNOME-Autostart-enabled=true
Name[pt_BR]=NvidiaFanAutoAdjust
Name=NvidiaFanAutoAdjust
Comment[pt_BR]=NvidiaFanAutoAdjust
Comment=NvidiaFanAutoAdjust

10. On the third line of the newly created file, change the username to your username;
11. Save the file with the name "nvautoadjust.desktop";
12. Copy this file to the folder "~/.config/autostart";
13. Restart the system.
14. Now, You are ready, and your Nvidia GPU will start with the maximum clock speed and fan speed will be locked in 70%, preventing overheating of the device.

P.S.: This page helped me with scripts and other things: http://crunchbang.org/forums/viewtopic.php?id=18919