Hello!!
I just bought and installed a GeeekPi RPi4 Aluminum Heatsink and, in the instructions, it says to run “sudo raspi-config” to enable the fan under performance options.
Is there something similar in DietPi to support the fan??
Thanks!
Hello!!
I just bought and installed a GeeekPi RPi4 Aluminum Heatsink and, in the instructions, it says to run “sudo raspi-config” to enable the fan under performance options.
Is there something similar in DietPi to support the fan??
Thanks!
Hi,
the raspi-config “Fan” option doesn’t install any service. It only adds a single line to config.txt that loads the kernel overlay gpio-fan. You can do the same on DietPi by hand.
First, please check how your fan is connected:
For the 3-wire version, add this to the end of /boot/firmware/config.txt:
dtoverlay=gpio-fan,gpiopin=14,temp=65000
gpiopin = the GPIO (BCM number) the control wire is connected totemp = switch-on temperature in millidegrees (65000 = 65 °C)hyst=10000 = the fan switches off again 10 °C below temp (this is the default)Then reboot. Please note this is only on/off control, not real PWM speed control.
Important for GPIO14: GPIO14/15 are the serial UART pins, and on DietPi the serial console is enabled there by default (if not disabled manually). This conflicts with the fan control. Either:
dietpi-config > Advanced Options > Serial/UART > ttyS0 (mini UART) device > Off, then reboot, orgpiopin=18. Make sure that pin isn’t used by anything else (e.g. an I2S audio HAT or LED strip).After the reboot you can test it, e.g. with a lower temporary temp value, or check the current temperature with cpu.
Awesome, thanks a lot for such detailed information.
I just added that line to my config.txt and it seems to be working properly (UART was already disabled).
Thanks!!
FYI: Add PWM fan control to dietpi-config by zumbiepig · Pull Request #8269 · MichaIng/DietPi · GitHub
So there is a new overlay added by one of our contributors. I did not find the time to implement a choice between the two, which is IMO needed, but support for this is coming to dietpi-config.
That’s awesome!!