Out of the box support for case fans?
Creating a bug report/issue
Required Information
- DietPi version |
G_DIETPI_VERSION_CORE=8 G_DIETPI_VERSION_SUB=4 G_DIETPI_VERSION_RC=2 G_GITBRANCH='master' G_GITOWNER='MichaIng' - Distro version |
bullseye 0 - Kernel version |
Linux DietPi 5.15.32-v7l+ #1538 SMP Thu Mar 31 19:39:41 BST 2022 armv7l GNU/Linux - SBC model |
RPi 4 Model B (armv7l) - Power supply used | ThePiHut 5v
- SD card used | SanDisk Ultra 32GB
Additional Information (if applicable)
- Software title | WiFi Hotspot + Pi-hole
- Was the software title installed freshly or updated/migrated? Freshly installed
- Can this issue be replicated on a fresh installation of DietPi? Yes
Steps to reproduce
- Plug in case fan. (https://thepihut.com/products/raspberry-pi-4-case-fan)
- It doesn't work.
Expected behaviour
- The fan should work ...
Actual behaviour
- It doesn't work. Pulling my hair out with these fiddly bugs ... enough to make me want to go back to Raspbian even if it is more bloated. 😞
Did you set respective configuration to control the fan? https://github.com/MichaIng/DietPi/issues/4003#issuecomment-751254845
echo 'dtoverlay=gpio-fan,gpiopin=14,temp=60000' >> /boot/config.txt
Works with option but seems to ignore the settings?
Almost feels as if it's overriden to go full speed? It's SO loud.
Did you try to change the GPIO pin, if that setting is respected? And the temperature is definitely lower? vcgencmd measure_temps
did you reboot after setting the value?
Did you try to change the GPIO pin, if that setting is respected? And the temperature is definitely lower?
vcgencmd measure_temps
It does seem to be in GPIO pin 14 though - isn't that correct? Yep, temps sitting at 47 and it's going full blast.
did you reboot after setting the value?
Yep.
It does seem to be in GPIO pin 14 though - isn't that correct?
When you change the pin and re-attach the fan (the TX cable) accordingly, it still works? So only the temp option is ignored, not the gpiopin option.
It does seem to be in GPIO pin 14 though - isn't that correct?
When you change the pin and re-attach the fan (the TX cable) accordingly, it still works? So only the temp option is ignored, not the gpiopin option.
I guess so yes, the fan is stuck on at full speed it seems.
Just to rule it out, could you try to enable dbus and systemd-logind?
apt install dbus
systemctl unmask systemd-logind
systemctl start systemd-logind
Marking as closed. Feel free to reopen if required.
Reopening - now this, much quieter fan, also doesn't work. The script claims it can only be installed in RPI OS but I've made a python virtual environment to run the script in and it installs fine ... yet the fan won't listen to the script commands.
https://learn.pimoroni.com/article/getting-started-with-fan-shim
@MichaIng
If the script does not run on DietPi, I guess some setup steps are missing, likely the correct GPIO/overlay configuration. But we should be able to simply hack DietPi support inside, since DietPi on RPi is RPi OS in all relevant parts.
The script tries to install it as Python 2 module on all systems but Bullseye. So it has never been updated to be made compatible with Bookworm and any newer Debian distro. And another problem I see, while it installs it as Python 3 module on Bullseye, it creates the configuration variables by using the python (Python 2) command, which of course cannot work: https://github.com/pimoroni/fanshim-python/blob/master/install.sh
So it requires some fixes/updates, but I do not see where it claims to only support RPi OS?
@privacyguy123
Is this still an issue? If so, can you try to download the script and change python to python3 in this line: https://github.com/pimoroni/fanshim-python/blob/master/install.sh#L45C1-L45C12
Marking as closed due to outstanding reply. Feel free to reopen if required.