Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

[Tutorial] OnOff SHIM exposed - neat Powerswitch from Pimoroni



  • @cyperghost Thks for your quick response !

    I have a Raspberry Pi 3 with the Pre-made image RetroPie v4.3.

    The modification of the autostart.sh script works fine !

    But when the Pie is shutdown I can't repower it by pressing the button ... The Red Power LED from the Pie and my switch LED (wired on the PIN 1) remain ON ...

    I have check my wiring, and it's ok !
    But I've find a new problem, in the folder /lib/systemd/system-shutdown/ I have 2 scripts : gpio-shutoff.saveand gpio-shutoff.sh. I've test to delete with rm or modify the script but I get the following message error : "Permission denied"

    Did I do something wrong ?



  • @necsus use sudo rm /lib/systemd/system-shutdown/gpio-shutoff.save

    and remove the .sh file, too

    then create the file exactly as I wrote in the tutorial .... WITHOUT .sh just gpio-shutoff and make it executable ;) ... that should do the trick. Seems your script wasn't made executable because of the extension.



  • @cyperghost Thks for the help, I succeeded to delete the two files, create the gpio-shutoff script (I make it executable with sudo chmod +x ;) ).

    But it's still not working, I think the PCB has a problem. I will test if the script run by putting a LED on the GPIO 17 when the Pie shutoff.



  • @necsus Well... that's weird!

    Try to install the official from Pimoroni

    type curl https://get.pimoroni.com/onoffshim | bash

    But I really don't know why this is not working for you... see here
    But seems you are not alone ... from runeaudio.com - I think I will dig deeper in this!
    Hell! There is something going wrong here .... See the official Pimoroni-board - the guy is reporting the same as you! I will make a test on the new Stretch image - keep you updated. That's really strange now!



  • @cyperghost It's very strange, because I install Raspbian Stretch Lite Kernel version: 4.9 on my pi zero w, and use curl https://get.pimoroni.com/onoffshim | bashcommand and it works ...
    I buy 5 OnOff Shim board at the same time on Pimoroni.
    Do you think the OnOff Shim board use on my Rpi 3 has a problem ?



  • SOLVED! Proceed with Tutorial as descriped!



  • @cyperghost Ok that's very strange ! And thanks for the explaination.
    I will do a test on the Pi3 with Raspbian OS on a new SD card, if it's working.

    Which OS can I test to help us understanding the problem ?


  • Global Moderator

    @necsus The RetroPie image is built on top of Raspbian, so you could keep using Raspbian to test things.



  • @mitu Yes that's right! Raspbian would be the first choice.
    The reason why I ripped this out of the PIMORONI SHIM service is, that the installer will likely not work on systems like RECALBOX, LibreELEC or OSMC.

    But the two bash files and the explaination to setup them would likely work. I think I can test just on weekend so I would be glad if someone else could take over.



  • @mitu @Necsus

    Updated scripts... It will now work! Thanks for your support!
    This will now work on RPi0/1, RPi2/3

    Tested also with Raspbian light Stretch on 4.9 Kernel! Works fine, too :D



Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.