• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
RetroPie forum home
  • Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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

Superpi case - shutdown script not working.

Scheduled Pinned Locked Moved Help and Support
superpi
26 Posts 3 Posters 4.4k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C
    campbell87
    last edited by 7 Sept 2020, 20:05

    Hi guys,

    New to the forum and pi.

    Recently picked up a superpi case from Amazon and it came today, so thought I'd have a go at setting it all up.

    Issue I'm having is with the shutdown. When I set the switch to off, it doesn't power off the system, just does a reboot.

    Is anyone able to help please? I've tried 2 pi 3b devices and clean version of retropie (latest)

    Anyone able to help me please?

    Thanks

    Dan

    C 1 Reply Last reply 8 Sept 2020, 02:26 Reply Quote 0
    • C
      cyperghost @campbell87
      last edited by cyperghost 9 Aug 2020, 10:19 8 Sept 2020, 02:26

      @campbell87 use this one

      wget -O - "https://raw.githubusercontent.com/crcerror/retroflag-picase/master/install.sh" | sudo bash
      

      RetroFlag uses reboot command for both switches since months. Don't know why.

      1 Reply Last reply Reply Quote 1
      • C
        campbell87
        last edited by 8 Sept 2020, 21:44

        hi @cyperghost thanks for the script. I have ran this and attempted to shut down by powering off the switch on the superpi case.

        it goes through a script but then just sits on [38.2000375] reboot: Power down.

        nothing else seems to happen

        C 1 Reply Last reply 9 Sept 2020, 09:08 Reply Quote 0
        • C
          cyperghost @campbell87
          last edited by cyperghost 9 Sept 2020, 10:25 9 Sept 2020, 09:08

          @campbell87 Do you have a Pi3, you may need a reboot for taking action. Otherwise take a look into your \boot\config.txt There should be a line dtoveray=
          Are there several ones?

          You can try to uninstall the old residues by running:

          wget -O - "https://raw.githubusercontent.com/crcerror/retroflag-picase/master/uninstall_all.sh" | sudo bash
          

          and then reinstall again

          1 Reply Last reply Reply Quote 0
          • C
            campbell87
            last edited by campbell87 9 Sept 2020, 11:51 9 Sept 2020, 10:50

            Hi @cyperghost . I have these references for dtoverlay

            un comment to enable infrared communication

            #dtoverlay=gpio-ir, gpio_pin=17
            #dtoverlay=gpio-ir-tx, gpio_pin=18

            [Pi4]
            #dtoverlay=vc4-fkms-v3d

            [all]
            #dtoverlay=vc4-fkms-v3d
            Overlay setup for proper power cut, needed for retroflag cases
            #dtoverlay=gpio-poweroff, gpiopin=4, active_low=1, input=1

            I did do a hard reboot but doesn't shut down. Restart seems to work fine.

            I have a pi3b+

            M 1 Reply Last reply 9 Sept 2020, 10:54 Reply Quote 0
            • M
              mitu Global Moderator @campbell87
              last edited by 9 Sept 2020, 10:54

              @campbell87 said in Superpi case - shutdown script not working.:

              #dtoverlay=gpio-poweroff, gpiopin=4, active_low=1, input=1

              # is a comment character, everything after it is ignored. If the needed configuration line has a leading #, then remove the # to take effect.

              C 1 Reply Last reply 9 Sept 2020, 11:10 Reply Quote 1
              • C
                campbell87 @mitu
                last edited by 9 Sept 2020, 11:10

                @mitu i removed the # and tested. Still it hung on the reboot: shutdown

                i tried a re-install of the script and getting the same issue. Reset seems to work with no issues. Its just the shutdown thats not working.

                Ive tried on 2 pi3b+ devices, and both having the same issue. Do you think it could be hardware related at all?

                M 1 Reply Last reply 9 Sept 2020, 11:27 Reply Quote 0
                • M
                  mitu Global Moderator @campbell87
                  last edited by 9 Sept 2020, 11:27

                  @campbell87 said in Superpi case - shutdown script not working.:

                  Ive tried on 2 pi3b+ devices, and both having the same issue. Do you think it could be hardware related at all?

                  If it's hardware, then it might be the case. Can't be sure. The line you un-commented should signal the case that it has completed shutdown/poweroff.

                  What happens if you manually power off the Pi ?

                  C 1 Reply Last reply 9 Sept 2020, 11:47 Reply Quote 1
                  • C
                    campbell87
                    last edited by 9 Sept 2020, 11:37

                    @mitu do you mean to trigger a shutdown without the case connected?

                    C 1 Reply Last reply 9 Sept 2020, 11:43 Reply Quote 0
                    • C
                      cyperghost @campbell87
                      last edited by cyperghost 9 Sept 2020, 12:45 9 Sept 2020, 11:43

                      @campbell87 From what I see is that you used the uninstall script. Because the dtoverlay=gpio-poweroff is commented.

                      You said you installed the orginal from RetroFlag at first, because then there shouldbe a line like dtoverlay=RetroFlag_pw_io.dtbo instead.

                      Can you check /etc/init.d/rc.local please?
                      Maybe there are 2 scripts launched at the same time. To edit this file you need sudo rights so sudo nano /etc/init.d/rc.local does the trick. Thx

                      @mitu do you mean to trigger a shutdown without the case connected?

                      He means a shutdown by software, via ES menu for example.
                      It should do following. The Pie will not shutdown completly, you still have to press the button for complete shutdown.

                      1 Reply Last reply Reply Quote 0
                      • C
                        cyperghost @mitu
                        last edited by cyperghost 9 Sept 2020, 12:49 9 Sept 2020, 11:47

                        @mitu said in Superpi case - shutdown script not working.:

                        If it's hardware, then it might be the case. Can't be sure. The line you un-commented should signal the case that it has completed shutdown/poweroff.

                        Yes infact, this is needed for RPi4 for RPi3 the old script should still work. So a further test could be, to use the script I've posted and commentd the dto-line out from /boot/config.txt if then the Pie still hangs it's to 100% an hardware issue. Maybe connection is broken or something alike. GPIO4 needs a low signal --> PowerCut

                        C 1 Reply Last reply 9 Sept 2020, 12:01 Reply Quote 0
                        • C
                          campbell87 @cyperghost
                          last edited by 9 Sept 2020, 12:01

                          @cyperghost still no luck :(. I have sent a mail to the supplier along with some images of the case, so il see what they come back with.

                          Thanks guys for the support :)

                          C 1 Reply Last reply 9 Sept 2020, 12:04 Reply Quote 0
                          • C
                            cyperghost @campbell87
                            last edited by 9 Sept 2020, 12:04

                            @campbell87 Hmmmm. Last chance, try to install the original script from retroflag. Then shutdown with software command, after that push the button, the light have to go off! If not your case is faulty then!

                            C 1 Reply Last reply 9 Sept 2020, 13:09 Reply Quote 0
                            • C
                              campbell87 @cyperghost
                              last edited by 9 Sept 2020, 13:09

                              @cyperghost so I've done a fresh install of retropie. You want me to try and install the original script from retroflag and perform a shutdown from emulation station?

                              When I set up the pi case, I have the safe shutdown switch to on, and leave the power switch in the on position, then I plug in the power.

                              I will give it one last go and report back.

                              1 Reply Last reply Reply Quote 0
                              • C
                                cyperghost
                                last edited by 9 Sept 2020, 13:12

                                @campbell87 Yes, you power on with the switch, then perform a shutdown via EmulationStation, the Pi should still show a red light. The you press the Power Button and the LED light should go off. If not then it's the case.

                                C 1 Reply Last reply 9 Sept 2020, 13:23 Reply Quote 0
                                • C
                                  campbell87 @cyperghost
                                  last edited by 9 Sept 2020, 13:23

                                  @cyperghost so i did a shutdown via emulation station, and the picase light went off, but the pi stayed on. I then used the power switch to turn if off, but instead it boots it back up.

                                  C 1 Reply Last reply 9 Sept 2020, 13:28 Reply Quote 0
                                  • C
                                    cyperghost @campbell87
                                    last edited by cyperghost 9 Sept 2020, 14:30 9 Sept 2020, 13:28

                                    @campbell87 This is impossible! I have the impression that your case is faulty. There is never a powercut done in this constellation!

                                    Everything worked as suggested:

                                    1. Picase light goes off
                                    2. Pie stays on (red light) Important and correct behaviour
                                    3. You press the powerswitch and it boots???? That's wrong - it should go off then

                                    This is telling me that GPIO4 was never set to off and the whole thing still keeps powered on.

                                    C 1 Reply Last reply 9 Sept 2020, 13:38 Reply Quote 0
                                    • C
                                      campbell87 @cyperghost
                                      last edited by 9 Sept 2020, 13:38

                                      @cyperghost Yea, so i connected the power when the picase swtich was on, and the safe shutdown switch was on. I then shut down emulation station. The case light went off, and there was a steady red light on the pi.

                                      I then turned the power switch on the picase to off, and it booted up and loaded into emulation station.

                                      2nd thing i tried was leave the picase on and safe shutdown switch on, and then connect the power. Once i was in emulation station, i turned off the power switch on the case, the light on the case was flashing, script ran, and case went off for a few seconds, then booted back up again.

                                      Tried same on both my pi devices.

                                      1 Reply Last reply Reply Quote 0
                                      • C
                                        cyperghost
                                        last edited by cyperghost 9 Sept 2020, 14:45 9 Sept 2020, 13:42

                                        @campbell87 Okay then please do following
                                        edit sudo nano /opt/RetroFlag/SafeShutdown.py

                                        Then on Line 31 is os.system("sudo shutdown -r now")
                                        Just write os.system("sudo poweroff") instead

                                        Reboot and let ES boot up, press then the power button - if then there is still a light on the Pi then you can easily get a new housing, it's defnitly wrecked then.

                                        C 1 Reply Last reply 9 Sept 2020, 16:24 Reply Quote 0
                                        • C
                                          campbell87 @cyperghost
                                          last edited by 9 Sept 2020, 16:24

                                          @cyperghost made the change, but still same behaviour :(.

                                          1 Reply Last reply Reply Quote 0
                                          20 out of 26
                                          • First post
                                            20/26
                                            Last post

                                          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.

                                            This community forum collects and processes your personal information.
                                            consent.not_received