OnOff Shim working Config


I have problem with OnOff Shim

my /etc/cleanshutd.conf is:

config for cleanshutd (commented out values are the defaults)


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 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.

How to fix it?

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

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

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

fixed, it should be:

config for cleanshutd (commented out values are the defaults)


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

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