Adjust Nvidia GPU fan speed (Multiple GPUs, one monitor)

I have three GPUs installed. GPU 0 (Titan X), GPU 1 (GTX 1050), GPU 2 (Titan X). I managed to have GPU 1 to handle X11 display, and GPU 0 and 2 for CUDA computing.

I want to be able to manually adjust the fan speed for both GPU 0 and GPU 2. If I place the following code in the xorg.conf, then there comes out an option in “NVIDIA X Server Settings” that allows me adjust fan speed for GPU 1.

Section "Screen"
    Identifier     "Screen0"
    Device         "Videocard1"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Coolbits" "4"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Notice that the line

Option     "Coolbits" "4"

activates the functionality of tuning fan speed through “NVIDIA X Server Settings”.

However, I’m not able to adjust the fan speed for GPU 0 and GPU 2. What should I do in order to adjust the fan speed for GPU 0 and GPU 2?

Try
nvidia-settings -a [gpu:0]/GPUFanControlState=1
nvidia-settings -a [fan:0]/GPUTargetFanSpeed=x

The commands

nvidia-settings -a [gpu:0]/GPUFanControlState=1
nvidia-settings -a [fan:0]/GPUTargetFanSpeed=50

gives me the following output (I’ve replaced the environment variable HOSTNAME with the word hostname):

  • Attribute 'GPUFanControlState' (hostname:0[gpu:0]) assigned value 1.
  • Attribute 'GPUTargetFanSpeed' (hostname:0[fan:0]) assigned value 50.

So I’m able to adjust the fan speed for GPU 0, no problem.

However, the commands:

nvidia-settings -a [gpu:1]/GPUFanControlState=1
nvidia-settings -a [fan:1]/GPUTargetFanSpeed=50

gives me the following output (I’ve replaced the environment variable HOSTNAME with the word hostname):

  • ERROR: Error assigning value 50 to attribute 'GPUTargetFanSpeed' (hostname:0[fan:1]) as specified in assignment '[fan:1]/GPUTargetFanSpeed=50' (Unknown Error).

Notice that the first command even do not have an output. So the Fan for GPU 1 is not even at a controllable state.

How can I make the fan speed a controllable parameter for GPU 1 and GPU 2?

Just an update, I think I’ve figured out a handy solution to my own question. Reference from this website: https://foldingforum.org/viewtopic.php?f=16&t=25075

The following two lines of code would make it possible to adjust fan speed of multiple GPUs.

nvidia-xconfig --enable-all-gpus
nvidia-xconfig --cool-bits=4

any way to do the same on Mac? (I’m using nvidia-web-drivers)

Hello, in a current installation (October 2018, Debian Sid, NVidia Driver 390.87), nvidia-xconfig is marked as obsolete and I have only nvidia-settings, which doesn’t allow those parameters. What can I do it?

nvidia-xconfig --enable-all-gpus
nvidia-xconfig --cool-bits=4

from forums.developer.nvidia.com worked with my dual titan rtx on Ubuntu 18. This allows me to manually set the fan speed using NVIDIA X Server Setting. Otherwise, the GPU runs real hot during training (86C). When I set fans to 100%, the temperature is at 66C during training.

Upgraded to ubuntu 20.04, everything very stable except after setting the coolbits=4. When I do, I get manual fan control, but after the screen times out and darkens, I log in, the mouse does not appear. reboot using the <CTRL><ALT>T to get a terminal(no mouse), sudo reboot, log in and all is fine until the screen darkens after a timeout.

Delete the /etc/X11/xorg.config, reboot, then all is good again, even after screen times out and darkens, but no GPU fan speed control.

Very repeatable.

Any other way to enable manual fan speed control on NVIDIA or is there a more current method?

The /etc/X11/xorg.config created by nvidia-xconfig

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 460.32.03


Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" RightOf "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "TITAN RTX"
    BusID          "PCI:33:0:0"
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "TITAN RTX"
    BusID          "PCI:74:0:0"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Coolbits" "4"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "Coolbits" "4"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection