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

    Retroarch not writing SRM files when closing

    Scheduled Pinned Locked Moved Help and Support
    retroarchsrmsave
    9 Posts 2 Posters 1.7k 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.
    • B
      Bok
      last edited by

      When I save in a game(SNES in this case), close retroarch by pressing start+select, then turn off the raspberry pi by pressing a switch(cutting off the power) in the retropie menu, my saves are reverted to the last successfully written srm state. Sometimes this happens, sometimes it doesn't and it saves successfully.

      I have tried setting the srm save interval to 10 and this still happens. I am closing the retroarch emulator correctly, therefore the srm should be saved to the SD card. Turning off the raspberry pi at the power while the game is running(just running, not in the middle of a save) has also completely deleted my save game once.

      I am using a raspberry pi 4 B.

      1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator
        last edited by

        Shutdown your Pi from the EmulationStation menu, not by cutting off the power.

        B 1 Reply Last reply Reply Quote 0
        • B
          Bok @mitu
          last edited by

          @mitu Okay, do you believe that would be causing it? If so, why?

          1 Reply Last reply Reply Quote 0
          • mituM
            mitu Global Moderator
            last edited by

            Shutting down your Pi can cause SD filesystem corruption, leading to all sorts of errors with missing or incompletely saved files. Try shutting down your system from EmulationStation and see if you still get the error.

            B 1 Reply Last reply Reply Quote 0
            • B
              Bok @mitu
              last edited by

              @mitu It seems to consistently save when doing this. Thanks!

              What about crashes/power losses? Do we just risk losing save progress, even if the game is not currently saving?

              1 Reply Last reply Reply Quote 0
              • mituM
                mitu Global Moderator
                last edited by mitu

                @Bok said in Retroarch not writing SRM files when closing:

                What about crashes/power losses? Do we just risk losing save progress, even if the game is not currently saving?

                Yes, there's always a risk of losing saves/files if something crashes or the power gets cut off, just like for every other computer system.

                B 1 Reply Last reply Reply Quote 0
                • B
                  Bok @mitu
                  last edited by

                  @mitu Yeah, fair enough. It just seems strange that I would save, quit the emulator(presumably it's done with the srm file after this), and still lose the data.

                  Is there any existing functionality to automatically back up saves? I assume probably not.

                  1 Reply Last reply Reply Quote 0
                  • mituM
                    mitu Global Moderator
                    last edited by

                    @Bok said in Retroarch not writing SRM files when closing:

                    Is there any existing functionality to automatically back up saves? I assume probably not.

                    Not built in, but you can always add a few script to do so. But no matter how you back-up or not your data, just cutting the power to your Pi is not recommended.

                    B 1 Reply Last reply Reply Quote 0
                    • B
                      Bok @mitu
                      last edited by

                      @mitu Yeah, I meant just for the cases that I can't control. I'll be shutting it down properly from now on. Thanks for the help!

                      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.