1

I am willing to modify the Temperature limit that the pi has to turn on its fan on, to cool down. Because by default it says the fan only starts when the pi gets hotter than 60C.

https://www.raspberrypi.com/news/heating-and-cooling-raspberry-pi-5/

But for my usecase I want to keep it around 30 - 40C.

Any easy solutions for that? - best would be long term, like when it restarts that it will set that limit to what I modifyed it.

Sorry for the bad english and thank you in Advance dear community!

Tried to mess around with the /boot/firmware/bcm2712-rpi-5-b.dtb file, since that is where the configuration for that temperature limit is.

But I´m a Beginner so I had no luck in compiling or editing those.

1
  • WHY?? Have you tried any of the dtparam settings for temp? Try /boot/firmware/overlays/README
    – Milliways
    Feb 7 at 22:47

2 Answers 2

2

You should not attempt to make these changes to the .dtb file. The .dtb files are all "compiled", and not meant to be edited manually.

Instead, you should make your changes in the config.txt file located in /boot/firmware/config.txt (last I checked this is where it was found).

It's a bit strange I suppose, but the documentation for available adjustments to config.txt are in this location on your RPi: /boot/firmware/overlays/README. You should not make any changes to the README file - it is placed there only for documentation explaining how to make the changes needed in config.txt

Here are the parameters relevant to the changes you want to make for your RPi 5 fan (taken from the README file):

        fan_temp0               Temperature threshold (in millicelcius) for
                                1st cooling level (default 50000). Pi5 only.
        fan_temp0_hyst          Temperature hysteresis (in millicelcius) for
                                1st cooling level (default 5000). Pi5 only.
        fan_temp0_speed         Fan PWM setting for 1st cooling level (0-255,
                                default 75). Pi5 only.
        fan_temp1               Temperature threshold (in millicelcius) for
                                2nd cooling level (default 60000). Pi5 only.
        fan_temp1_hyst          Temperature hysteresis (in millicelcius) for
                                2nd cooling level (default 5000). Pi5 only.
        fan_temp1_speed         Fan PWM setting for 2nd cooling level (0-255,
                                default 125). Pi5 only.
        fan_temp2               Temperature threshold (in millicelcius) for
                                3rd cooling level (default 67500). Pi5 only.
        fan_temp2_hyst          Temperature hysteresis (in millicelcius) for
                                3rd cooling level (default 5000). Pi5 only.
        fan_temp2_speed         Fan PWM setting for 3rd cooling level (0-255,
                                default 175). Pi5 only.
        fan_temp3               Temperature threshold (in millicelcius) for
                                4th cooling level (default 75000). Pi5 only.
        fan_temp3_hyst          Temperature hysteresis (in millicelcius) for
                                4th cooling level (default 5000). Pi5 only.
        fan_temp3_speed         Fan PWM setting for 4th cooling level (0-255,
                                default 250). Pi5 only.

And so we see from reviewing the information above that the default is set up to increase the fan speed as the temperature increases:

  • at 50 degC (fan_temp0), the fan comes on at a speed of 75 (fan_temp0_speed), and will remain on until the temperature reaches the hysteresis point of 45 degC (45 = fan_temp0 - fan_temp1_hyst), at which point it will turn off.

  • at 60 degC (fan_temp1), the fan comes on at a speed of 125 (fan_temp1_speed), and will remain on until the temperature reaches the hysteresis point of 55 degC (55 = fan_temp1 - fan_temp1_hyst), at which point it will reduce to fan_temp0_speed.

etc for fan_temps 2 and 3.

And so you can see the designers have already implemented a fairly detailed algorithm for fan cooling. For the change that you want to make, I would suggest that you begin by adding the following lines to your config.txt file using the nano editor (or whatever editor you're comfortable with). In other words:

sudo nano /boot/firmware/config.txt 

Once the file is open, add these lines:

dtparam=fan_temp0=40000
dtparam=fan_temp0_hyst=10000
dtparam=fan_temp0_speed=125

This will start the fan at a speed of 125 when the temp reaches 40 degC, and turn it off when the temp reaches 30 degC. Finally, you should know that these temperatures are quite low, and you may find that your fan runs continuously. This shouldn't be an issue - just trying to prepare you for something you may not have expected.

So - try this & let us know how it goes!

1

In fact "at 50°C, the fan turns on at a low speed (30% speed)" see Cooling Raspberry Pi 5

There does not seem to be any official documentation about setting fan speeds but /boot/firmware/overlays/README explains the available parameters.

There is NO need to modify the .dtb, which is not recommended as it is likely to be overwritten.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.