Taking control of the Pi PoE HAT's overly-aggressive fan

May 5, 2021

I am starting to rack up more Pis (quite literally) using the official Pi PoE HAT to save on cabling.

The one thing I hate most about those little HATs is the fact the fans spin up around 40°C, and then turn off a few seconds later, once the temperature is back down to 39 or so, all day long.

I'd be happy to let my Pis idle around 50-60°C, and only have the little whiny fans come on beyond those temperatures. Even under moderate load, the Pi rarely goes above 55°C in my basement, where there's adequate natural convection, so the fans would only really be necessary under heavy load.

As it turns out, there are some device tree overlays you can configure in the Pi's /boot/config.txt to control the speeds and temperatures when the fan runs on the PoE HAT, and I liked the defaults user Nooblet-69 suggested on GitHub:

# PoE Hat Fan Speeds
dtparam=poe_fan_temp0=50000
dtparam=poe_fan_temp1=60000
dtparam=poe_fan_temp2=70000
dtparam=poe_fan_temp3=80000

Toss those lines in the bottom of the boot config file, reboot the Pi, and it should start picking up the new temperature settings.

Ahh, blissful silence. Well, at least mostly. My rack-mount UPS's fan needs a good cleaning.

Edit: It looks like the PoE+ HAT is controlled the same way. For the gory technical details, see the rpi-poe-fan.c file.