Please do not post a support request without first reading and following the advice in

Nespi case plus safe shutdown question/issue

  • This might me a bit of a niche question, but I can't find anything else online related to it and I know there are a fair few owners here.

    I picked up a Raspberry Pi B3+ and the NESpi case+ as my first foray into Raspberry Pi, got it hooked up, threw retropi on a old SD card and got all booted up. Installed the safe shutdown scripts from the rather sorry excuse for a repo and noticed that it really did not work very well.

    Power button turns on the Pi but does not turn off, scripts just don't trigger. Reset however works fine.
    Their scripts reference a power pin and a poweren pin. The power pin button events don't fire at all if i rebind them to test print functions. However the poweren pin, that is currently bound as a LED does work as a button if i rebind this, though if i bind this to run power off scripts I can't power back on.

    I have seem some reworks of the script for the plus version that skip the 5 second sleep and some complete rewrites from people like @cyperghost but As I'm not sure what the button is supposed to do, out of the box at least, I'm getting a bit muddled with if my hardware is faulty or not. That and most google searched bring up the non plus case without safe shutdown, but people adding SS to it.

  • @codecomp I think you should turn the switch in the PCB to ON position. Then you can tinker with different scripts.

  • Yes there is a small switch inside the case on their board. sounds like you did not switch it to on. Look under the rj45/usb ports

  • The switch is on, I also tried with it set to off in the event that it was wired in reverse what has also been reported as a thing.

  • how many wires are pluging into the raspberry pi it shoudl be a 6wire /10pin unit, also the usb from the case must be pluged into the usbport on the raspberry pi. What command did you run to install the SafeShutdown script? Did you manually install it or use the wget -O - "" | sudo bash

  • @almulder I'm pretty sure there were 6 wires in the 10 pin block. I recall pin 2, 6, 9, 10 being blank off the top of my head. And yeah I installed the script via that command, then double checked al the actions of that shell file to make sure they had worked, which they seem to have done.

    The USB is also plugged into the top left port which I saw some notes online saying was necessary for the older model (top left not plugging in)

  • Odd I got the Case+ and installed the script, turned the switch selector switch to on and it just started working. (USB port plug should not matter, as I have moved mine to different slots when pulling it out and putting it back during testing.)
    Did you create the image of your SD card from scratch or used a premade one?

  • I just went to the downloads page and clicked the big red 2/3 download button and burnt it into a new formatted SD card with Win32DiskImager. I didn't want to try starting with loading it on top of Raspbien with my first install.

    It is sounding like a hardware issue more and more. The only working source I've found is a short video after someone stick their pi in the case and said "Look you can turn it on/off with this button" but skipped over the script install.

    My debugging just threw me for a loop as I could not work out the logic of how that power button should work. Passing power through on activation but labelling power as a button and the actual power button as a LED. I thought one of the wired might be going to the wrong pin when I was able to get power off working by changing the LED pin to a button. But while the shutdown command worked, powering back on would not without unplugging and plugging back in the cable.

  • post your script you have installed from your pi. (SSH would be the easiest way to copy and paste)

  • also make sure that in /etc/rc.local that the SafeShutdown is listed. should look somehting like this

    # By default this script does nothing.
    # Print the IP address
    _IP=$(hostname -I) || true
    if [ "$_IP" ]; then
      printf "My IP address is %s\n" "$_IP"
    "/opt/retropie/supplementary/retropie-manager/" --start --user pi 2>&1 > /dev/shm/rpmanager.log &
    sudo python3 /opt/RetroFlag/ &
    dmesg --console-off
    exit 0

  • @codecomp please check your rc.local first. Then is the LED blinking over boot process? It is just a bit flickering during the first few seconds then it glows solid.

    @mitu look at the process how they call the commands. A sudo call in rc.local .... And later they make sudo shutdown calls. So 3 time superuser (it is like a cinema with all superhumans in one film... The Avengers: Mission RetroPie) ... So it can be true that the vendor did not create the script at his own ;)

  • The rc.local contains the expected sudo python 3 call to the script. Thought I'd mentioned that before but must have been part of my deleted ramblings, whoops. But I did verify the install process did do it's job best I could.

    The LED however does not blink on boot, just goes strait to solid. Tested again with the board set to on and off in case of faulty wiring just to be sure.

  • I just got the new superpi snes case from retroflag and my safe shutdown doesn't work either.

    Script used:
    wget -O - "" | sudo bash

    Switch on pcb is set to on.

    Pi 3B+
    Running 4.4 updated all packages

    Edit: I do have a fan in my case using 3.3v power using gpio pins.

    Any idea on what to try to fix this?

  • Did you get it working? if not post the contents of this file. /etc/rc.local

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.