raspi-config P4
only allows temperatures above 60, but I prefer being able to touch my pi before the fan turns on. Is there a way to ignore this limit and set the temperature to a lower value?
2 Answers
Only a single line needs to be added to config.txt
dtoverlay=gpio-fan,temp=60000
to switch the fan on at 60℃ - 60000 millicelcius (the default is 55℃ but you can select any temperature). The fan turns off when the temperature falls by 10℃.
This uses the gpio-fan
overlay (which has been available in the kernel since late 2018) and should be included in recent versions of Raspbian. (Read /boot/overlays/README
for description of this and other Device Tree overlays.)
Reading the code in raspi-config, it sets the following in config.txt
dtoverlay=gpio-fan,gpiopin=x,temp=y
replace x
with the gpiopin the fan control is connected to
replace y
with the trigger temperature in millicelcius
If you've played with the P4
already you should see the dtoverlay=gpio-fan
line in config.txt
already, so you just need to edit that and reboot