Fan Shim LED not lighting up on RPi4


I purchased a Fan Shim for my first RPi4. I installed the standard script and everything worked fine for a bit. But then, the LED would intermittently work on reboot. The fan still seems to start/stop based on the thresholds (as far as I can tell anyways, since I notice the fan isn’t on constantly).
Over the last few weeks, I’ve reinstalled Raspbian many times. I’ve reinstalled Fan Shim again but lo and behold, no LED. I’ve rebooted quite a number of times but still no good. I’ve also tried running the script but nothing happens.
Anything else I can do to troubleshoot this?
Thank you in advance.

Update: so I just tried running “sudo python3” and the LED actually turned on this time - red. However, it’s just a constant red now, even after rebooting the RPi4 and restarting the fanshim service. It should only be red if the temp is past the default threshold but the fan isn’t even on so it shouldn’t be the case.

Have you reseated the Fan Shim?
Is there anything else connected to the GPIO header?

Yes, I’ve tried reseating the Fan Shim.

And I don’t have anything else connected to the GPIO header.

GPIO 14 pin 8, and GPIO 15 pin 10 are the LED control pins. Those are normally the UART pins. Were you running any software that may have turned the UART interface on? I think I’d have a look in the Raspberry Pi Configuration menu and make sure the UART is disabled.

I don’t think I’d have anything like that running. Would I have to check in the GUI? Or are there some CLI commands I can run?

You can run raspi-config from command line.

So I’ve gone in and made sure any serial connections, etc. are disabled. The RPi4 rebooted and the red LED that eventually came on the last time I ran the script is still persistent.

Temperature is 57 degrees though:
pi@VPN-RPi:~ $ sudo /opt/vc/bin/vcgencmd measure_temp

How do I see the thresholds for the green/red colours?

I do believe that LED is a an addressable LED. Once you turn it on it stays on until you remove the power. Just rebooting may not b enough to turn it off / make it change state. It has to be commanded to change state. Just a FYI in case this is causing weird things to happen, and what you expect to happen not to happen. ;)
Is the LED color controlled by the same daemon that runs the FAN? I don’t have a Fan Shim yet.
Or are you doing it with a python script? If its a python script it should be in that someplace.

I’m just using the script, which calls the script that came with the rest of the installation package for the fan. Before, the LED would be green most of the time and I do remember it turning orange a few times previously on its own (based on temperature, I assume, since it’s written in the installation instructions that it would do so by default).
Essentially, I’ve just been following the instructions here:

Ok, I don’t know how you sort out what temp turns it what color.
Maybe ask Sandy @sandyjmacdonald, he authored that tutorial.

Yeah, I think I have 2 problems now:

  1. Intermittent LED
  2. Colour not changing when it actually is lit

It may be a bad contact on one of those pins used to address change the LED status. Communications error. The fan as near as I can tell uses other pins.


I have 2 x Pi 4 and 3x fan shims. All shims worked as designed on one Pi 4, none worked on the other Pi 4.

I (very carefully) slightly bent the GPIO pins to check if they were making proper contact. After this all fan shims worked on the “faulty” Pi 4.

I had a mix of the issues you described. Most obvious was the fan not always working, but the LED and fan control scripts did not work.

If you do decide to (very slightly) bend the GPIO pins, you do it at your own risk! I used a small flat screwdriver blade against the pin and bent it towards the USB connectors. I did this for all the pins used by the fan shim plug. It was only a little bend, hardly noticable, but fixed the problem.

Hope that helps in your case


Thanks, I just tried bending the pins slightly. Still seems to be really finicky, as I still had to adjust the Fan Shim a lot before getting both the LED to be lit (and something other than red) and have the fan run at the same time.


Great, looks like that is the problem. You could try bending pins a little more, one at a time to see if you find the problem one. It really needs a HAT or a IO extender to lock the shim in place I suspect.

I think I had a few tries (read: slight bends), before I got it working reliably.


I have one on the way, I should have it by the end of next week. I plan on soldering mine to a header. I already have a heatsink in place so I’ll need to raise it a bit anyway. My plan is to mount the fan under its holder instead of on top, to lower it. I’m hoping that will offset the raise the header will cause.
I’ll test fit everything before I even get my soldering iron out.