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

    Metadata not saving with nespi case

    Scheduled Pinned Locked Moved Help and Support
    metadata issuesnespi casemeleuyahmez
    20 Posts 5 Posters 3.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.
    • V
      Vaca2097
      last edited by

      Okay so I am working with an rpi 3b, running retropie 4.3.7 inside of a nespi case. Following Yahmez's instructions I modded the case to enable soft shutdown /reset and set it up with his Python script. Works great but I soon realized it wasn't saving Metadata on shutdown. So after some digging I found meleu's shutdown service and attempted that.

      Now I'm stuck. I followed the instructions word for word multiple times and it just doesn't seem to be doing anything. Not even that issue with the power led staying on for some time after shutting down. No doubt I'm missing something but not sure what. The only part I wasn't sure of was the creation of killes.service. It says it must be done with super user privileges. I used the sudo command, is this sufficient?

      What about adding a wait command into the python script so the system has time to save before shutting down? I tried this but my understanding of Linux is embarrassing. Don't really know what I'm doing.

      jonnykeshJ 1 Reply Last reply Reply Quote 0
      • jonnykeshJ
        jonnykesh @Vaca2097
        last edited by

        @vaca2097 The only way to save metadata is to cleanly exit Emulation Station via the main menu. Any other method will result in any scraped info being lost. You could restart ES after scraping, that would save the data and then you could shutdown with the button.

        V cyperghostC 2 Replies Last reply Reply Quote 0
        • V
          Vaca2097 @jonnykesh
          last edited by

          @jonnykesh I have not yet tested scraping because games were scraped prior to setting up with the nespi case. However I plan to use the selph scraper which I think has to run without ES anyways. The issue I've been seeing is that favorites (aside from the very first one I chose) and play count are not saving. I know in Yahmez's script it uses shutdown - h now. Is that not sufficient for a clean shutdown?

          jonnykeshJ 1 Reply Last reply Reply Quote 0
          • jonnykeshJ
            jonnykesh @Vaca2097
            last edited by

            @vaca2097 shutdown -h now is not a clean exit from ES. There is a thread on it here recently. Link https://retropie.org.uk/forum/topic/12895/ensuring-es-gracefully-finish-and-save-metadata-in-every-system-shutdown

            1 Reply Last reply Reply Quote 0
            • V
              Vaca2097
              last edited by

              Thank you for taking the time and the link. Unfortunately that was the script I had attempted to make work but have had no luck. Does anyone have any more ideas by chance?

              jonnykeshJ 1 Reply Last reply Reply Quote 0
              • jonnykeshJ
                jonnykesh @Vaca2097
                last edited by

                @vaca2097 I would say to give meleu a shout by tagging him on the thread, he is usually responsive and more than willing to help if he has the time.

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

                  @jonnykesh said in Metadata not saving with nespi case:

                  @vaca2097 The only way to save metadata is to cleanly exit Emulation Station via the main menu. Any other method will result in any scraped info being lost. You could restart ES after scraping, that would save the data and then you could shutdown with the button.

                  Sorry, this isn't true. The trick is to create a specific file to /tmp and then send TERM-signal to ES binary only.
                  Mainly @meleu and @cyperghost (and other testers) did a hard work to invoke these commands and as an essence of this meleu developed the nice ES shutdown service.

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

                    @cyperghost shouldn't we post the link? :D
                    https://retropie.org.uk/forum/topic/12895/ensuring-es-gracefully-finish-and-save-metadata-in-every-system-shutdown

                    • Useful topics
                    • joystick-selection tool
                    • rpie-art tool
                    • achievements I made
                    V 1 Reply Last reply Reply Quote 2
                    • V
                      Vaca2097 @meleu
                      last edited by

                      @meleu I have gone through making the shutdown script several times and for the life of me it doesn't seem to be doing anything. Will it show a message during shutdown that I should be seeing? If I can't get it to work am I risking corruption using shutdown -h now as part of th soft shutdown script?

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

                        Oh... sorry, I didn't read your OP before :)

                        @vaca2097 said in Metadata not saving with nespi case:

                        Will it show a message during shutdown that I should be seeing?

                        Nop.

                        If I can't get it to work am I risking corruption using shutdown -h now as part of th soft shutdown script?

                        No data corruption when using shutdown -h. Not at all.

                        Also, if you used my method correctly even a shutdown -h would save ES metadata.

                        Please, connect to your pi via SSH. Then perform the commands below and copy'n'paste the output of eache one to a text file. And finally paste the file's content on dumptext.com and post the link here.

                        ls -l /etc/killes.sh
                        cat /etc/systemd/system/killes.service
                        sudo systemctl enable killes
                        
                        • Useful topics
                        • joystick-selection tool
                        • rpie-art tool
                        • achievements I made
                        V 1 Reply Last reply Reply Quote 0
                        • V
                          Valhalla_Pi
                          last edited by

                          Does this only happen for freshly scraped roms? like do a regular quit, shutdown after scraping then can you use the power down button scripted?

                          Or does that delete everthing that was saved on the safe shutdown?

                          1 Reply Last reply Reply Quote 0
                          • V
                            Vaca2097 @meleu
                            last edited by

                            @meleu sorry for the delay, family stuff. Copied the commands exactly as you have them and this is what I have. http://dumptext.com/52QE0b16#

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

                              @vaca2097 one of those commands were wrong (my fault). Can you try it and post again?

                              the command I'm interested now is:

                              cat /etc/systemd/system/killes.service
                              
                              • Useful topics
                              • joystick-selection tool
                              • rpie-art tool
                              • achievements I made
                              V 2 Replies Last reply Reply Quote 0
                              • V
                                Vaca2097 @meleu
                                last edited by

                                @meleu ah gotcha. Here you go. http://dumptext.com/mR3shHLX

                                1 Reply Last reply Reply Quote 0
                                • V
                                  Vaca2097 @meleu
                                  last edited by

                                  @meleu any ideas on what I can do?

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

                                    @vaca2097 please, do the following:

                                    1. boot up your RetroPie and wait for EmulationStation
                                    2. add some games to your Favorites
                                    3. go to another computer and connect to your pi via SSH
                                    4. perform this command: bash -x /etc/killes.sh 2> debug.txt (it will kill your EmulationStation)
                                    5. that command generates a the file debug.txt, grab this file and paste its content in dumptext.com
                                    6. restart your pi (sudo shutdown -r now) and check if your Favorites were saved.

                                    post here the dumptext link with that debug file.

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

                                      Okay this is what I found http://dumptext.com/NGD4cO7u

                                      1 Reply Last reply Reply Quote 0
                                      • V
                                        Vaca2097 @meleu
                                        last edited by

                                        @meleu was that the right file? I can't really make any sense of it.

                                        1 Reply Last reply Reply Quote 0
                                        • V
                                          Vaca2097
                                          last edited by

                                          bump

                                          1 Reply Last reply Reply Quote 0
                                          • V
                                            Vaca2097
                                            last edited by Vaca2097

                                            Does anyone have any further suggestions before I give up on this?

                                            1 Reply Last reply Reply Quote 0
                                            • 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.