Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Simple fan speed control for the Firebox X750e

    Scheduled Pinned Locked Moved Hardware
    87 Posts 12 Posters 34.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      frosty
      last edited by

      @stephenw10:

      Try running WGXepc -t to read the temperature.
      If you look at the thread I linked earlier you'll see that the SuperIO chip (which has the sensor) has a habit of erroneously reporting 125C after some time. If you haven't rebooted that box for while it could just be reporting wrong.

      Steve

      I checked that earlier and it was the same as the gui/widget and mbmon. Firewall has only been up 3 days but I'll give it a reboot and see what happens.

      1 Reply Last reply Reply Quote 0
      • F
        frosty
        last edited by

        Reboot did the trick, thanks for the help. Probably should have tried that first.

        1 Reply Last reply Reply Quote 0
        • S
          Steve Evans
          last edited by

          Just spotted the error. In my post I had the following instruction to start the fan control:

          # /usr/local/etc/rc.d/fanctrl.sh
          

          This is wrong. It should be:

          # /usr/local/etc/rc.d/fanctrl.sh start
          

          You can stop the daemon, and return the fans to full speed with the following:

          # /usr/local/etc/rc.d/fanctrl.sh stop
          

          Sorry about that.

          Steve

          1 Reply Last reply Reply Quote 0
          • F
            frosty
            last edited by

            I actually tried this

            # /usr/local/etc/rc.d/fanctrl.sh stop
            

            but didnt notice a change which makes sense because it sets the fans back to full speed where they already where.

            Thanks for putting this together, I like it better than manually setting the fan speed.

            1 Reply Last reply Reply Quote 0
            • stephenw10S
              stephenw10 Netgate Administrator
              last edited by

              Any idea what speed the fans average out at when the script is running?
              I guess it would be very dependent on ambient temperature and cpu load but it would be interesting to hear any anecdotal evidence.

              Steve

              1 Reply Last reply Reply Quote 0
              • S
                Steve Evans
                last edited by

                Mine's sat at the minimum as per the constants at the top of the /usr/local/sbin/fanctrld.sh script

                target=64
                min_temp=40
                gain=5
                delay=2
                min_fan=15
                

                thus:

                [2.1-RELEASE][root@pfsense]/root(8): /usr/local/bin/WGXepc -f
                Found Firebox X-E
                Fanspeed is f
                

                It does rise during activity.

                I'm nervous about setting min_fan any lower as I don't really want to stop the fans altogether.

                Steve

                1 Reply Last reply Reply Quote 0
                • S
                  Steve Evans
                  last edited by

                  I should explain that min_fan setting. There are three fans in the box, two of which primarily cool the CPU, but both those and the third fan also exhaust warm air drawing cooler air over all the other components. I therefore thought it best to keep some airflow even when the CPU was below the target temperature on 64 degC. It doesn't take much airflow to provide noticeable cooling.

                  Steve

                  1 Reply Last reply Reply Quote 0
                  • stephenw10S
                    stephenw10 Netgate Administrator
                    last edited by

                    Ah interesting, F is really quite slow.
                    Does your script use decimal conversion, F=15?

                    Steve

                    1 Reply Last reply Reply Quote 0
                    • S
                      Steve Evans
                      last edited by

                      The lines that write the value do the conversion thus:

                      # Adjust the fan speed
                      /usr/local/bin/WGXepc -f `printf "%x\n" $fan` > /dev/null
                      

                      The machine isn't under much load most of the time, but even when doing big downloads it still runs quite cool. Accessing the web interface, most notably the RRD Graphs causes a speed up of the fans.

                      Steve

                      1 Reply Last reply Reply Quote 0
                      • stephenw10S
                        stephenw10 Netgate Administrator
                        last edited by

                        Ah. I managed to mangle my hex and decimal values a few times when writing the WGXepc program (I'm no programmer!) with 'interesting' results.  ::)

                        I was also concerned about cooling the rest of the box, the PSU seemed to run particularly hot. I measured it using a pyrometer since I'm pretty sure parts of it could kill you. The cooling provisions on the box in general don't seem that great especially if it's in a rack, I'd like to see some vents in the front panel to allow cool air in. I have my boxes set to fan speed 32, none have stopped working yet. It really is a shame they didn't spend the extra pennies required to put in a SuperIO chip that had auto fan control.

                        Steve

                        1 Reply Last reply Reply Quote 0
                        • P
                          power_matz
                          last edited by

                          Hi Steve,

                          I installed your scripts and the modified toll from Steve with the temperatue option.
                          After reboot I noticed that the fans slow down but after some time the temperature reads 35 C and the fans are up at speed FF.

                          The fans are always running at this speed. I noticed no change here. What is wrong? I also tried the corrected call with the start option

                          Matthias

                          1 Reply Last reply Reply Quote 0
                          • P
                            power_matz
                            last edited by

                            OK, found the error by myself. The min temperature is set to 40. Mine its 35. So the if-statement is not correct. I set the min temp to 30, now it is running!

                            Maybe it is a good idea to refactor the if statement…

                            Matthias

                            1 Reply Last reply Reply Quote 0
                            • S
                              Steve Evans
                              last edited by

                              Hi Matthias,

                              I saw your first post emailed to my phone and thought that looked like the script had taken the safety bailout. This is there to protect from erroneous temperature readings I'd been warned of, and too high a fan speed in the safe response to that.

                              Interesting that your box is running so cool. I've never seen mine below 50 degC. By the time its booted to the point the script starts the CPU is normally up to that kind of temperature.

                              Steve

                              1 Reply Last reply Reply Quote 0
                              • P
                                power_matz
                                last edited by

                                Hi Steve,

                                my box is in a network cabinet. There is not much space at the back for the air to come out (approx. 5 cm to the rear of the cabinet.
                                I am wondering myself why it is so cool! Now with your script it runs with speed f at temp 40 C.
                                It is ok, I think.

                                Bye
                                Matthias

                                1 Reply Last reply Reply Quote 0
                                • stephenw10S
                                  stephenw10 Netgate Administrator
                                  last edited by

                                  What CPUs are you running? Is the cpu sensor touching the bottom 9f the CPU? I can't actually remember if it has a spring loaded sensor or not.  :-\

                                  Steve

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    Steve Evans
                                    last edited by

                                    Intel(R) Pentium(R) M processor 2.13GHz

                                    I don't have PowerD enabled though. That could well explain it. I should probably enable that as I'm sure the CPU will "wake up" to a higher power state quite quickly on demand.

                                    The temperature diode is part of the CPU die, not an external sensor.

                                    Steve

                                    1 Reply Last reply Reply Quote 0
                                    • stephenw10S
                                      stephenw10 Netgate Administrator
                                      last edited by

                                      Ah, in which case the diode values can vary between CPU models so the real temperature may be different.
                                      I seem to remember reading that they are actually an offset from the CPU maximum temperature so you have allow for that. No idea if mbmon is doing that. I don't think it is because I just read out the register in WGXepc. If you read the docs for the superio chip there is quite a bit about configuring it for the correct sensor type.

                                      Steve

                                      1 Reply Last reply Reply Quote 0
                                      • P
                                        power_matz
                                        last edited by

                                        Hi,

                                        I am using an Intel(R) Pentium(R) M processor 1.70GHz with PowerD enabled.

                                        Matthias

                                        1 Reply Last reply Reply Quote 0
                                        • S
                                          Steve Evans
                                          last edited by

                                          That explains it then. I'm being power mad again! :D

                                          An interesting comparison for anybody trying to build a lower power router then. I went for the more powerful option as I wanted to be future proofed should my broadband speed increase again, and also as I didn't know if I'd want to be using squid etc when I started.

                                          Steve

                                          1 Reply Last reply Reply Quote 0
                                          • B
                                            bmatic586
                                            last edited by

                                            @Steve:

                                            This has been working reliably for some time, so having just updated to 2.1 and re-applied this fix I though I might as well post a complete set of files.

                                            Rename the attachment to lose the .png suffix and decompress. You'll find the following files. Copy them to the directory shown. Ensure that the sh files and WGXepc are executable.

                                            | Filename | Target Directory |
                                            | fanctrl.sh | /usr/local/etc/rc.d |
                                            | fanctrld.sh | /usr/local/sbin |
                                            | functions.inc.php | /usr/local/www/includes |
                                            | system_information.widget.php | /usr/local/www/widgets/widgets |
                                            | WGXepc | /usr/local/bin |

                                            Start the fan control thus, or simply reboot:

                                            # /usr/local/etc/rc.d/fanctrl.sh
                                            

                                            You should hear the fans slow considerably. The daemon will try to maintain the set temperature of 64 degC. After some experimentation I found this to work well.

                                            Credit is due here to stephenw10 for the WGXepc utility. Note that he's produced a couple of versions, and you need this one as it reports temperature.

                                            The php scripts will read the CPU temperature and display it on the dashboard as the attached image.

                                            Steve

                                            For us n00bs… :) can you tell us how to copy these files to the pfSense file system? how do you change the permissions?

                                            I guess I'm kind of looking for a step by step on how to do this. I just recently got a 1250e and it works great, but I'd like to quiet it down a bit and change the red LED.

                                            Thanks.

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.