Bitcoin Forum
June 26, 2024, 12:28:00 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Simple Nvidia dynamic fan bash script for Ubuntu Linux.  (Read 125 times)
gopher556 (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
December 17, 2017, 07:45:13 PM
 #1

So I had been looking for something similar to the Windows MSI Afterburner fan control for Ubuntu Linux and after trying multiple apps, such as the https://github.com/foucault/nvfancontrol or https://github.com/MisterPup/Nvidia-Dynamic-Fan-Control, I decided to write a much much simpler Bash script using nvidia-settings. It's not fancy or complex, but it uses minimal resources and do exactly what I want it to do.

So here it is, completely open source and free to use: https://github.com/hhalim/dynfan

I hope it's useful for the community.

Here is the readme:
dynfan
Simple Nvidia dynamic fan script for Linux. Tested in Ubuntu 16.04 only with Nvidia GTX 1060 / 1070 only.

Unlike windows with MSI Burner or similar, linux has no apps to dynamically change the speed of the Nvidia fans. Your option is to leave the gpu fan to auto speed, which is not aggressive enough for crypto mining, or fixed speed, which is very inefficient when the temperature changes.

With this bash script I attempted to set the fan speed at a minimum of 40% at 40 degrees, this is configurable. The delta setting allows the fan not to change constantly with every temperature change, but have a small band of minor differences before a change of speed. If delta set to 0, then the fan speed will change in lockstep with the temp changes.

Disclaimer
Use at your own risk. Not responsible for any damages or issues, changing temperature controls, fan speed, etc. might damage your computer hardwares.

Startup
To run it after every reboot, use crontab.
Code:
$ crontab -e

Insert this line in crontab:
Code:
@reboot nohup ~/dynfan.sh &

Configuration
-l Lower temperature range in Celsius. Default: 40
-u Upper temperature range in Celsius. Default: 80
-s Sleep delay in seconds, set interval of temperature check. Default: 10
-d Delta temperature before fan speed is changed. Default: 3
Fan speed is set to automatic when the temp range falls outside the lower/upper range.

One of my rig running:
https://i.imgur.com/F4nPs35.jpg
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!