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

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.

Comments

I'll be checking into this asap. I've been experimenting with the dtparam stuff, but still not satisfied.

The only Pi that I run an ethernet hat on is my TOR router for my super secret communications about creating a death ray designed to target vehicles that don't correctly use their turn signals… ;-)

This. All this.
For the Pi laptop I'm building right now, I am going to make a custom fan governor that turns on at, say, 48 degrees, then turns off again at 40. This way, if the fans are going off, that will mean that I have some time before they turn on again, but they might also just stay off. Coupled with an update resolution of 20-30 seconds or so, this will keep me from having constant on/off cycles.

Hi, thanks for your post. You say that you like the defaults suggested on GitHub, however the values don't match up.

Any idea how to get the PoE+ HAT to work in non-raspbian distro's? I've been bashing my head against the wall trying to run k3os.io and after finally getting it running on the raspi4 I noticed that no fans ever run. So far I've added the following to config.txt:
dtoverlay=pwm
dtoverlay=gpio-fan
dtoverlay=rpi-poe
dtparam=poe_fan_temp0=80000,poe_fan_temp0_hyst=2000
dtparam=poe_fan_temp1=78000,poe_fan_temp1_hyst=5000
dtparam=poe_fan_temp2=73000,poe_fan_temp2_hyst=3000
dtparam=poe_fan_temp3=70000,poe_fan_temp3_hyst=5000

If you are using a linux distribution other than Raspian OS, there is a POE Fan kernel module now available starting with linux kernel 5.13. Configuration is still a bit awkward as a standard companion overlay for the firmware device tree is not yet available. My notes on how I got the fan working on fedora 34 for my K82 raspberry pi cluster are at https://raspberrypi.stackexchange.com/questions/118863/how-can-i-enable…. The kernel module is only for Raspberry Pi 4 (and possibly related models).

Just setting up my cluster with PoE+ hat and what a relief to have silence again! Thanks Jeff.

Heh, just yesterday I noticed a weird buzzing sound in my basement... realized after I re-flashed on of my racked Pis, I forgot to add in the fan settings, so it was almost constantly spinning up and down. I set the low threshold to 50°C and now it barely ever kicks in the fan :)

For what it's worth (/ for anyone else coming by in the future), if this doesn't influence the speed of your fans (PoE or PoE+) then check dmesg for an error message mentioning PWM value. I had to replace two PoE+ hats because the fan would just run at full speed without any way to control.

Reference: https://github.com/raspberrypi/firmware/issues/1531

(PS - I ended up buying a USB -> 2x120mm fan set on Amazon, works great for keeping a bramble of four Pis cool when idle / low usage. Also _much_ quieter!)