Giter Club home page Giter Club logo

nfancurve's Introduction

nfancurve

A small and lightweight bash script for using a custom fan curve in Linux for those with an Nvidia GPU.

You are probably wondering why I have chosen to write this script in Bash. The reason is very simple; I wanted a script with the minimum number of dependencies possible. To get this script up-and-running you technically only need the temp.sh file. If you don't have a certain dependency (i.e. git or procps) you can just remove the code that uses them.

The current version of the script is version 16.

This script is currently set up for Celsius. However, it can easily be modified for other temperature scales.

If you need any help configuring my script or don't know how to make it start automatically check the USAGE.md file.

Features

  • by default it has an aggressive fan curve profile (lower temps, louder noise)
  • uses nvidia-settings commands
  • automatically enables/disables GPU fan control (but not CoolBits)
  • easy to read code, with plentiful comments (beginner friendly)
  • "intelligently" adjusts the time between tempurature readings
  • very lightweight; see stats section for more info
  • easy-to-use update script that uses git
  • supports multiple GPU control
  • now uses a config file that doesn't get overwritten after updates

Prerequisites

  • Bash version 4 and above, or a bash-like shell with the same syntax
  • NVIDIA GLX Driver version greater than 304
  • procps in version 14 and greater - you can comment out the function check_already_running if you don't have it
  • git is needed for use of update.sh (it'll check for it when it's run)

How to install

GitHub

  • Download the .zip file straight from the GitHubs
  • Extract it somewhere, and open a terminal to that directory
  • Make sure CoolBits is enabled (see USAGE.md)
  • Run ./temp.sh for a foreground process, or ./update.sh for a background* one

git

  • Choose a folder you want to download/install the script in
  • git clone https://github.com/nan0s7/nfancurve
  • See instructions for GitHub for the rest

Stats

  • v4 over 4.5h up-time: 0:03.88 CPU time
  • v7 around 5h: 0:03.22 CPU time
  • v10 around 5h: 0:02.42 CPU time

I ended up catching the command I use to get the current temperature in action and these are the stats: 0:00.06 CPU time. I will say this is quite inaccurate at this scale, and on other times I've caught the command I've seen the statistics vary by a small bit. My current CPU for measuring these stats is an i7 6700K @ 4.4GHz.

TODO:

  • make sure that "CoolBits" is enabled - not really the scope of this script
  • possibly check the currently installed driver version - earlier versions used the GPUCurrentFanSpeed command
  • add in a really detailed guide of how the script works
  • add nouveau support (once they fix Pascal)
  • make config better, and to include more options
  • add support for GPU's that have more than one controllable fan (i.e. >1 fan controller)

*or just execute this command: nohup ./temp.sh >/dev/null 2>&1 &

Honourable mentions

  • @aryonoco, for being my multi-GPU guinea pig
  • @civyshk, for making a Python fork
  • @zJelly, for working on an AMD-GPU supporting fork
  • @dpayne, for adding useful script parameters

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.