Configuring POE+ HAT Fan for Raspberry PI 4 on Ubuntu
For those who want to run Ubuntu64 bit distros and not the “beta” 64 bit distro of raspbian on their PI4 with POE+ Hat
Unfortunately, the new POE+ hat fan does not work OOB in Ubuntu 21.04 (and probably in prior versions).
Fortunately it is trivial to enable
Verify you have no entry in $ cat /sys/class/thermal/cooling_device0/type
If you get back
rpi-poe-fan
you can skip to editing the firmware config file
Make sure all packages are up to date
$ apt update && apt upgrade
reboot the pi
Install raspi-config package and raspi lib
$ apt install libraspberrypi-bin raspi-config
Run the raspi-config binary
$ raspi-config
select Interface Options
enable the I2c module
reboot the pi
Add the following to the firmware config file /boot/firmware/config.txt
It should be pre-popuated by many other config lines (by raspi-config)
# 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
You can now reboot your system, the fan should kick in at 70 degrees celsius