This should be a simple task - to properly setup fan control on Raspberry Pi 4 Model B Rev 1.1 running Raspberry Pi OS 64-bit based on Debian Bookworm, released 2024-11-19.
Powered via PoE hat. Looking around, I have soon found out there are like million guides and all of them differ in slight details. To make sure I do not forget this, here's a guide of what worked for me:
sudo vi /boot/firmware/config.txt
Note that the file /boot/config.txt
has moved to a new location under
/boot/firmware/
.
Add these five lines somewhere before any paragraphs that look like
[something]
, or in other words, just before the first left square bracket
[
:
dtoverlay=rpi-poe
dtparam=poe_fan_temp0=65000,poe_fan_temp0_hyst=5000
dtparam=poe_fan_temp1=70000,poe_fan_temp1_hyst=5000
dtparam=poe_fan_temp2=75000,poe_fan_temp2_hyst=5000
dtparam=poe_fan_temp3=80000,poe_fan_temp3_hyst=5000
Then reboot.
Stress testing
While doing some tests of the configuration I decided to monitor the temperature:
watch -n1 vcgencmd measure_temp
And then in another terminal I run stress tests on all four CPUs:
sudo apt install -y stress-ng
sudo stress-ng --cpu 4 --timeout 120
Enjoy!