brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: dtparam=fan_temp0=55000 keeps the Raspberry Pi 5 fan off until 55 degrees

Performance
~/tips/tip-raspberry-pi-5-fan-temp0

dtparam=fan_temp0=55000

Changes the temperature at which the Pi 5 fan starts spinning.

The little fan that spins up on a Pi 5 at the first hint of warmth can be annoying on a desk. The temperature steps are not fixed, and one line in the config file moves them.

According to the Raspberry Pi documentation, the default mapping for the official Pi 5 fan is: off below 50 degrees Celsius, 30 percent at 50, 50 percent at 60, 70 percent at 67.5 and full speed at 75, with 5 degrees of hysteresis on the way down. The fan stays quiet in the lowest range, but the first step arrives early.

To change a threshold, add a dtparam line to /boot/firmware/config.txt. The docs’ own example:

dtparam=fan_temp0=55000

That makes the fan stay off until the Pi reaches 55 degrees. Note the unit: the value is in thousandths of a degree, so 55000 means 55 degrees. The settings are named fan_tempN, fan_tempN_hyst and fan_tempN_speed, where N runs from 0 to 3, so each of the four steps can be tuned for its temperature, its hysteresis and its speed.

Edit the file with root rights, for example sudo nano /boot/firmware/config.txt, and reboot afterwards. I’d make a copy first:

sudo cp /boot/firmware/config.txt /boot/firmware/config.txt.bak

To see what the board does after the change, read the temperature the way the docs suggest:

vcgencmd measure_temp

The docs call this an accurate and instantaneous reading of the SoC temperature.

The caveat is obvious but worth saying: a fan that starts later means the chip runs warmer for longer. Raising the first step by 5 degrees is a small change. Pushing every threshold far up trades noise for heat, and a Pi that is throttling is slower than a Pi with a loud fan. If the board sits in a closed case, I’d keep the defaults.

Further reading: Raspberry Pi documentation: fan thresholds and temperature

More Performance tips EXPLAIN (SETTINGS) SELECT * FROM my_table WHERE id = 42; sudo apt install hyperfine sudo apt install fio sudo cpufreq-set -g powersave Settings > Media Management > File Management > Analyze video files All Performance tips (9) All topics

Link