Announcement

Collapse
No announcement yet.

Script for Fan Speed Control

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Script for Fan Speed Control

    Hi!

    I have written(/modified) a python script for controlling the fan speed of a Nvidia Card and I wanted to share it with you. Here is the code:
    https://github.com/MisterPup/Nvidia-Dynamic-Fan-Control

    It is based on the (great) work of Luke Frisken:
    https://code.google.com/p/nvidia-fanspeed/

    Basically the fan speed changes depending on the temperature of the card. To control the fan behavior, the script uses a 2D curve of [temperature, speed] points.

    I have changed a bit the original code and added a GUI.
    I have done tests with version 331.20 and 337.12 Beta of the driver

    Here is a screenshot of the GUI
    https://www.dropbox.com/s/47t0ouhgtf...peed-Curve.png

    It works with proprietary driver only.
    There isn't SLI support

    I Hope you like it!

  • #2
    Not Working script

    Originally posted by MisterPup View Post
    Hi!

    I have written(/modified) a python script for controlling the fan speed of a Nvidia Card and I wanted to share it with you. Here is the code:
    https://github.com/MisterPup/Nvidia-Dynamic-Fan-Control

    It is based on the (great) work of Luke Frisken:
    https://code.google.com/p/nvidia-fanspeed/

    Basically the fan speed changes depending on the temperature of the card. To control the fan behavior, the script uses a 2D curve of [temperature, speed] points.

    I have changed a bit the original code and added a GUI.
    I have done tests with version 331.20 and 337.12 Beta of the driver

    Here is a screenshot of the GUI
    https://www.dropbox.com/s/47t0ouhgtf...peed-Curve.png

    It works with proprietary driver only.
    There isn't SLI support

    I Hope you like it!
    Hello: I can not get the script to work on my Ubuntu 14.04-64bit GT640 + GTX770. Driver 337.12 and Coolbits 12. Thanks

    Comment


    • #3
      Hello: I can not get the script to work on my Ubuntu 14.04-64bit GT640 + GTX770. Driver 337.12 and Coolbits 12. Thanks

      Comment


      • #4
        Can you please explain me the problem you're having? Did you manage to start the script and it doesn't work, or it does not even start?

        By the way, "GT640 + GTX770" does it mean you have a SLI configuration? If so, the script supports only single GPU configuration

        Comment


        • #5
          Hello: Two non SLI cards.

          The script does not start, I run and does nothing.

          Not if you've downloaded well; I just copied a file created and saved as "Nvidia-Dynamic-Fan-Control.py". execute permission.

          Comment


          • #6
            Hello: Two non SLI cards.

            The script does not start, it does nothing.

            Not if you've downloaded and installed fine; I just copied and created a file "Nvidia-Dynamic-Fan-Control.py" with execute permission.

            Comment


            • #7
              Not Working script

              Hello: Two non SLI cards.

              The script does not start, it does nothing.

              Not if you've downloaded and installed fine; I just copied and created a file "Nvidia-Dynamic-Fan-Control.py" with execute permission.

              Comment


              • #8
                Hello: Two non SLI cards.

                The script does not start, it does nothing.

                Not if you've downloaded and installed fine; I just copied and created a file "Nvidia-Dynamic-Fan-Control.py" with execute permission.

                Comment


                • #9
                  In your case I am not sure which of the two cards the script will control; I have done tests only on my single GPU configuration.
                  I have updated the documentation on github:

                  HOW TO START
                  Open a terminal in the folder containing both nvidia-gui.py and nvidiafanspeed.py then execute:
                  python nvidia-gui.py

                  Comment


                  • #10
                    working well, how to save the curve ?

                    Hi, I've tried your script with Kubuntu 14.04, i5 processor, GTX 750 & Nvidia 340 driver (proprietary).

                    It's working well ! Good job


                    However, how can I:
                    1-) Save my curve (not as a png!! )
                    2-) Start Kubuntu with the configured script
                    Maybe it's automatic, I havn't tried.

                    I don't know if it's possible, but I would like to run the fan under 30% (it's a HTPC-Gaming PC). Is it possible to change it in your script, or in the /etc/X11/xorg.conf file ?
                    I think my fan start under 30% of the total power, but I've not tried.

                    Thank you !

                    Comment


                    • #11
                      Ok, I found how to save my configuration.
                      In nvidia-gui.py, line 119 & 120:
                      Code:
                      x_values = [0,  55, 59, 61, 63, 64, 65, 68, 80, 100, 110] #temp
                      y_values = [15,  16, 17, 32, 63, 83, 92, 94, 98, 99, 100] #speed
                      and at the line 66:
                      Code:
                      first = [0,10]
                      I start at 10%, but the bios of my card start at 28%. So my minimum speed is 28%.
                      To modify this, I've seen this thread, but I'm a little afraid to change the bios of my card (waranty etc..)

                      To start your software, I've wrote this script to have a log file:
                      Code:
                      #! /bin/bash
                      exec >/home/nsaha/.Nvidia_control_fan/start_fanspeed.log 2>&1
                      python /home/nsaha/.Nvidia_control_fan/nvidia-gui.py
                      But I still have the window at startup
                      Anyway, this is an excellent software, thank you !

                      Comment


                      • #12
                        Thank you!
                        Good job in modifying the script!
                        I thought that a limit of 30% could be acceptable, but I was thinking of a gaming configuration

                        Originally posted by nsaha View Post
                        But I still have the window at startup
                        If I have understood, you want the script to run without the GUI, right?

                        Comment


                        • #13
                          Originally posted by MisterPup View Post
                          If I have understood, you want the script to run without the GUI, right?
                          Yes, but I've found a solution: I've commented the line 222 like this
                          Code:
                          #chart.show()
                          And the script works without the GUI.
                          With this script and Psensor, I can verify that all is fine

                          Comment


                          • #14
                            Ok

                            Comment


                            • #15
                              I actually use a simple bash script to do the work, but yours are far more sophisticated, great job!

                              The thing is the method we use is the same, nvidia-settings is the (only possible?) responsible to tweak the fan.

                              However last days I tried to make some CUDA computations over tty, necessarily without a running X server. And what happens is that [gpu:0] and [fan:0] don't exist anymore, since there is no X servers/displays, thus nvidia-settings -a ... doesn't work.

                              What you think about? Any ideas to set fan speeds without X servers?

                              Comment

                              Working...
                              X