I did not want to write a how to, basically i just wanted to post the script. I am sure this could be made to work with SLI cards, I haven’t tried.
To be able to add fan control and overclocking.
Type this into the terminal. (changing 13 to 4 should make it fan only, and leave overclocking disabled)
nvidia-xconfig --cool-bits=*13*
Restart your system. After adding that and restarting, you should be able to adjust the clocks and fan.
To add a script that automatically changes the fan speeds. Create the file nvfc.sh with a text editor. Copy the code below to make the fan set automatically. Save, run and test.
If it works well for you, then you can make it start with Suse automatically.
Rename nvfc.sh to .desktop and paste to given dir. Or create file from scratch at dir.
To add a script that starts automatically and to change the fan speeds. Create the file nvfc.desktop with a text editor where “XXX” is your username, at “/home/XXX/.config/autostart-scripts/”. Copy the code below, to make the fan set automatically from start. I am not sure how .desktop files work exactly, I do know that you cannot run the nvfc.desktop file directly, but it does load on startup, and is what I wanted.
#!/bin/bash
#Sets Overclocking state to 1, enabling you to add +60 coreclock on the 3rd power level. Disable with "#" in front of it.
#nvidia- settings -a [GPU:0]/GPUOverclockingState=1
#nvidia-settings -a [gpu:0]/GPUGraphicsClockOffset[3]=60
new_speed=0
interval=5
# continually loop
while "1" -eq "1" ]; do
current_temp=`nvidia-settings -t -q [GPU:0]/GPUCoreTemp`
current_speed=`nvidia-settings -t -q [fan:0]/GPUCurrentFanSpeed`
#check current temperature and adjust fan speed
#If temp less than 43'c, then set to 40% speed
if "$current_temp" -lt "43" ]; then
let "new_speed = 40"
nvidia-settings -a [gpu:0]/GPUFanControlState=1 -a [fan:0]/GPUCurrentFanSpeed=$new_speed
fi
#If temp more than 43'c, then set speed% to temp+10
if "$current_temp" -gt "43" ]; then
let "new_speed = $current_temp + 10"
nvidia-settings -a [gpu:0]/GPUFanControlState=1 -a [fan:0]/GPUCurrentFanSpeed=$new_speed
fi
#If speed more than 72%, then set to 72% speed
if "$current_speed" -gt "72" ]; then
let "new_speed = 72"
nvidia-settings -a [gpu:0]/GPUFanControlState=1 -a [fan:0]/GPUCurrentFanSpeed=$new_speed
fi
#wait until interval expires before rechecking
sleep "$interval"
done
You may restart and test if fan settings are good for you. Setting the fan speed is as straightforward as changing the values, comments should make it easy. If you would like to kill the current script and test out some values, search for nvfc in ksysgaurd, click on it and press delete.
You may overclock at your own risk, I take no responsibility for anything going wrong. I just wanted to post this script to allow people to cool their nvidia gpu’s on Suse easily.