Post count: 4

I had to enable autosaving in the Retroarch config file before this worked (from the retroarch sample conf):

# Automatically saves a savestate at the end of RetroArch’s lifetime.
# The path is $
# RetroArch will automatically load any savestate with this path on startup.
# savestate_auto_save = false

So adding ‘savestate_auto_save = true’ to ~/RetroPie/configs/all/retroarch.cfg will tell retroarch to automatically save the SRAM when exiting.