Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 11425  / 2 Years ago, mon, september 26, 2022, 11:23:07

So I was trying to figure out how to make a custom fan curve for my Gigabyte GTX 960 ITX card. It is about half-length (for my small case) but that means it has a very small heat sink, and the Nvidia driver wasn't properly compensating for that.



I did a bunch of googling, and most of the answers didn't really work for some reason.



How can I make a custom fan curve?


More From » nvidia

 Answers
7

I found the bulk of my answer on Ubuntu Forums but the command to set the fan speed given was wrong. I also wrote the shell script myself (and I'm a noob), so feel free to comment how I did everything wrong, as long as you tell me how to fix it :) I added excessive comments so people who don't understand bash can get an idea of what I'm doing. This only works for 1 GPU, and will need modifications for multiple. By the way, the fan curve I have set is speed%=0.028*(degreesC^2).



Set-up




  1. Run your file browser of choice as root (in my case sudo konqueror).

  2. Go to /etc/X11 and allow write access to all groups (but keep the window open).

  3. Open up the Nvidia X server settings window (nvidia-settings in the terminal).

  4. Go to the nvidia-settings configuration.

  5. Click Save Current Configuration and then click save on the pop-up window.

  6. Close Nvidia Settings and run sudo nvidia-xconfig, then again with --cool-bits=4.

  7. Reboot.



Script



#!/bin/bash
# Put "sleep 30" here if you run it at start-up
# to make sure this starts after the Nvidia driver does.

fan="0"
gpu="0"
echo "GPU fan controller service started."
nvidia-settings -a "[gpu:$gpu]/GPUFanControlState=1" > /dev/null
check="$(nvidia-settings -a "[fan:$fan]/GPUTargetFanSpeed=30" | tr -d '[[:space:]]')"
working="Attribute'GPUTargetFanSpeed'($(hostname):0fan:$fan)assignedvalue30."

if [[ "$check" != "$working" ]]; then
echo "error on fan speed assignment: $check"
echo "Should be: $working"
exit 1
fi
while true
do
degreesC="$(nvidia-smi -i $gpu | grep -owEe '[0-9]+C')"
fanSpeed=$(($degreesC ** 2))
fanSpeed=$(($fanSpeed / 50))
if [[ $fanSpeed -gt 100 ]]
then
fanSpeed=100
fi
nvidia-settings -a "[fan:$fan]/GPUTargetFanSpeed=$fanSpeed" > /dev/null
sleep 8
done


I probably won't be updating this in the future, as I'll be upgrading to an RX 480.


[#15511] Wednesday, September 28, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
enincroscope

Total Points: 252
Total Questions: 124
Total Answers: 104

Location: Tajikistan
Member since Thu, Apr 14, 2022
2 Years ago
;