OPNsense Forum

English Forums => Hardware and Performance => Topic started by: sdel_nevo on July 02, 2020, 10:38:16 am

Title: Fan speed control
Post by: sdel_nevo on July 02, 2020, 10:38:16 am
Hi Guys

i have installed OPNsense onto an old WatchGuard XTM 5 and currently its running really well, i updated the CPU and ram, and installed onto a 500GB hard drive

the only thing I'm struggling with is the fan noise

does anyone know a way to control the fans in OPNsense

googling suggests adding resistors to the fans, but I'm wondering if there is a software solution, there is a video on YouTube that references pfsense https://www.youtube.com/watch?v=JU1YuUkOAIw that appears to work

this however does not work on OPNsense

if anyone can suggest a method, i would be most grateful

Please go gentle with me, I'm a complete noob

Steve

Title: Re: Fan speed control
Post by: Taomyn on July 29, 2020, 10:01:07 am
I'd be interested on way to do this as well - just installed OPNsense onto a new box and would like to monitor the CPU fan
Title: Re: Fan speed control
Post by: mtchetch on June 18, 2022, 04:57:14 pm
There is a fan control utility for Watchguard firewalls called  WGXepc

There is a writeup on it here: https://www.hexhound.com/quiet-the-fan-on-your-pfsense-watchguard-firewall/ and it seems to be directly compatible with pfsense.

Tried to get it running on OPNsense and the precompiled binary does not run on openbsd.

Here is the procedure to get the utility compiled on FreeBSD

This has been tested with OPNsense 22.1.8_1-amd64 running FreeBSD 13.0-STABLE
with Watchguard Firebox M370 hardware


SSH into your OPNsense box with your favorite client

Download the source  https://raw.githubusercontent.com/stephenw10/WGXepc/mastcode for the utility from github: https://github.com/stephenw10/WGXepc

Code: [Select]
fetch  https://raw.githubusercontent.com/stephenw10/WGXepc/master/WGXepc.c
Compile the code

Code: [Select]
cc WGXepc.c -o WGXepc
Change permissions to be able to run the binary

Code: [Select]
chmod 700 WGXepc
You can now run the binary and control fans etc.

Code: [Select]
./WGXepc
Found Firebox M370/470/570/670.
WGXepc Version 1.6_1 22/11/2020 stephenw10
WGXepc can accept two arguments:
 -f (CPU fan) will return the current and minimum fan speed or if followed
    by a number in hex, 00-FF, will set it.
 -f2 (System fan) will return the current and minimum fan speed or if followed
    by a number in hex, 00-FF, will set it.
 -l (led) will set the arm/disarm led state to the second argument:
    red, green, red_flash, green_flash, red_flash_fast, green_flash_fast, off
 -b (backlight) will set the lcd backlight to the second argument:
    on or off. Do not use with LCD driver.
 -t (temperature) shows the current CPU temperature reported by the
    SuperIO chip. X-e box only.
Not all functions are supported by all models

You can control fan speed from 0 to 99 by running

Code: [Select]
./WGXepc -f 10
Could some one help to get the control scripts and boot time running working, because I am not yet that familiar with the inner workings of OPNsense.






Title: Re: Fan speed control
Post by: rygel_fievel on January 09, 2023, 08:18:48 am

Could some one help to get the control scripts and boot time running working, because I am not yet that familiar with the inner workings of OPNsense.

I'm late to this thread but are you referring to this?

https://docs.opnsense.org/development/backend/autorun.html