Retroarch not writing SRM files when closing
-
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.
-
Shutdown your Pi from the EmulationStation menu, not by cutting off the power.
-
@mitu Okay, do you believe that would be causing it? If so, why?
-
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.
-
@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?
-
@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.
-
@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.
-
@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.
-
@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!
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.