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

    Mausberry Shutdown Script Doesn't Save Metadata

    Scheduled Pinned Locked Moved ControlBlock, PowerBlock & Co.
    mausberry
    251 Posts 10 Posters 104.8k 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.
    • lostlessL
      lostless @barrymossel
      last edited by

      @barrymossel I'm using 1.7 and it working fine.

      meleuM 1 Reply Last reply Reply Quote 0
      • meleuM
        meleu @lostless
        last edited by

        @lostless said in Mausberry Shutdown Script Doesn't Save Metadata:

        @barrymossel I'm using 1.7 and it working fine.

        Can you post a link to the script you're naming as 1.7?

        Or maybe paste it in ghostbin...

        • Useful topics
        • joystick-selection tool
        • rpie-art tool
        • achievements I made
        lostlessL 1 Reply Last reply Reply Quote 0
        • meleuM
          meleu @barrymossel
          last edited by

          @barrymossel said in Mausberry Shutdown Script Doesn't Save Metadata:

          Is v1.7 still under development?

          This "development" is more about testing than writing code. I would love to have this device to make more tests. I tried some experimentations with @lostless via IRC but it was late night... If you find me at IRC some day feel free to contact me.

          If I find some time I'll write what tests I would like to do...

          • Useful topics
          • joystick-selection tool
          • rpie-art tool
          • achievements I made
          B 1 Reply Last reply Reply Quote 0
          • lostlessL
            lostless @meleu
            last edited by

            @meleu I assumed i was using 1.7. It's what ever the last one @cyperghost posted.

            1 Reply Last reply Reply Quote 0
            • B
              barrymossel @meleu
              last edited by

              @meleu said in Mausberry Shutdown Script Doesn't Save Metadata:

              @barrymossel said in Mausberry Shutdown Script Doesn't Save Metadata:

              Is v1.7 still under development?

              This "development" is more about testing than writing code. I would love to have this device to make more tests. I tried some experimentations with @lostless via IRC but it was late night... If you find me at IRC some day feel free to contact me.

              If I find some time I'll write what tests I would like to do...

              Ah, I thought you didn't figure out how to work around the loop yet. I will check in IRC later!

              lostlessL 1 Reply Last reply Reply Quote 0
              • lostlessL
                lostless @barrymossel
                last edited by

                @barrymossel we didn't. For some reason the inotify was not reading the change on the gpio. So something is up. What's weird though, is when we manually told the pi there was a change to the gpio, the script worked.

                cyperghostC 1 Reply Last reply Reply Quote 0
                • cyperghostC
                  cyperghost @lostless
                  last edited by cyperghost

                  @lostless @barrymossel
                  The version 1.56 could be considerd as 1.70 without the inotify-part. It held all code pieces to detect emulators and to finish them and make ES shutdown properly. It uses the 1.0second endless loop that was introduced in the mausberry script.

                  So @meleu is working on 1.70 to break the loop.
                  I'm also interested in 1.70 not using it as power switch rather as a generell switch. I plan to make a small build and this code would improve much.

                  So meleu will "release" two version.

                  1. A shutdown script with better GPIO detection (inotify)
                  2. A shutdown script with 1.0sec loop as introduced in mausberry

                  Why two versions? Simply the inotify package isn't preinstalled!

                  We can all be happy to have one so extrem gifted coder here in our forum.
                  Thank you meleu!

                  Myself got's only a long breath and is willing to learn something new.

                  1 Reply Last reply Reply Quote 0
                  • CapemanC
                    Capeman
                    last edited by

                    Would using a script like this be possible with the retropie powerblock?

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

                    1 Reply Last reply Reply Quote 0
                    • cyperghostC
                      cyperghost
                      last edited by cyperghost

                      @Capeman

                      Seems so.... But please .... we create annother thread

                      1 Reply Last reply Reply Quote 1
                      • B
                        barrymossel
                        last edited by

                        v1.56 works for me. SCUMMVM shuts down immediately without exiting to ES. Is that correct?

                        lostlessL 1 Reply Last reply Reply Quote 0
                        • lostlessL
                          lostless @barrymossel
                          last edited by

                          @barrymossel the script is supposed to exit back to es then shut down. Check with other emulators and see if it does that. If not, something is wrong

                          1 Reply Last reply Reply Quote 0
                          • B
                            barrymossel
                            last edited by

                            Only ScummVM. Probably because than one was an exception. But I don't know whether this would be expected behavior for ScummVM or not. Guess @meleu will tell ;)

                            meleuM 1 Reply Last reply Reply Quote 0
                            • cyperghostC
                              cyperghost
                              last edited by

                              @barrymossel Please can you use PID detector and check PIDs displayed?
                              Use ps -a and check PIDs?

                              B 1 Reply Last reply Reply Quote 0
                              • meleuM
                                meleu @barrymossel
                                last edited by

                                @barrymossel and post the exact script you're using on ghostbin.com or something.

                                • Useful topics
                                • joystick-selection tool
                                • rpie-art tool
                                • achievements I made
                                1 Reply Last reply Reply Quote 1
                                • CapemanC
                                  Capeman
                                  last edited by

                                  If there's any powerblock users, this code works without a hitch with powerblock also, just a simple file edit. How elegant and simple, you guys are awesome!

                                  Powerblock proper ES shutdown

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

                                  1 Reply Last reply Reply Quote 2
                                  • B
                                    barrymossel @cyperghost
                                    last edited by barrymossel

                                    @cyperghost said in Mausberry Shutdown Script Doesn't Save Metadata:

                                    @barrymossel Please can you use PID detector and check PIDs displayed?
                                    Use ps -a and check PIDs?

                                    Sure, when I get back home. What do you want me to do exactly?

                                    @meleu said in Mausberry Shutdown Script Doesn't Save Metadata:

                                    @barrymossel and post the exact script you're using on ghostbin.com or something.

                                    Sure, will do so in some hours.

                                    cyperghostC 1 Reply Last reply Reply Quote 0
                                    • cyperghostC
                                      cyperghost @barrymossel
                                      last edited by cyperghost

                                      @barrymossel

                                      1. Post code of your current switch bash to ghostbin.com and give us the link
                                      2. Run emulator ScummVM
                                        2.1 Connect with SSH
                                        2.2 Check PIDs (Process ID) during emulator is running
                                        2.2.1 Use PID Detector script
                                        2.2.2 ps - a if PIDs are equal

                                      if PID detector output one number and you type kill PIDNUMBER then the emulator should close :)

                                      Because you said your script (version 1.56) does not work with ScummVM so let us invetigate.

                                      B 1 Reply Last reply Reply Quote 1
                                      • B
                                        barrymossel @cyperghost
                                        last edited by barrymossel

                                        @cyperghost said in Mausberry Shutdown Script Doesn't Save Metadata:

                                        @barrymossel

                                        1. Post code of your current switch bash to ghostbin.com and give us the link
                                        2. Run emulator ScummVM
                                          2.1 Connect with SSH
                                          2.2 Check PIDs (Process ID) during emulator is running
                                          2.2.1 Use PID Detector script
                                          2.2.2 ps - a if PIDs are equal

                                        if PID detector output one number and you type kill PIDNUMBER then the emulator should close :)

                                        Because you said your script (version 1.56) does not work with ScummVM so let us invetigate.

                                        I actually didn't say it "doesn't work" with ScummVM. It just looks like it doesn't exit to ES first, but it looks like it goes straight to shutdown. I am just wondering if that is expected.

                                        But I will do the above in a sec.

                                        --- edit---
                                        https://ghostbin.com/paste/jahru

                                        2335 vs. 2336

                                        pi@retropie:~ $ bash pidtest.sh
                                        
                                        An emulator is currently running!
                                        It's PID is: 2335
                                        
                                        EmulationStation is runnuning!
                                        ES's PID is: 1008
                                        pi@retropie:~ $ ps -a
                                          PID TTY          TIME CMD
                                          992 tty1     00:00:00 bash
                                          997 tty1     00:00:00 bash
                                          998 tty1     00:00:00 emulationstatio
                                         1005 tty1     00:00:00 emulationstatio
                                         1008 tty1     00:00:46 emulationstatio
                                         2245 tty1     00:00:00 sh
                                         2246 tty1     00:00:00 bash
                                         2335 tty1     00:00:00 bash
                                         2336 tty1     00:00:21 scummvm
                                         3415 pts/0    00:00:00 ps
                                        pi@retropie:~ $
                                        

                                        And another test: 6901 vs 6902

                                        pi@retropie:~ $ bash pidtest.sh
                                        
                                        An emulator is currently running!
                                        It's PID is: 6901
                                        
                                        EmulationStation is runnuning!
                                        ES's PID is: 1008
                                        pi@retropie:~ $ ps -a
                                          PID TTY          TIME CMD
                                          992 tty1     00:00:00 bash
                                          997 tty1     00:00:00 bash
                                          998 tty1     00:00:00 emulationstatio
                                         1005 tty1     00:00:00 emulationstatio
                                         1008 tty1     00:01:52 emulationstatio
                                         6815 tty1     00:00:00 sh
                                         6816 tty1     00:00:00 bash
                                         6901 tty1     00:00:00 bash
                                         6902 tty1     00:00:26 scummvm
                                         8210 pts/0    00:00:00 ps
                                        pi@retropie:~ $
                                        
                                        cyperghostC 1 Reply Last reply Reply Quote 1
                                        • cyperghostC
                                          cyperghost @barrymossel
                                          last edited by cyperghost

                                          @barrymossel
                                          You see PID Detector says an emulator is running with PID xxxx.

                                          What happens if you kill that PID with kill xxxx and can you also enter output of ps -a after the kill command?

                                          The script is v 1.56! So it's the newest version.

                                          1 Reply Last reply Reply Quote 0
                                          • B
                                            barrymossel
                                            last edited by

                                            pi@retropie:~ $ kill 6901
                                            pi@retropie:~ $ ps -a
                                              PID TTY          TIME CMD
                                              992 tty1     00:00:00 bash
                                              997 tty1     00:00:00 bash
                                              998 tty1     00:00:00 emulationstatio
                                             1005 tty1     00:00:00 emulationstatio
                                             1008 tty1     00:01:54 emulationstatio
                                             6902 tty1     00:01:00 scummvm
                                            10250 pts/0    00:00:00 ps
                                            

                                            So ScummVM keeps running. I guess, as expected.

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