Basic fan control for the Asustor Lockerstor Gen2 in TrueNAS
With the warmer months coming up, I started to worry about the low fixed speed of the built-in fan of my Asustor Lockerstor Gen2 NAS running TrueNAS. When using the default Asustor software, there’s a userspace daemon that presumably monitors temperatures of the CPU and drives and adjusts the fan speed accordingly. However, there is no such fan control mechanism by default in TrueNAS.
On start-up, the PWM signal to control the fan speed is fixed at 20%, which seems adequate at idle. However, when the drives are under load, the reported temperatures seems to average around the 40C to 45C mark. Toshiba seems to recommend keeping drives below 40C, so it seems prudent to bump the fan speed a little, even though the drives themselves are probably rated up to 60C.
Unfortunately, as I mentioned in my previous post about controlling the status LEDs and LCD display in TrueNAS, the IT8625E Super I/O chip (which control the fans) is not currently supported in the mainline Linux driver.
There are out-of-tree drivers that do support the chip, such as the asustor-platform-driver, which seem to work well for people. However, like in my previous post, I wasn’t comfortable running 3rd-party drivers on my NAS for a variety of reasons.
Having looked at the datasheet for the built-in fan, it looks like it’s capable of pulling a decent amount of air. Even at the current fixed 20% fan speed, it doesn’t seem to be performing terribly. I figured just a minor bump might still keep the machine quiet without dynamic fan control, but still shave off a few degrees on the drives.
Luckily, there’s only just one register that needs to be changed, and it can also be done easily with a single isaset
call. As usual, use the following at your own risk:
isaset -y 0xa35 0xa36 0x63 <PWM duty cycle (0x00 to 0xff)>
By running the above as a pre-init command, it can be used to set the fan percentage on startup.
For convenience, I’ve precalculated PWM duty cycle values for common fan percentages:
10% | 0x19 |
20% (default) | 0x33 |
30% | 0x4c |
40% | 0x66 |
50% | 0x7f |
60% | 0x99 |
70% | 0xb2 |
80% | 0xcc |
90% | 0xe5 |
100% | 0xff |
For me, I’ve found that 30% was a good balance between lower temperatures while still remaining relatively silent.
Closing thoughts
As I mentioned in my previous post, ideally the Super I/O chip would be supported in the upstream Linux drivers so we wouldn’t need to directly write to hardware registers from user-space. Until then, I’ll be using the above.