Non-standard intel hardware fan control & temp monitoring: looking for a better solution (Asustor Flashtor 6 and 12 (FS6706T and FS6712X))

Heavywun

Cadet
Joined
Jul 26, 2023
Messages
4
Link: Flashstor fan control on GitHub

I am looking for a more 'iX-acceptable' method of implementing fan control on my Asustor Flashstor 12 Pro (a pure NVMe drive NAS device).

BACKGROUND: Asustor have left some of their NAS devices open to installing alternative operating systems and RAID/Storage solutions. They have published a video guide covering installing TrueNAS-SCALE on the Flashstor devices.

THE PROBLEM: There is no native support for Asustor's temperature monitoring and fan control hardware under TrueNAS-SCALE, so the fan defaults to a low 1500-odd rpm and things get toasty.

MY CURRENT SOLUTION: Relies on compiling and installing a custom kmod to monitor NVMe and system temperatures and control fan speed. I then use two scripts to implement fan control. The first script runs as a post-init script to check if the kmod exists (in case of an update or upgrade), compiles and installs it if necessary, and then runs a second script in the background to adjust fan speed in response to temp changes.

MY CONCERN: is the kernel module component of this solution. What happens if/when iX disable make and make install ? Does anyone have any suggestions for an alternative method that I could explore that would avoid tinkering under the hood of TrueNAS-SCALE?

The code for my post-init dash script is below, so you have an idea of what I currently do to enable temp monitoring and fan control on the flashstor. There's a more detailed explanation in the readme of the GitHub repository above, as well as the longer temp monitoring script.

Any guidance and suggestions would be greatly appreciated.

Code:
#!/bin/sh

# Asustor Flashstor kernel module check/compile script for TrueNAS-SCALE
# Checks to see if the necessary it87 kmod exists, installs it if not, and runs the fan control script

# Add this as a post-init script so that it runs on every boot

# Check if the kmod exists and is installed
if ! modinfo asustor-it87 >/dev/null 2>&1; then
    echo "asustor-it87 kmod not found or not installed. Compiling and installing..."

    # Clone the repository
    git clone https://github.com/mafredri/asustor-platform-driver
    cd asustor-platform-driver

    # Checkout the it87 branch
    git checkout it87

    # Compile the kmod
    sudo make

    # Install the kmod
    sudo make install

    # Update module dependencies
    sudo depmod -a

    # Load the module
    sudo modprobe -a asustor_it87

    echo "asustor-it87 kmod compiled, installed, and loaded successfully."
else
    # Load the module
    sudo modprobe -a asustor_it87

    echo "asustor-it87 kmod is already installed."
fi

# Run the fan control script
nohup /home/admin/temp_monitor.sh >/dev/null 2>&1 &
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
Hey @Heavywun

The "official, iX-acceptable" way would be to open a feature request to request that the development team compile and include the kmod into TrueNAS. The "Report A Bug" link at the top of the forums will take you to our Jira system.
 

Heavywun

Cadet
Joined
Jul 26, 2023
Messages
4
Thanks @HoneyBadger. I've created a request as you suggested.

I guess I'm concerned that this issue is too small - a very limited number of Asustor users would be running TrueNAS-SCALE - for it to feature very highly on the iX radar. And the kmod is unofficial, and created by a bit of reverse engineering to work it all out. Asustor are a small team and it seems they leave these specialised usage cases to be worked out by a community of enthusiasts.

My own knowledge of linux is very limited, so I'm wondering whether the same result could be achieved without a kernel module...
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
Unless hardware compatibility can be introduced upstream in a generic fancontrol/PWM driver it looks like the custom code is going to be needed.

There is an option to "unlock" a TrueNAS SCALE system for development, described in a little more detail here:


But note that it's intended for development use, not so much "extended customization."
 
Top