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.comIn 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.
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.
2080Ti Fan control @ Ubuntu
Modifying/controlling gpu fans
How to set fanspeed in Linux from terminal
FAN Control Ubuntu 18.04
Videos
What's the easiest way to get fan control under a buntu I am running the proprietary driver and everything I have tried the fans do not respond to manual adjustment
I need to change my nvidia GPU fan curve but MSI afterburner apparently does not work on Linux. What do I do? Is there any alt apps?
I wanted to lock fans at 80% but in a slightly different manner. I've changed nothing in /sys/class/drm/. Just
readlink -f /sys/class/drm/card1/device
, where card1 is my amd videocard.
Thus I know the path to the file I want to change.

And after that:
sudo sh -c "echo '1' > /sys/devices/pci0000:00/0000:00:03.0/0000:06:00.0/hwmon/hwmon1/pwm1_enable"
sudo sh -c "echo '200' > /sys/devices/pci0000:00/0000:00:03.0/0000:06:00.0/hwmon/hwmon1/pwm1"
Works! Ubuntu kernel 5.4
In case anyone is interested the solution I made and the corresponding systemd service is here: redfan https://github.com/nmtitov/redfan
So far my best guess is to write the following script and keep it always running in the background:
while sleep 1; do echo 0 > /sys/class/drm/card1/device/hwmon/hwmon1/pwm1_enable; done
Every second I "disable" pwm and make fans running at max speed. The driver (or something else) restores the value, but the next second I immediately disable it again.