Before we start, here's exactly what I'm working with for this article:
I recently wanted to add some more cooling to my NAS. I had some Lian Li controllable fans laying around and I picked up a Corsair H115i AIO cooler at Micro Center. The H115i comes with a Commander Core which can control the AIO's fans and the Lian Li fans (fan control only - no RGB; it's a NAS so I don't care about the RGB aspect).
The Commander Core interfaces via USB 2.0 header. Upon first boot, everything looked fine. I, however, wanted to be able to control these fans - even if manually. TrueNAS SCALE 22.02.1 doesn't have any fan control yet so I decided to do some research and stumbled upon liquidctl.
liquidctl is a beautiful open source codebase used for Windows, Linux, and macOS distros to manage fan controllers and AIOs. Unfortunately, the Commander Core wasn't supported out-of-the-box on the latest release (as of June 7, 2022). However, to my happiness, it was supported (albeit experimental) on the latest dev release (1.11.0.dev2+g9b058ba). Here's how to use it on TrueNAS!
Installation is easy. We already have Python installed so it's a breeze:
python -m pip install git+https://github.com/liquidctl/liquidctl#egg=liquidctl
That's it!
liquidctl initialize all
liquidctl status
liquidctl set fans speed 100
More documentation on this can be found onliquidctl's GitHub page.
If you want, you can initialize liquidctl at boot. You can also set your fans to whatever speed or color you want at this time. We do this by creating a new oneshot systemd service.
/etc/systemd/system/liquidcfg.service
[Unit]
Description=AIO startup service
[Service]
Type=oneshot
ExecStart=liquidctl initialize all
[Install]
WantedBy=default.target
systemctl daemon-reload
systemctl enable liquidcfg
systemctl start liquidcfg