I have Ubuntu 21.04 installed on a Raspberry Pi 4. I want to control the fan on the POE+ HAT (https://www.raspberrypi.org/products/poe-plus-hat/)

By default the fan does not spin at all. When I add dtoverlay=rpi-poe to /boot/firmware/config.txt the fan works in a seemingly default mode. But when I do sudo dtoverlay -l there are no overlays loaded so I don't know why it makes a difference.

Custom settings like these do not work as expected. When I add these the fan stops completely or falls back to default mode.


When I try to load the overlay rpi-poe I get the response * Failed to apply overlay '0_rpi-poe' (kernel) which maybe means it's not available in this kernel? GNU/Linux 5.11.0-1012-raspi aarch64


3 Answers 3


On Ubuntu 21.04 builds for the Pi 4 with the PoE+ hat there is one slight difference that you're missing which is causing this issue. The firmware driver and associated device tree overlay is named rpi-poe-plus, not rpi-poe (this is for the older PoE hat).

You can find this out by seeing the available device tree overlays with the following command and noting that there are two listed.

ls /boot/firmware/overlays | grep poe

Add the following to the /boot/firmware/config.txt file to get the fan working with the PoE+ hat.


You can adjust the poe_fan_temp values to what you like so as to ramp the fan at different temperature values of the CPU. The values are degrees C x 1000.

  • awesome, thank you! also explained well. you may have forgotten the "=" after dtoverlay in the code example.
    – Thijs
    Commented Oct 3, 2021 at 6:37
  • Good catch! @Thijs
    – oot
    Commented Oct 4, 2021 at 16:44

After being frustrated by the lack of documentation, I found this github project that seems to nail it:


rpi-poe was updated in March 2020 adding:

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 40000)
        poe_fan_temp0_hyst      Temperature delta (in millicelcius) at which
                                the fan turns off (default 2000)
        poe_fan_temp1           Temperature (in millicelcius) at which the fan
                                speeds up (default 45000)
        poe_fan_temp1_hyst      Temperature delta (in millicelcius) at which
                                the fan slows down (default 2000)
        poe_fan_temp2           Temperature (in millicelcius) at which the fan
                                speeds up (default 50000)
        poe_fan_temp2_hyst      Temperature delta (in millicelcius) at which
                                the fan slows down (default 2000)
        poe_fan_temp3           Temperature (in millicelcius) at which the fan
                                speeds up (default 55000)
        poe_fan_temp3_hyst      Temperature delta (in millicelcius) at which
                                the fan slows down (default 5000)

Config suggested:

# PoE Hat Fan Speeds

Check if in dmesg you have an error like, then you're hitting a problem with a firmware update:

[...] rpi-poe-fan rpi-poe-fan@0: Failed to get default PWM value: -5
[...] rpi-poe-fan: probe of rpi-poe-fan@0 failed with error -5

Explanations on how to use a previous firmware in here: https://github.com/raspberrypi/firmware/issues/1531

After you change config.txt and reboot, check that values are Ok with:

od -An --endian=big -td4 /proc/device-tree/thermal-zones/cpu-thermal/trips/trip?/temperature /proc/device-tree/thermal-zones/cpu-thermal/trips/trip?/hysteresis

You should get:

65000 70000 80000 90000
1000 2500 5000 5000


  • 1
    There are 57 comments in the link to issue 1531 so I'm not sure what you refer to but I don't have the dmesg message with rpi-poe so I think it's not a firmware issue then if I understand correctly
    – Thijs
    Commented Jul 23, 2021 at 14:43
  • Did the config suggested work? Commented Jul 23, 2021 at 21:33
  • no the cooler does not do anything anymore, less than using the defaults
    – Thijs
    Commented Jul 24, 2021 at 7:41

ubuntu 21.04. You don't need to do anything. I just added a POE-plus to an RASPI4/8g and the fan adheres to the default settings as shown by Carlos (thanks Carlos) above.
The current version 21.04 has all you need. Verify with:

Enter the following command:

od -An --endian=big -td4 /proc/device-tree/thermal-zones/cpu-thermal/trips/trip?/temperature /proc/device-tree/thermal-zones/cpu-thermal/trips/trip?/hysteresis

you should get:

   40000       45000       50000       55000
    2000        2000        2000        5000

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .