# OnOff Shim working Config

**URL:** <https://forums.pimoroni.com/t/onoff-shim-working-config/10086>\
**Category:** Support\
**Created:** [March 7, 2019, 11:15pm UTC](https://forums.pimoroni.com/t/onoff-shim-working-config/10086 "2019-03-07T23:15:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![janek](https://avatars.discourse-cdn.com/v4/letter/j/2acd7d/32.png) [@janek](https://forums.pimoroni.com/u/janek)\
**Post date:** [March 7, 2019, 11:15pm UTC](https://forums.pimoroni.com/t/onoff-shim-working-config/10086/1 "2019-03-07T23:15:27Z")

</div>

Hi,

I have problem with OnOff Shim

my /etc/cleanshutd.conf is:

# config for cleanshutd (commented out values are the defaults)

daemon\_active=1  
trigger\_pin=4  
led\_pin=off  
poweroff\_pin=4  
hold\_time=1  
shutdown\_delay=0  
polling\_rate=1

By pressing the push-button on the Shim, I am able to turn on my RPi3B+  
I am unable to turn the power off by pressing the same button  
I check the signals with oscilloscope and it looks like when doing the OFF press, the level on pin BCM17 goes low and the level on pin BCM4 stays high.

It looks like the software is running  
root@RPi3AP:~# service cleanshutd status  
● cleanshutd.service - LSB: Monitoring GPIO shutdown trigger  
Loaded: loaded (/etc/init.d/cleanshutd; generated; vendor preset: enabled)  
Active: active (running) since Thu 2019-03-07 22:32:45 GMT; 32min ago  
Docs: man:systemd-sysv-generator(8)  
Process: 303 ExecStart=/etc/init.d/cleanshutd start (code=exited, status=0/SUC  
CGroup: /system.slice/cleanshutd.service  
├─ 391 /bin/bash /usr/bin/cleanshutd  
└─4308 sleep 1

Mar 07 22:32:44 RPi3AP systemd[1]: Starting LSB: Monitoring GPIO shutdown trigge  
Mar 07 22:32:45 RPi3AP cleanshutd[303]: Starting…  
Mar 07 22:32:45 RPi3AP systemd[1]: Started LSB: Monitoring GPIO shutdown trigger

Following the hint from here [Onoff Shim not restart](https://forums.pimoroni.com/t/onoff-shim-not-restart/7345/5) when I execute  
root@RPi3AP:~# sudo /lib/systemd/system-shutdown/gpio-poweroff poweroff

the response is:  
Reading config file /etc/cleanshutd.conf  
Using power off pin

and the system is powered down.

Question:  
How to fix it?

---

<div class="post-metadata">

**Author:** ![Caperjack1953](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/caperjack1953/32/7923_2.png) [@Caperjack1953](https://forums.pimoroni.com/u/Caperjack1953)\
**Post date:** [March 7, 2019, 11:53pm UTC](https://forums.pimoroni.com/t/onoff-shim-working-config/10086/2 "2019-03-07T23:53:30Z")

</div>

Hello,you need to hold the button in briefly to shutdown

---

<div class="post-metadata">

**Author:** ![janek](https://avatars.discourse-cdn.com/v4/letter/j/2acd7d/32.png) [@janek](https://forums.pimoroni.com/u/janek)\
**Post date:** [March 8, 2019, 12:57am UTC](https://forums.pimoroni.com/t/onoff-shim-working-config/10086/3 "2019-03-08T00:57:28Z")

</div>

holding for 5 s - nothing  
holding for 10 s - nothing  
… obviously something is wrong

---

<div class="post-metadata">

**Author:** ![janek](https://avatars.discourse-cdn.com/v4/letter/j/2acd7d/32.png) [@janek](https://forums.pimoroni.com/u/janek)\
**Post date:** [March 8, 2019, 7:00am UTC](https://forums.pimoroni.com/t/onoff-shim-working-config/10086/4 "2019-03-08T07:00:01Z")

</div>

additional info:  
if I run: root@RPi3AP:~# /usr/bin/./cleanshutd

I have  
Unknown GPIO “off”  
monitoring BCM 4

If anyone has the latest version of hardware and software, can you tell me the working contents of /etc/cleanshutd.conf

---

<div class="post-metadata">

**Author:** ![janek](https://avatars.discourse-cdn.com/v4/letter/j/2acd7d/32.png) [@janek](https://forums.pimoroni.com/u/janek)\
**Post date:** [March 9, 2019, 12:54am UTC](https://forums.pimoroni.com/t/onoff-shim-working-config/10086/5 "2019-03-09T00:54:37Z")

</div>

fixed, it should be:

# config for cleanshutd (commented out values are the defaults)

daemon\_active=1  
trigger\_pin=17  
led\_pin=17  
poweroff\_pin=4  
hold\_time=1  
shutdown\_delay=0  
polling\_rate=1

---

<div class="post-metadata">

**Author:** ![janek](https://avatars.discourse-cdn.com/v4/letter/j/2acd7d/32.png) [@janek](https://forums.pimoroni.com/u/janek)\
**Post date:** [March 9, 2019, 2:28am UTC](https://forums.pimoroni.com/t/onoff-shim-working-config/10086/6 "2019-03-09T02:28:41Z")

</div>

I was mislead by a github [https://github.com/pimoroni/clean-shutdown/blob/master/daemon/etc/cleanshutd.conf](https://github.com/pimoroni/clean-shutdown/blob/master/daemon/etc/cleanshutd.conf)  
Can someone responsible fix it?

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [March 10, 2019, 2:54pm UTC](https://forums.pimoroni.com/t/onoff-shim-working-config/10086/7 "2019-03-10T14:54:35Z")

</div>

Ah- interesting spot. BCM 4 is the default pin for Zero LiPo, whereas OnOff SHIM uses BCM 17. Furthermore the installer wont uncomment - or possibly even properly change - config lines when setting up for a specific breakout.

My bad- I merged a PR that changed the script and config file without thoroughly testing it. I’ll raise an issue for this to be fixed ASAP.

Edit: Raised, track here: [https://github.com/pimoroni/clean-shutdown/issues/21](https://github.com/pimoroni/clean-shutdown/issues/21)
