Script to adjust the fan speed of recent Nvidia GPUs on headless servers.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Smoolak a52c73fea4 Added more info and fixed typos 6 months ago
LICENSE Initial commit 6 months ago
README.md Added more info and fixed typos 6 months ago
nvidia-fan-speed.sh First public version 6 months ago

README.md

nvidia-fan-speed

This repository contains a script made to adjust the fan speed of recent Nvidia GPUs on headless servers. It was developed as part of our system administration activities at the Perception, Robotics and Intelligent Machines (PRIME) research group’s laboratory of Université de Moncton, NB, Canada. This script was developed after realizing that it was impossible to find a program with a similar functionality online. It was made available as free software as it might help other research groups that like ourselves develop, maintain and administer their own compute server.

Features

  • Launch a temporary instance of X to execute the nvidia-settings command and kill it when the fan speeds are adjusted
  • Execute all operations in a single nvidia-settings command for efficiency
  • Create a xorg.conf configuration file automatically if it doesn’t already exist
  • Set the fan speed of all fans present on user designated GPUs or by default all GPUs

Note: The last feature is the main reason why this script was created. Virtually all scripts available online omit to consider the possibility of multiple individually controllable fans as part of a single GPU.

Considerations

  • The script must be run as a privileged user (root account or using sudo)
  • The script was created for headless servers, it will kill any active X server on the screen :0 therefore, its use in unadvisable in the case of a workstation with a graphical interface

Dependencies

  • bash (arch: bash)
  • X (arch: xorg-server)
  • nvidia-xconfig (arch: nvidia-utils)
  • nvidia-smi (arch: nvidia-utils)
  • nvidia-settings (arch: nvidia-settings)