Fanshim will not stop after shutdown

I am using a Raspberry Pi4 running Raspbian Lite Kernel version 5.10.

I have just installed the fanshim and all went well. It did as expected. When the green light was on it stopped, when the red light was on it started.

I have just shutdown the pi with sudo shutdown -h now and the fan is still spinning.

What do I need to do to stop this from happening?

Kind Regards

Paul

That’s normal behavior, just so you know. A bit annoying for some but that’s how it works out of the box. I modify mine so the default state for the fan is off.
Fan Shim Button to turn Pi on and off FYI post - Discussion - Pimoroni Buccaneers

Many thanks for the heads up. Gretly appreciated.

I have tried both dtoverlay=gpio-shutdown and
dtoverlay=gpio-shutdown,gpio_pin=17,active_low=1,gpio_pull=up in config.txt but the little fan is still spinning after shutdown.

I’m clearly missing something. Just wondering if you could advise on what might be the error?

Kind Regards

Paul

Unless you physically modify it, as I did in that other thread, it will always just run on shutdown.
It has been designed to have a default state for the Fan as ON. That’s so it will work to cool the SOC regardless of what OS is installed. Or if the Fan Shim software isn’t installed.
As an example of why this is good in some situations, I run Motion Eye OS on a Pi 4B with the HQ camera. I can’t install the Fan Shim software, or make the config.txt entry. Motion Eye OS is built on BuildRoot which is really locked down etc.

What happens when you do the shutdown is the GPIO Pin used for Fan Control goes to an undefined floating state. A ground on that pin turns the fan off, if its high or undefined / floating, the fan turns back on.
What I do on some of mine is cut the track to the pull up resistor on the board. Once I do that, with no signal to that pin, it goes low and the fan turns off. The downside is you have to either install the daemon, or do the config.txt entry to get the fan to turn on. It won’t ever turn on without being commanded to turn on.

Many thanks for the clarification.