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

    Installed a power button but there is a problem

    Scheduled Pinned Locked Moved Help and Support
    powerbuttonsaving
    5 Posts 4 Posters 1.9k 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.
    • Z
      Zeref2016
      last edited by

      Hi there, I added a power button to my retropie, following this tutorial:


      The button works great, the problem i am having is that when i press the button noting i've done is being saved. I've scraped a few roms, and then pressed the power off button. When i turned it back on the rom meta data was back to what was before without the scrapped data. Not only is meta data not saved, but any game progress is also not saved. I know it saves fine when i press start + select and go to quit then shutdown. Can someone please help me! This is causing a huge problem, and making the point of the button useless.

      Right now, when i press the button, it runs a script that basically sends "shutdown -h now" to the terminal.
      Can someone please help me with this? Should it be executing a different command to the terminal?

      synackS markyh444M 2 Replies Last reply Reply Quote 0
      • synackS
        synack @Zeref2016
        last edited by synack

        @Zeref2016 Simply don't use your power button if you were scraping meta data during that session.

        Long story short, shutting down emulationstation with the power button (instead of via the menus) will prevent it from writing out the gamelist xml data.

        1 Reply Last reply Reply Quote 0
        • markyh444M
          markyh444 @Zeref2016
          last edited by

          @Zeref2016 as @synack says, in order for XML files to save correctly if you've scraped metadata, you need to exit, restart or shut down Emulation Station from the GUI menu rather than using your button. As the button just runs the shutdown, it doesn't give ES chance to write it's data before closing.

          Using your power switch when not changing metadata is fine though, and is what I do when using my modded NES.

          Retropie in a NES - Pi 3 with Mausberry circuit shutdown switch wired to buttons and 8bitdo NesPro30 controller
          Retropie in a Saturn Controller - Pi Zero, GPIO controls using DB9 driver
          Retropie in a PSX - Pi3
          https://markyh444.wordpress.com

          1 Reply Last reply Reply Quote 0
          • N
            noon
            last edited by

            Is it possible to adjust the shutdown script such that it will write the gamelist xml data first?

            I'm using a non-working NES case for my upcoming Retropie project, and will be using the Mausberry circuit to make the original power/reset buttons work. My plan is to use the script that Mausberry supplies, but could this script be modified to save the gamelist data?

            synackS 1 Reply Last reply Reply Quote 0
            • synackS
              synack @noon
              last edited by

              @noon That would probably require ES to be modified to either catch a SIGTERM signal and perform its normal shutdown procedures, or could have it check for the existence of a trigger file to shut down. Either of which are not very difficult to implement.

              Perhaps you can post this suggestion in the Ideas and Development section of the forum.

              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.