Raspberry Pi PoE Hat Fan Control

I noticed yesterday that the fans on the PoE Hat of my Raspberry Pi 4’s were behaving strangely. They were both kicking on based more on time than temperature, even though neither of them seemed that hot.

You can check the temperature via the command line like this:

/opt/vc/bin/vcgencmd measure_temp

And you’ll get something like:


That didn’t seem hot enough to me to warrant the fans going full blast, and it doesn’t help that these fans have a high-pitched whine to them, making them audibly louder than all of my rack mounted Ubiquiti gear.

I decided to take the fan configuration into my own hands, but I had to go hunting for the proper settings first.

Name: rpi-poe
Info: Raspberry Pi PoE HAT fan
Load: dtoverlay=rpi-poe,<param>[=<val>]
Params: poe_fan_temp0 Temperature (in millicelcius) at which the fan turns on (default 50000)

poe_fan_temp0_hyst Temperature delta (in millicelcius) at which the fan turns off (default 5000)

poe_fan_temp1 Temperature (in millicelcius) at which the fan speeds up (default 55000)

poe_fan_temp1_hyst Temperature delta (in millicelcius) at which the fan slows down (default 5000)

Open Nano to edit the boot config, like this:

sudo nano /boot/config.txt

Near the bottom add something like this:

# PoE Hat Fan Speeds

Then, reboot! Now, the fans won’t kick on until they hit 65’C, they’ll speed up at 67’C. For my setup, that silences them almost completely, while still keeping them reasonably cool and safe.