Batocera.linux - Wiki

Only Cores That Matter

User Tools

Site Tools


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

  1. Prepare the script down under
  2. Save this to /userdata/system
  3. Set executable bit with chmod +x /userdata/system/
  4. Setup your power device according to this guidance
# - place to /userdata/system
# by cyperghost 23/11/19
if [[ $1 == stop ]]; then
    batocera-es-swissknife --emukill

Things to know

method_to_not_lose_srm_states_and_other_meta-_data.txt · Last modified: 2020/02/07 22:15 by lala