# Fanshim was working fine but stopped working

**URL:** <https://forums.pimoroni.com/t/fanshim-was-working-fine-but-stopped-working/12973>\
**Category:** Support\
**Created:** [February 6, 2020, 7:26pm UTC](https://forums.pimoroni.com/t/fanshim-was-working-fine-but-stopped-working/12973 "2020-02-06T19:26:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![moebius10](https://avatars.discourse-cdn.com/v4/letter/m/7ea924/32.png) [@moebius10](https://forums.pimoroni.com/u/moebius10)\
**Post date:** [February 6, 2020, 7:26pm UTC](https://forums.pimoroni.com/t/fanshim-was-working-fine-but-stopped-working/12973/1 "2020-02-06T19:26:35Z")

</div>

My Rpi4 fanshim had been working great for months. Today, I checked on the fan and saw it was not running. The temps are high enough that it should be running. I followed the instructions to install the scripts ([https://learn.pimoroni.com/tutorial/sandyj/getting-started-with-fan-shim](https://learn.pimoroni.com/tutorial/sandyj/getting-started-with-fan-shim)) and I’m not having any luck. Below are the errors I get. Any help would be greatly appreciated.

root@omv:~/fanshim-python/examples# ./install-service.sh --on-threshold 65 --off-threshold 55 --delay 2  
Setting up with:  
Off Threshold: 55 C  
On Threshold: 65 C  
Delay: 2 seconds  
Preempt: no  
Disable LED: no  
Disable Button: no  
Brightness: 255

To change these options, run:  
sudo ./install-service.sh --off-threshold --on-threshold --delay --brightness --venv \<python\_virtual\_environment\> (–preempt) (–noled) (–nobutton)

Or edit: /etc/systemd/system/pimoroni-fanshim.service

Checking for rpi.gpio\>=0.7.0 (for Pi 4 support)  
rpi.gpio \>= 0.7.0 already installed  
Checking for Fan SHIM  
Fan SHIM already installed  
Checking for psutil  
psutil already installed

Installing service to: /etc/systemd/system/pimoroni-fanshim.service  
Failed to restart pimoroni-fanshim.service: Unit pimoroni-fanshim.service is not loaded properly: Invalid argument.  
See system logs and ‘systemctl status pimoroni-fanshim.service’ for details.  
● pimoroni-fanshim.service - Fan Shim Service  
Loaded: error (Reason: Invalid argument)  
Active: inactive (dead)

Feb 06 10:32:18 omv systemd[1]: [/etc/systemd/system/pimoroni-fanshim.service:8] Executable path is not absolute, ignoring: python3 /root/fanshim-python/examples/automatic.py --on-threshold 55 --off-threshold 45 --delay 2 --brightness 255  
Feb 06 10:32:18 omv systemd[1]: pimoroni-fanshim.service: Service lacks both ExecStart= and ExecStop= setting. Refusing.  
Feb 06 10:41:16 omv systemd[1]: [/etc/systemd/system/pimoroni-fanshim.service:8] Executable path is not absolute, ignoring: python3 /root/fanshim-python/examples/automatic.py --on-threshold 65 --off-threshold 55 --delay 2 --brightness 255  
Feb 06 10:41:16 omv systemd[1]: pimoroni-fanshim.service: Service lacks both ExecStart= and ExecStop= setting. Refusing.  
Feb 06 10:41:17 omv systemd[1]: [/etc/systemd/system/pimoroni-fanshim.service:8] Executable path is not absolute, ignoring: python3 /root/fanshim-python/examples/automatic.py --on-threshold 65 --off-threshold 55 --delay 2 --brightness 255  
Feb 06 10:41:17 omv systemd[1]: pimoroni-fanshim.service: Service lacks both ExecStart= and ExecStop= setting. Refusing.  
Feb 06 10:42:06 omv systemd[1]: [/etc/systemd/system/pimoroni-fanshim.service:8] Executable path is not absolute, ignoring: python3 /root/fanshim-python/examples/automatic.py --on-threshold 65 --off-threshold 55 --delay 2 --brightness 255  
Feb 06 10:42:06 omv systemd[1]: pimoroni-fanshim.service: Service lacks both ExecStart= and ExecStop= setting. Refusing.  
Feb 06 10:42:06 omv systemd[1]: [/etc/systemd/system/pimoroni-fanshim.service:8] Executable path is not absolute, ignoring: python3 /root/fanshim-python/examples/automatic.py --on-threshold 65 --off-threshold 55 --delay 2 --brightness 255  
Feb 06 10:42:06 omv systemd[1]: pimoroni-fanshim.service: Service lacks both ExecStart= and ExecStop= setting. Refusing.

---

<div class="post-metadata">

**Author:** ![nophead](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/nophead/32/5827_2.png) [@nophead](https://forums.pimoroni.com/u/nophead)\
**Post date:** [February 6, 2020, 8:21pm UTC](https://forums.pimoroni.com/t/fanshim-was-working-fine-but-stopped-working/12973/2 "2020-02-06T20:21:48Z")

</div>

I think old versions of systemctl insist on the command path being absolute but the later version that comes with Buster does not. If you change python3 to /usr/bin/python3 in install.sh it will probably fix it.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [February 6, 2020, 8:25pm UTC](https://forums.pimoroni.com/t/fanshim-was-working-fine-but-stopped-working/12973/3 "2020-02-06T20:25:08Z")

</div>

To change the fan shim service settings you have to stop it first. I’m not sure if your doing that.

```auto
cd fanshim-python
cd examples
sudo systemctl stop pimoroni-fanshim.service
sudo ./install-service.sh --on-threshold 75 --off-threshold 60 --delay 5

```

Change that last line to the new values you want to use.

You could also try this

```auto
cd fanshim-python
cd examples
sudo systemctl stop pimoroni-fanshim.service
sudo systemctl disable pimoroni-fanshim.service

```

Then reboot. The default state for the fan even with no software installed is on. It should just run continuously as long as the Pi has power. If you do the above and the fan still doesn’t run, you have a hardware issue.

---

<div class="post-metadata">

**Author:** ![moebius10](https://avatars.discourse-cdn.com/v4/letter/m/7ea924/32.png) [@moebius10](https://forums.pimoroni.com/u/moebius10)\
**Post date:** [February 7, 2020, 10:01pm UTC](https://forums.pimoroni.com/t/fanshim-was-working-fine-but-stopped-working/12973/4 "2020-02-07T22:01:04Z")

</div>

nophead - That removed the previous errors.

alphanumeric - I did exactly what you said, all the way into reboot. The fan wasn’t running on startup.  
I then did “./install-service.sh” followed by “systemctl status pimoroni-fanshim.service” and the results are below. I’m guessing I have a hardware failure?

root@omv:~/fanshim-python/examples# ./install-service.sh  
Setting up with:  
Off Threshold: 55 C  
On Threshold: 65 C  
Delay: 2 seconds  
Preempt: no  
Disable LED: no  
Disable Button: no  
Brightness: 255

To change these options, run:  
sudo ./install-service.sh --off-threshold --on-threshold --delay --brightness --venv \<python\_virtual\_environment\> (–preempt) (–noled) (–nobutton)

Or edit: /etc/systemd/system/pimoroni-fanshim.service

Checking for rpi.gpio\>=0.7.0 (for Pi 4 support)  
rpi.gpio \>= 0.7.0 already installed  
Checking for Fan SHIM  
Fan SHIM already installed  
Checking for psutil  
psutil already installed

Installing service to: /etc/systemd/system/pimoroni-fanshim.service  
● pimoroni-fanshim.service - Fan Shim Service  
Loaded: loaded (/etc/systemd/system/pimoroni-fanshim.service; enabled; vendor preset: enabled)  
Active: active (running) since Fri 2020-02-07 15:44:10 CST; 89ms ago  
Main PID: 15727 (python3)  
Tasks: 1 (limit: 4915)  
CGroup: /system.slice/pimoroni-fanshim.service  
└─15727 /usr/bin/python3 /root/fanshim-python/examples/automatic.py --on-threshold 65 --off-threshold 55 --delay 2 -…55

Feb 07 15:44:10 omv systemd[1]: Started Fan Shim Service.  
root@omv:~/fanshim-python/examples# systemctl status pimoroni-fanshim.service  
● pimoroni-fanshim.service - Fan Shim Service  
Loaded: loaded (/etc/systemd/system/pimoroni-fanshim.service; enabled; vendor preset: enabled)  
Active: failed (Result: exit-code) since Fri 2020-02-07 15:44:12 CST; 6s ago  
Process: 15736 ExecStart=/usr/bin/python3 /root/fanshim-python/examples/automatic.py --on-threshold 65 --off-threshold 55 --dela  
Main PID: 15736 (code=exited, status=1/FAILURE)

Feb 07 15:44:12 omv systemd[1]: pimoroni-fanshim.service: Failed with result ‘exit-code’.  
Feb 07 15:44:12 omv systemd[1]: pimoroni-fanshim.service: Service hold-off time over, scheduling restart.  
Feb 07 15:44:12 omv systemd[1]: Stopped Fan Shim Service.  
Feb 07 15:44:12 omv systemd[1]: pimoroni-fanshim.service: Start request repeated too quickly.  
Feb 07 15:44:12 omv systemd[1]: Failed to start Fan Shim Service.  
Feb 07 15:44:12 omv systemd[1]: pimoroni-fanshim.service: Unit entered failed state.  
Feb 07 15:44:12 omv systemd[1]: pimoroni-fanshim.service: Failed with result ‘exit-code’.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [February 7, 2020, 10:27pm UTC](https://forums.pimoroni.com/t/fanshim-was-working-fine-but-stopped-working/12973/5 "2020-02-07T22:27:49Z")

</div>

If the fan doesn’t run on boot up, even briefly, you must have a hardware failure. That or the fan shim isn’t making good contact with the Pi’s GPIO pins and is not getting power.

---

<div class="post-metadata">

**Author:** ![moebius10](https://avatars.discourse-cdn.com/v4/letter/m/7ea924/32.png) [@moebius10](https://forums.pimoroni.com/u/moebius10)\
**Post date:** [February 7, 2020, 10:56pm UTC](https://forums.pimoroni.com/t/fanshim-was-working-fine-but-stopped-working/12973/6 "2020-02-07T22:56:55Z")

</div>

The fan has been running fine since August 2019. Just noticed a few days ago that it wasn’t running though it should have been. I’m leaning towards a hardware failure :-(  
Thank you for the help!
