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

    Safe One Button Shutdown for Retropie/Retroarch/Raspberry Pi

    Scheduled Pinned Locked Moved Help and Support
    shutdown scriptone buttonmetadata issues
    4 Posts 3 Posters 922 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.
    • R
      robertm
      last edited by

      Hi,
      I am trying to make a safe one button shutdown for my arcade running Retropie, retroarch,Mame lr-2003 on a RPi4 with Canakit power supply, 32GB SD card, arcade controls, etc.

      Multiple people have posted on this but I can find no clear answer.

      I connected a momentary button to pins 5 and 6 (ground) on the RPi, added "dtoverlay=GPIO-shutdown" to the config.txt file, and rebooted the machine.

      When pressed the system logs itself off (OK Standby but then I can flip a switch (unplug) the unit for complete shutoff)

      Question 1) I have read that pressing this button causes "metadata to not be saved/lost." Is this correct? If a ROM (OR even just idle in Emulation Station...) is running when the button is pushed, does this cause data loss?? And if it does....

      Question 2) What data is lost? The only thing I care about are the High Scores for the games, and not corrupting the SD Card, and....

      Question3) Is there a software only script I can put somewhere that would shutdown down ES and then the RPi4 correctly for No data loss????

      Thanks!
      Rob

      ExarKunIvE 1 Reply Last reply Reply Quote 0
      • ExarKunIvE
        ExarKunIv @robertm
        last edited by

        @robertm this is the one i have used and i have not come across any problems with it

        https://github.com/crcerror/ES-generic-shutdown

        RPi3B+ / 200GB/ RetroPie v4.5.14, RPi4 Model B 4gb / 256gb / RetroPie 4.8.2
        RPi5 4gb / 512gb / RetroPie 4.8.9 -Basic
        Maintainer of RetroPie-Extra .

        WeirdHW 1 Reply Last reply Reply Quote 1
        • R
          robertm
          last edited by

          I appreciate the reply but have nowhere near the technical background to understand let alone impliment those instructions. I am a complete tech noobie.

          Is what I have done (momentary button to pins 5 and 6 (ground) on the RPi, added "dtoverlay=GPIO-shutdown" to the config.txt file) going to cause data loss when used?????

          Thanks,

          Rob

          1 Reply Last reply Reply Quote 0
          • WeirdHW
            WeirdH @ExarKunIv
            last edited by

            @ExarKunIv said in Safe One Button Shutdown for Retropie/Retroarch/Raspberry Pi:

            @robertm this is the one i have used and i have not come across any problems with it

            https://github.com/crcerror/ES-generic-shutdown

            Seconded. Once you configure it, it works like a charm. I can even shutdown safely while a game is still running.

            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.