In the terminal run:

sudo nvidia-xconfig
sudo nvidia-xconfig --cool-bits=4

restart your computer and search for NVIDIA X Server Settings in the Dash. There should be an option to change fan speed under Thermal Settings.

Answer from waspinator on askubuntu.com
🌐
UbuntuHandbook
ubuntuhandbook.org › home › howtos › control gpu/cpu fan speed with coolercontrol in ubuntu 24.04
Control GPU/CPU Fan Speed with CoolerControl in Ubuntu 24.04 | UbuntuHandbook
This tutorial shows how to install and use CoolerControl to control your CPU or graphics card fan speed in Ubuntu desktop computer or laptop. I’ve written about how to control fan speed for Thinkpad laptops. But for those who are looking for how to do the job for NVIDIA/AMD GPUs and other ...
Top answer
1 of 10
26

In the terminal run:

sudo nvidia-xconfig
sudo nvidia-xconfig --cool-bits=4

restart your computer and search for NVIDIA X Server Settings in the Dash. There should be an option to change fan speed under Thermal Settings.

2 of 10
8

To control Nvidia GPU fan speed via Terminal on Linux Mint 20 with a 1070 Ti:

sudo nvidia-xconfig --cool-bits=4

to tell nvidia-xconfig to allow the fan to be controlled in the command line. You may need to reboot here.

nvidia-smi

Gives information about the GPU(s) and their numbers. Importantly I note that my 1070 Ti is GPU 0.

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

For a much more detailed overview of this feature including multiple GPU fans, check out this thorough documentation Nvidia Overclocking and Cooling

For a somewhat rambling and wayward thread which lead me to the above link, check out Set Fanspeed in Linux from Terminal

==================END OF ANSWER==================

And as an extra tidbit not asked for in this question, you can also adjust the power output of your Nvidia GPU with:

sudo nvidia-smi -i 0 -pl 90

Where the 0 is my GPU number, and the 90 is the maximum power in watts. If you set this too low, you will get an error. In my limited experience, setting it too high had no effect. I found I can get 95%+ performance for ~75% energy cost by setting the power level to 100 in the above command in my mining rig, but I imagine other power conscious users would appreciate this too.

Discussions

2080Ti Fan control @ Ubuntu
So my 2080Ti is literally going up from 40% gpu fan when the temperature is 84, to over 90% (which makes a terrible noise) at 85. I want to setup the fan control profile so that the gpu fan will go up a little bit sooner, but as far as I can tell, i need to enable coolbits (although in ... More on forums.developer.nvidia.com
🌐 forums.developer.nvidia.com
19
0
March 3, 2021
Modifying/controlling gpu fans
I’m running Ubuntu server 24.04.4 lts on a custom built pc ASRock B660M-ITX Intel® Core™ i9-12900 ASUS Dual NVIDIA GeForce RTX 3060 V2 OC Edition 12GB GDDR6 32GB Single DDR4 3200 1 TB WD nvme drive for os I built this computer to be used a plex media server. More on discourse.ubuntu.com
🌐 discourse.ubuntu.com
0
0
March 24, 2026
How to set fanspeed in Linux from terminal
Hi, New here, and I’m sure I have this post in the wrong thread, as I couldn’t find where it would fit. I’m just trying to find help on how to manually set my fan speed on my Nvidia GPU. the command: nvidia-settings -a “[gpu:0]/GPUFanControlState=1” -a “[fan:0]/GPUCurrentFanSpeed=n” ... More on forums.developer.nvidia.com
🌐 forums.developer.nvidia.com
19
3
April 8, 2019
FAN Control Ubuntu 18.04
Hello, I would like to change the FAN Speed Profile on Ubuntu 18.04. I have not found a working method. I have GTX 1080 TI Founder Edition and current driver is 390.77. When I run nvidia-settings -a '[gpu:0]/GPUFanControlState=1' -a '[fan:0]/GPUTargetFanSpeed=99' it just returns ERROR: Error ... More on forums.developer.nvidia.com
🌐 forums.developer.nvidia.com
7
1
August 27, 2018
🌐
NVIDIA Developer Forums
forums.developer.nvidia.com › graphics / linux › linux
How to control fan speed on ubuntu 23.04 server without screen? - Linux - NVIDIA Developer Forums
September 26, 2023 - hi, how to control fan speed on ubuntu 23.04 server without screen, and multiple gpus ? I got this error : ERROR: The control display is undefined; please run nvidia-settings --help for usage information. thank you …
🌐
NVIDIA Developer Forums
forums.developer.nvidia.com › graphics / linux › linux
2080Ti Fan control @ Ubuntu - Linux - NVIDIA Developer Forums
March 3, 2021 - So my 2080Ti is literally going up from 40% gpu fan when the temperature is 84, to over 90% (which makes a terrible noise) at 85. I want to setup the fan control profile so that the gpu fan will go up a little bit sooner, but as far as I can tell, i need to enable coolbits (although in nvidia-settings it literally says “You should never have to enable this.”) and even then, nvidia-settings doesn’t have a thermal profile but literally a slider with a constant gpu fan (which is not a function of ...
🌐
Ubuntu Community Hub
discourse.ubuntu.com › support and help
Modifying/controlling gpu fans - Support and Help - Ubuntu Community Hub
March 24, 2026 - I’m running Ubuntu server 24.04.4 lts on a custom built pc ASRock B660M-ITX Intel® Core™ i9-12900 ASUS Dual NVIDIA GeForce RTX 3060 V2 OC Edition 12GB GDDR6 32GB Single DDR4 3200 1 TB WD nvme drive for os I built t…
🌐
Bailiwick
bailiwick.io › 2019 › 09 › 21 › controlling-nvidia-gpu-fans-on-a-headless-ubuntu-system
Controlling NVIDIA GPU Fans on a headless Ubuntu system
December 18, 2025 - $ sudo DISPLAY=:0 XAUTHORITY=/run/user/124/gdm/Xauthority nvidia-settings -a [gpu:0]/GPUFanControlState=1 Attribute 'GPUFanControlState' (server:0[gpu:0]) assigned value 1. $ sudo DISPLAY=:0 XAUTHORITY=/run/user/124/gdm/Xauthority nvidia-settings -a [gpu:1]/GPUFanControlState=1 Attribute 'GPUFanControlState' (server:0[gpu:1]) assigned value 1. $ sudo DISPLAY=:0 XAUTHORITY=/run/user/124/gdm/Xauthority nvidia-settings -a [fan:0]/GPUTargetFanSpeed=25 Attribute 'GPUTargetFanSpeed' (server:0[fan:0]) assigned value 25.
🌐
GitHub
github.com › foucault › nvfancontrol
GitHub - foucault/nvfancontrol: NVidia dynamic fan control for Linux and Windows · GitHub
NVidia dynamic fan control for Linux and Windows. Contribute to foucault/nvfancontrol development by creating an account on GitHub.
Starred by 236 users
Forked by 19 users
Languages   Rust
Find elsewhere
🌐
GitHub
github.com › andyljones › coolgpus
GitHub - andyljones/coolgpus: GPU fan control for headless Linux · GitHub
You hit Ctrl+C twice and now your fans are stuck at a certain speed: run the script again and interrupt it once, then let it shut down gracefully. Double interrupts stop it from handing control back to the driver.
Starred by 349 users
Forked by 46 users
Languages   Python
🌐
NVIDIA Developer Forums
forums.developer.nvidia.com › accelerated computing › cuda › cuda programming and performance
How to set fanspeed in Linux from terminal - CUDA Programming and Performance - NVIDIA Developer Forums
April 8, 2019 - I’m just trying to find help on how to manually set my fan speed on my Nvidia GPU. the command: nvidia-settings -a “[gpu:0]/GPUFanControlState=1” -a “[fan:0]/GPUCurrentFanSpeed=n” ...
🌐
Techticity
techticity.com › howto › how-to-control-nvidia-graphics-card-fan-speed-in-linux
How to control Nvidia graphics card Fan Speed Automatically in Linux – Techticity
September 19, 2018 - There is a great tool to do that automatically by starting an X server for each gpu: https://github.com/andyljones/coolgpus · Apparently nvidia unlike amd doesn’t provide hwmon in sysfs in order to control the fans. There is a free tool ‘Green With Envy’ for nvidia cards. Using this software you can easy set up a custom fan curve. Yes, also painless over/down clocking and startup. Will be updating the article some time. the script do not execute at startup on ubuntu 20.04
🌐
NVIDIA Developer Forums
forums.developer.nvidia.com › graphics / linux › linux
FAN Control Ubuntu 18.04 - Linux - NVIDIA Developer Forums
August 27, 2018 - Hello, I would like to change the FAN Speed Profile on Ubuntu 18.04. I have not found a working method. I have GTX 1080 TI Founder Edition and current driver is 390.77. When I run nvidia-settings -a '[gpu:0]/GPUFanControlState=1' -a '[fan:0]/GPUTargetFanSpeed=99' it just returns ERROR: Error ...
Top answer
1 of 1
1

I have the exact same config - 3 GPUs on 18.04. Got it working by connecting a physical monitor to each of the 2 secondary GPUs in addition to the primary monitor and creating a new x screen for each of the two extra monitors from X Server Display Configuration. Different ports on the same monitor would probably work too.

Screenshots of my nvidia settings:

https://drive.google.com/open?id=1Rh2YnbK0VSPHH-JnSLLYUx7eCw7yQ2qG

Then I did Save to X Configuration File -> Show Preview and copied and pasted the contents to a text file and saved as /etc/X11/xorg.conf. Then I added Option "Coolbits" "28" line under Section "Device"for Device0, Device1 and Device2.

This is what it looks like now:

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 418.87.00

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

Section "Files"
EndSection

Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "type1"
    Load           "freetype"
    Load           "glx"
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"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "ViewSonic VT2430-M"
    HorizSync       15.0 - 82.0
    VertRefresh     55.0 - 75.0
    Option         "DPMS"
EndSection

Section "Monitor"
    # HorizSync source: unknown, VertRefresh source: unknown
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "BenQ GW2750H"
    HorizSync       0.0 - 0.0
    VertRefresh     0.0
    Option         "DPMS"
EndSection

Section "Monitor"
    # HorizSync source: unknown, VertRefresh source: unknown
    Identifier     "Monitor2"
    VendorName     "Unknown"
    ModelName      "DELL ST2420L"
    HorizSync       0.0 - 0.0
    VertRefresh     0.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1080 Ti"
    BusID          "PCI:67:0:0"
    Option "Coolbits" "28"
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "TITAN Xp COLLECTORS EDITION"
    BusID          "PCI:10:0:0"
    Option "Coolbits" "28"
EndSection

Section "Device"
    Identifier     "Device2"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1080 Ti"
    BusID          "PCI:66:0:0"
    Option "Coolbits" "28"

EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-0"
    Option         "metamodes" "nvidia-auto-select +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "metamodes" "1920x1080 +0+0 {AllowGSYNC=Off}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen2"
    Device         "Device2"
    Monitor        "Monitor2"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "metamodes" "1920x1080 +0+0 {AllowGSYNC=Off}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Restarted and Fan settings working on all GPUs:

https://drive.google.com/open?id=1XzSD-SOHLub57zlekiI9-zvypJklnQQW

Edit: got it working on another machine with 3 GPUs but with 16.04 without connecting extra physical monitors. First ran nvidia-xconfig --enable-all-gpus, then edited the xorg.conf file to add Option "Coolbits" "28" line under Section "Device"for Device0, Device1 and Device2 as before. This is what it looks like:

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


Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    Screen      1  "Screen1" RightOf "Screen0"
    Screen      2  "Screen2" RightOf "Screen1"
    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"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor2"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce RTX 2070"
    BusID          "PCI:3:0:0"
    Option "Coolbits" "28"  
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce RTX 2070"
    BusID          "PCI:4:0:0"
    Option "Coolbits" "28"    
EndSection

Section "Device"
    Identifier     "Device2"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1080 Ti"
    BusID          "PCI:5:0:0"
    Option "Coolbits" "28"   
EndSection

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

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

Section "Screen"
    Identifier     "Screen2"
    Device         "Device2"
    Monitor        "Monitor2"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Restarted and got fan settings working fine.

Not sure if it will work on 18.04 though. Don't want to mess up my config there so not trying it out on the 18.04 machine.

🌐
Medium
u2pia.medium.com › ubuntu-20-04-nvidia-gpu-control-through-ssh-terminal-bb136f447e11
Ubuntu 20.04 Nvidia GPU Control (FAN, Clock Rate) through ssh terminal | by U2 PIA | Medium
February 9, 2021 - $ sudo DISPLAY=:0 XAUTHORITY=/run/user/125/gdm/Xauthority nvidia-settings --assign [gpu:0]/GPUFanControlState=0 --assign [gpu:0]/GPUGraphicsClockOffsetAllPerformanceLevels=100 --assign [gpu:0]/GPUMemoryTransferRateOffsetAllPerformanceLevels=750 · This command changes core clock +100, memory clock +750 and fan control.
🌐
Linux Hint
linuxhint.com › display-change-fan-speed-ubuntu
How To Display and Change Fan Speed in Ubuntu – Linux Hint
Execute the following command in the terminal to install GKrellM in Ubuntu: ... First, right-click on your username and then click on Configuration to configure the tool. Now, click on the sensors. Here, you can configure the fan speed and control according to your system requirements:
🌐
Super User
superuser.com › questions › 1685945 › ubuntu-20-04-setting-fan-speeds-according-to-gpu-temp
graphics card - (Ubuntu 20.04) Setting Fan Speeds according to GPU Temp - Super User
I would therefore have to connect the fan PST header to pins 1,3,4 and 2 or 6. The layout of the cable prevents me from using pin 2, so I am forced to use pin 6, which seems to be faulty because nvidia-smi reports fan speeds of 0% although the fans are spinning. Although I would prefer this option as the GPU will do all the PWM handling, I cannot pinpoint the issue and fix the incorrect fan speeds.
🌐
Ideanist
ideanist.com › 2017 › 07 › 29 › control-nvidia-fan-speed-linux-ubuntu-16
Control NVIDIA GPU Fan Speed on Linux Ubuntu 16.04 – ideanist.com
In case of a desktop install I suppose you just need to set cool-bits in xorg.conf, and use commands export DISPLAY=:1 and sudo nvidia-settings -a [gpu:0]/GPUFanControlState=1 -a [fan-0]/GPUTargetFanSpeed=100. I guess you would comment out the sudo systemctl commands from the script.