Raspberry Pi often used in 24/7 projects. In this mode, the issue of cooling becomes critical. One of the most common options is PoE HAT with built-in fan. At first glance, it may seem that it is enough to connect the HAT and everything will work automatically. But in practice, nuances sometimes arise, as it happened to me.
I bought Waveshare PoE M.2 HAT+. I connected it according to the instructions, but I noticed that the fan worked constantly at maximum speed. Of course, this behavior is unexpected and I started looking for a reason to eliminate it.

Kernel parameters
The PoE HAT fan does not run “directly” from voltage. He is guided kernel parameters and a special driver that reacts to the temperature of the processor and changes the revolutions. These parameters are configured in the Raspberry Pi configuration file /boot/firmware/config.txt
The following block of settings must be added to this file:
# Fan settings
dtparam=cooling_fan=on
dtparam=fan_temp0=55000,fan_temp0_hyst=2000,fan_temp0_speed=80
dtparam=fan_temp1=60000,fan_temp1_hyst=2000,fan_temp1_speed=140
dtparam=fan_temp2=65000,fan_temp2_hyst=2000,fan_temp2_speed=200
dtparam=fan_temp3=70000,fan_temp3_hyst=2000,fan_temp3_speed=255
I will describe this block in more detail using the example of the first line:
- dtparam=cooling_fan=on – enables the hardware fan driver on the Raspberry Pi 5.
- from_temp0=55000 – threshold in milli-degrees °C (55,000 = 55 °C). When this temperature is reached, the fan will turn on.
- from_temp0_hyst=2000 – hysteresis (2 °C). This means that the fan will only turn off when the temperature drops below 53 °C.
- fan_temp0_speed=80 – speed of rotation at this threshold. Values range 0–255 (where 255 = maximum revolutions). 80 ≈ low speed, effectively “quiet cooling”.
After applying these changes, I rebooted Raspberry Pi, but no changes occurred, the fan continued to run at maximum speed. I was forced to look for other reasons to solve the problem – constant maximum fan speed.
Fault diagnosis
Since the entered parameters did not affect the behavior of the fan, I decided to look at all possible parameters that could theoretically be responsible for the temperature and fan speed. To do this, I ran three commands in sequence.
cat /sys/class/hwmon/*/fan1_input
13863
Shows the number of pulses per secondfan.fan1_input – standard sensor in Linux hardware monitoring (humon). Usually, the values here fluctuate depending on the PWM signal (that is, what speed is set via fan_tempX_speed or target_pwm).
/vcgencmd measure_temp
temp=27.9'C
Utility vcgencmd reads CPU temperature (via GPU firmware). Means the ARM core is currently at 27.9 °C. This is the “official” way to see the temperature of the Raspberry Pi, and it is this data that the cooling system uses.
cat /sys/class/hwmon/hwmon0/temp1_input
27050
The same CPU sensor, but accessible through an interface Linux humon. temp1_input gives the temperature in millidegrees Celsius. 27050 = 27,050 m°C = 27.05 °C. This is a more “raw” way of accessing temperature that type utilities use sensors or monitoring systems (Zabbix, Prometheus, lm-sensors).
Since every parameter gave me data, it means that the sensors are active and working. I started looking for a hardware problem. First I turned off and unplugged the Raspberry Pi, unplugged the PCI Express cable, and completely unplugged the PoE HAT board. I saw that one of the pins on the Raspberry Pi fan connector was bent, and this became a big problem, because the connector itself is very small, and even the needle size scale seems quite large. So that you understand the scale of the thumbnail, I took this photo with a macro lens.

As you can see in the photo, the contact was pressed to the bottom and slightly deformed. I was able to lift it with a needle only to a vertical position, but the contact itself remained bent. In order for it to enter the connector correctly, I had to use a needle to widen the hole for it. After connecting, the Raspberry Pi started, and the fan began to receive signals about the number of revolutions depending on the temperature.
By now executing the command to check the number of fan pulses cat /sys/class/hwmon/*/fan1_input i got the value 3447 which is three times less than the previous value. This way I overcame the problem and now my fan is controlled correctly depending on the CPU temperature.
The main conclusion is as follows: for stable and quiet operation of PoE HAT on Raspberry Pi it is necessary not only to correctly adjust the parameters in config.txt, but also make sure the integrity of the connector and pins. My example clearly shows that this should not be neglected, and if a problem has already occurred, it is not easy to solve it, because the connector elements are so small that it will be either impossible or very difficult to physically align them, and for this a needle or tweezers will be quite large tools.