Manual Fan Control for nVidia Tesla V100
From nVidia's website:
NVIDIA® Tesla® V100 Tensor Core is the most advanced data center GPU ever built to accelerate AI, high performance computing (HPC), data science and graphics. It’s powered by NVIDIA Volta architecture, comes in 16 and 32GB configurations, and offers the performance of up to 100 CPUs in a single GPU. Data scientists, researchers, and engineers can now spend less time optimizing memory usage and more time designing the next AI breakthrough.
![]() |
Running one of these in a desktop for AI should be cool right? Quite the opposite - without a cooling solution, it will be hot because they only ship with a heatsink and expect to be mounted in a data center's rack with centrally forced air. Fortunately, the solution is well known by the Internet by simply attaching a fan shroud allowing blowers or high pressure 120mm fans to cool the card down. I'm not going to describe getting those ... just Google it or search eBay/Amazon.
What isn't so well documented is controlling the fan. The V100 cards do not have fan headers so while powering it from the motherboard is fine, nothing is going to dynamically drive the fan's speed. One option is simply NOT doing anything and simply letting it run at max speed but that's annoyingly loud. A nerdier option is using a script to sample the card's temperature and adapting the fan's speed.
Drivers
Installing the nVidia Tesla V100 drivers will vary by distribution. There are numerous guides online - like this one - for handling that task. Once the V100's driver is installed, it is possible to poll for it's temperature. Their software includes the nvidia-smi utility which displays a variety of information about the installed cards. The layout is pretty standard so a little commandline-fu can extract the value easily.
user@computer: nvidia-smi
Sun Nov 22 17:08:22 2026
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 580.178.04 Driver Version: 580.178.04 CUDA Version: 13.0 |
+-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 Tesla PG500-216 Off | 00000000:01:00.0 Off | 0 |
| N/A 47C P0 41W / 250W | 292MiB / 32768MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| 0 N/A N/A 625611 C /opt/PixInsight/bin/PixInsight 288MiB |
+-----------------------------------------------------------------------------------------+
You need the lm-sensor package installed for determining the status of the fans. The detection utility will help identify the appropriate drivers to install.
user@computer: sudo apt install lm-sensors
user@computer: sudo sensors-detect --auto
With the drivers in place, run the sensors utility and it will display the fan status. The output will vary based on the underlying motherboard and the number of fans it controls along with other sensors. But the important part is finding the fan# and pwm# lines. The # should correspond to the fan number screen printed beside the motherboard's header.
user@computer: sudo sensors
it8628-isa-0a40
Adapter: ISA adapter
...
fan1: 0 RPM (min = 0 RPM)
fan2: 1146 RPM (min = 0 RPM)
fan3: 0 RPM (min = 0 RPM)
fan4: 0 RPM (min = 0 RPM)
fan5: 1259 RPM (min = 0 RPM)
...
pwm1: 35% (freq = 23437 Hz)
pwm2: 0% (freq = 23437 Hz)
pwm3: 35% (freq = 23437 Hz)
pwm4: 35% (freq = 23437 Hz)
pwm5: 51% (freq = 23437 Hz) MANUAL CONTROL
...
The sensors output allows you to monitor the fans but how do you control them? This next part varies a little bit based on the drivers for your motherboard. The gist of the control comes from echoing values from 1) telling the motherboard you are going to manually control the fan and then 2) sending a value to the fan. There are two files that matter:
/sys/class/hwmon/hwmon#/pwm#_enable
/sys/class/hwmon/hwmon#/pwm#
The pwm#_enable line takes two values, either 1 or 2. A 1 tells the motherboard you are controlling the fan. A 2 tells the motherboard it is controlling the fan. Obviously for the latter nothing will end up happening since the motherboard is unaware of the V100's temperature. But for safety's sake, it is worth setting the motherboard's BIOS to maximum speed on that fan as a fail-safe. Then, if the script ever fails, the motherboard takes over the maxes the fan to prevent the card from overheating.
The /pwm# value handles the fan speed. A value of 0 is essentially 0% speed. A value of 255 is essentially 100% speed. So values in between correspond to varying degrees of fan speed.
The hwmon# value can vary based on the order drivers loaded at boot time (I have seen it be different between boots). Fortunately, its not too hard to script a way of detecting which one is correct.
With that knowledge, fan speed can be controlled by echoing values to enable manual control and then a speed into the corresponding files..
echo 1 > /sys/class/hwmon/hwmon3/pwm5_enable"
echo 204 > /sys/class/hwmon/hwmon3/pwm5"
Control Script
All of this can be done with a simple script.
#!/bin/bash
# Ensure only ONE copy of scripts is running
LOCKFILE="/tmp/v100-cooling.lock"
exec 200>"$LOCKFILE"
if ! flock --nonblock 200; then
echo "[*] v100-cooling.sh running : no action"
exit 1
else
echo "[!] v100-cooling.sh error : starting script with (PID $$)"
fi
# Detect control files
HWMON="/sys/class/hwmon/"`ls -al /sys/class/hwmon | egrep it87 | awk '{print $9}'`
PWM_ENABLE="$HWMON/pwm5_enable"
PWM_VAL="$HWMON/pwm5"
# Enable manual PWM control (1 = manual, 2 = auto/BIOS)
echo 1 > "$PWM_ENABLE"
# Restore BIOS automatic control on exit
cleanup() {
echo 2 > "$PWM_ENABLE"
exit 0
}
trap cleanup SIGINT SIGTERM
# Sample GPU temp and calculate a fan speed
while true; do
TEMP=$(nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader,nounits | sort -nr | head -n1)
if [ -z "$TEMP" ]; then
SPEED=255 # 100% fallback if nvidia-smi fails
elif [ "$TEMP" -ge 75 ]; then
SPEED=255 # 100%
elif [ "$TEMP" -ge 65 ]; then
SPEED=204 # 80%
elif [ "$TEMP" -ge 55 ]; then
SPEED=153 # 60%
elif [ "$TEMP" -ge 45 ]; then
SPEED=102 # 40%
else
SPEED=90 # ~31% minimum (keeps constant airflow over V100 HBM2)
fi
PERCENT=$(( "$SPEED" * 100 / 255 ))
# Set the fan speed
echo "[INFO] GPU temp @ $TEMP -- fans @ $PERCENT% -- setting $SPEED -> $PWM_VAL"
echo "$SPEED" > "$PWM_VAL"
sleep 15
done
How does all this work? Let's look at the individual sections.
# Ensure only ONE copy of scripts is running :: The exec 200 creates and truncates an arbitrary file and assigns it to file descriptor 200 for the current shell. The subsequent flock --nonblock 200 command attempts to get an exclusive lock on the file descriptor. The first instance of the script will succeed and continue. If the script is run again (like as a recurring cron job, it will fail to lock the file descriptor and terminate.
# Detect control files :: This section sets some environment variables to make repetitive strings easier to deal with. The first detects which hwmon# the system is using. On my system, I know the it87 driver was necessary to load the correct sensors (yours will probably be different). So whichever hwmon path contained the driver would be the one I needed. Issuing a sub-command, grep'ing for the driver, and using awk to isolate the path allows the script to be dynamic. In the below example, it happened to be on hwmon2 during the most recent boot.
lrwxrwxrwx 1 root root 0 Nov 21 08:20 hwmon0 -> ../../devices/virtual/thermal/thermal_zone0/hwmon0
lrwxrwxrwx 1 root root 0 Nov 21 11:30 hwmon1 -> ../../devices/platform/coretemp.0/hwmon/hwmon1
lrwxrwxrwx 1 root root 0 Nov 21 08:20 hwmon2 -> ../../devices/platform/it87.2624/hwmon/hwmon2
lrwxrwxrwx 1 root root 0 Nov 21 08:20 hwmon3 -> ../../devices/virtual/thermal/thermal_zone3/hwmon3
Then combine that path with the appropriate strings pwm#_enable and pwm# will set variables for controlling the fan and setting its speed.
# Enable manual PWM control (1 = manual, 2 = auto/BIOS) :: This one is pretty easy. Simply echoing a "1" into the file tells the motherboard the fan is now under manual control.
# Restore BIOS automatic control on exit :: But what happens if the script dies, the fan was on a low speed, and suddenly the GPU starts getting used? It will obviously heat up and nothing will compensate for it. Bash allows for its scripts to set traps for various operating systems signals like SIGINT or SIGTERM. This means a function will be called before the script terminates which allows writing a "2" back to the enable file telling the motherboard it is in control.
NOTE: This is where its a good idea to boot into the BIOS configuration and set the fan permanently on maximum speed. Then, whenever the motherboard has control the fan will default to maximum cooling. But whenever the script runs, it will slow it down to a quieter speed until the card heats up.
# Sample GPU temp and calculate a fan speed :: This section uses the nvidia-smi utility to get data about the GPU. The command line arguments requesting just temperature in a csv format makes parsing out the field easy. With that temperature assigned to an environment variable, a long if ... then ... else Bash statement allows setting an environment variable with a desired fan speed. A little math can calculate what 0-255 number corresponds to a desired speed %.
In my own case, I found that at full speed with no GPU activity, the fan can keep the V100's temperature at 35°C. With ComfyUI running MiniMaxH3 AI video generation models on the V100, the temperature held steady at about 70°C using 80% fan speed. Idling, the temperature held steady at 43-45°C with the fans lightly spinning.
# Set the fan speed :: Lastly, the script actually writes the calculated speed value to the appropriate hwmon file. Then it will sleep for 15 seconds before looping again to poll the temperature, calculate the speed and adjust the fan.
Schedule It
Use a simple cron job to schedule the fan control. It will need to run with root privileges in order to write into the control files. Ensure the script file has it's permissions appropriately restricted or else it's an easy vector for hackers to take escalate their privileges on your computer. The following cron entry will run the script every two minutes to keep the fan speed adapting to the V100's temperature.
*/2 * * * * /home/user/v100-cooling.sh
NOTE: The recurrent sampling of temperature and fan speed adjustments take place in the script's while loop and are governed by the sleep command. The cron job simply ensures the script is re-run in case it dies for some reason. This is why the flock command is used to ensure only one instance of the script actually runs.
Conclusion
The nVidia Tesla V100 was designed to run in a rack server chassis but it can easily be adapted to run in a desktop. The card simply needs an adapter shroud to mount a high pressure fan and then some commandline-fu for dynamically changing the fan speed to compensate for heat. Although it's an older card, running server cards is a more economical way to get a high VRAM GPU for local processing whether its AI projects or other computational tasks.



