Method to not lose SRM states and other (meta-)data
You should never “yank” the power cord out of your Pi as this can lead to severe data corruption (and in some cases, physically damage your SD card). Even if BATOCERA is best prepared against file corruption it is recommended to safely shut down your Pi via BATOCERAs Quit Menu or even better, use a power button or switch.
This method gives the best user experience if you use the GPi-case from Retroflag for example. This nice housing only gots one button switch to simply turn on/off the Raspberry. Since BATOCERA 5.25 the OS is best prepared for all kinds of power devices connected to the Raspberry. But you will lose your game SRM state (Battery save) if you just trigger the power button INSIDE a game session.
How to
- Prepare the script down under
- Save this to
/userdata/system
- Set executable bit with
chmod +x /userdata/system/custom.sh
- Setup your power device according to this guidance
- custom.sh
#!/bin/bash # custom.sh - place to /userdata/system # by cyperghost 23/11/19 # if [[ $1 == stop ]]; then batocera-es-swissknife --emukill fi
Things to know
- method_to_not_lose_srm_states_and_other_meta-_data.txt
- Last modified: 13 months ago
- by lala