• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
RetroPie forum home
  • Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login

Powerblock proper ES shutdown

Scheduled Pinned Locked Moved ControlBlock, PowerBlock & Co.
powerblockmausberrshutdownswitch
24 Posts 6 Posters 12.1k 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
    cyperghost @Capeman
    last edited by cyperghost 8 Jan 2017, 05:01 1 Aug 2017, 04:01

    @capeman It wasn't possible withouth the great work @meleu and his RegEx hacks.

    1 Reply Last reply Reply Quote 1
    • P
      petrockblog Global Moderator
      last edited by 1 Aug 2017, 08:37

      You are doing awesome work here!
      Do you think that the PowerBlock driver in the repository should be modified or extended in any way?

      C C 2 Replies Last reply 1 Aug 2017, 11:09 Reply Quote 1
      • C
        Capeman @petrockblog
        last edited by Capeman 8 Jan 2017, 12:10 1 Aug 2017, 11:09

        @petrockblog I would vote yes on this! It works flawlessly with ES and retroarch. It is such a simple update to the .sh file and even if doesn't clean exit a non retroarch emulator, it will still exit the old fashioned way and clean exit ES for meta save. So either way it seems pretty harmless.

        Vector Artist, Designer and Maker of Stuff: Laser Cut Atari / Pixel Theme Bartop

        1 Reply Last reply Reply Quote 0
        • C
          cyperghost @petrockblog
          last edited by 1 Aug 2017, 15:28

          @petrockblog said in Powerblock proper ES shutdown:

          You are doing awesome work here!

          This one has several fathers.

          Do you think that the PowerBlock driver in the repository should be modified or extended in any way?

          Well ... I think the usecase must be cleared. I'm not sure if everybody will take case in the use of emulators. So I would rather prefer you take this sniplet and push it to your github and let the user get the choice to download/use it during driver installation.

          @meleu What is your opinion?

          M 1 Reply Last reply 1 Aug 2017, 15:57 Reply Quote 0
          • M
            meleu @cyperghost
            last edited by 1 Aug 2017, 15:57

            @cyperghost

            @meleu What is your opinion?

            Well. I got my ego massage receiving a compliment from the RetroPie's creator. :-)

            Oh... You're talking about modifying/extending the PowerBlock's driver in the repo... Well, what we made here is very specific for a RetroPie-EmulationStation setup. Some people use Attract Mode and at some point others will use Pegasus, and maybe there are PowerBlock owners that don't even run RetroPie.

            Maybe you can put this code in the repo as an option, not as default.

            That is my opinion.

            • Useful topics
            • joystick-selection tool
            • rpie-art tool
            • achievements I made
            P 1 Reply Last reply 2 Aug 2017, 07:51 Reply Quote 0
            • P
              petrockblog Global Moderator @meleu
              last edited by 2 Aug 2017, 07:51

              @meleu I agree. I will put that script into the repository as alternative shutdown script. Thanks!

              C 1 Reply Last reply 3 Aug 2017, 19:20 Reply Quote 2
              • C
                cyperghost @petrockblog
                last edited by cyperghost 8 Mar 2017, 20:46 3 Aug 2017, 19:20

                @petrockblog
                There's a update to the code!

                Version 1.59 --- I update forst posting!

                Version 1.58 Introduced a method to kill child processes via PPID @cyperghost
                Version 1.59 is a code polishing done by @meleu

                S 1 Reply Last reply 9 Feb 2021, 15:20 Reply Quote 0
                • S
                  SaturnX @cyperghost
                  last edited by 9 Feb 2021, 15:20

                  @cyperghost @petrockblog

                  I know this topic a bit old - but I wanted to ask if this is still the best approach for a proper shutdown of a RetroPie/EmulationStation/PowerBlock combo?

                  @petrockblog you mentioned above that you were going to add this into your repo, but it looks like it's not there?

                  I just installed the PowerBlock on my Pi4 last night and it's working well, but I just wanted to add the proper shutdown of ES.

                  Thanks! Apologies for reviving an old thread.

                  L 1 Reply Last reply 10 Feb 2021, 20:48 Reply Quote 0
                  • L
                    lostless @SaturnX
                    last edited by 10 Feb 2021, 20:48

                    @saturnx
                    @cyperghost has released a full power, exit script that works for many power options a while ago. It’s generic and just have to run certain tags from it to get the result you want.
                    https://github.com/crcerror/ES-generic-shutdown

                    S 1 Reply Last reply 11 Feb 2021, 14:54 Reply Quote 0
                    • S
                      SaturnX @lostless
                      last edited by 11 Feb 2021, 14:54

                      @lostless Thanks!

                      I've seen that, but when using the PowerBlock, that script would be overkill since the PowerBlock driver already handles monitoring of the status of the switch and simply calls etc/powerblockswitchoff.sh

                      So really all that's necessary is ensuring the proper shutdown calls are made within that script to ensure the safe shutdown of ES, etc..

                      I'll dig through the generic script and compare - just wanted to check in to see there had been any updates/improvements or other best practices for shutting down ES gracefully.

                      L 1 Reply Last reply 11 Feb 2021, 18:40 Reply Quote 0
                      • L
                        lostless @SaturnX
                        last edited by lostless 2 Nov 2021, 19:05 11 Feb 2021, 18:40

                        @saturnx all you really have to do is, I think, is point to a Different file in that call. No need to edit the powerblockswitchoff.sh file.
                        Change the main script to be the SHUTDOWNSCRIPT= to
                        /home/pi/RetroPie/scripts/multi_switch.sh --es-poweroff
                        After you install the generic multi switch script. You don’t have to start it as boot up. Just install it where it says to install according to the get hub page and you can use it. No need to use the the scripts ability to sense a switch
                        Test it out and see if it works.

                        S 1 Reply Last reply 14 Feb 2021, 13:25 Reply Quote 1
                        • S
                          SaturnX @lostless
                          last edited by 14 Feb 2021, 13:25

                          @lostless thanks!

                          Took a slightly different approach and called the multi-switch shutdown script from etc/powerblockswitchoff.sh So that I’d keep the main driver intact.

                          Thanks again! This was something so simple that I overlooked. Totally missed that the script could issue the necessary ES shutdown without tying it to a physical switch.

                          1 Reply Last reply Reply Quote 1
                          • First post
                            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