Favorites will only save if shutdown by menu option and not via GPIO Shutdown Script
-
Bit of an issue, but not been able to find reference to it by searching.
Just built a Retropie image from the 4.2 image and added my roms.
I can add favourites from any system and they show in my favourites folder.
If i use my GPIO connected switch that runs the shutdown script the favorites ate not saved, but it i use the 'Quit' option in the menu to shut down the favourites are saved.
Is there a way to get them to save via the shutdown script
-
@chillimonster What is your shutdown script exactly?
-
Its the 8BitJunkie script (unsure if he was the originator of it but i use that auto installer)
https://pie.8bitjunkie.net/retropie-shutdown-and-startup-switch-the-easy-way
-
@chillimonster The shutdown script is no probably not closing EmulationStation properly and any modifications done within ES are not saved properly.
Add thesudo killall emulationstation
command in the shutdown script before the actual shutdown command and it should help. -
@mitu is probably correct.
If you use the python script mentioned in that website, you basically callsudo shutdown - halt
without closing down EmulationStation properly. Not sure if doing akillall
is any better though.
Ideally, you'd want to send either F4 or sigint, to trigger the SDL_quit event. -
@mitu said in Favorites will only save if shutdown by menu option and not via GPIO Shutdown Script:
@chillimonster The shutdown script is no probably not closing EmulationStation properly and any modifications done within ES are not saved properly.
Add thesudo killall emulationstation
command in the shutdown script before the actual shutdown command and it should help.@zigurana said in Favorites will only save if shutdown by menu option and not via GPIO Shutdown Script:
@mitu is probably correct.
If you use the python script mentioned in that website, you basically callsudo shutdown - halt
without closing down EmulationStation properly. Not sure if doing akillall
is any better though.
Ideally, you'd want to send either F4 or sigint, to trigger the SDL_quit event.Will give it a go and report back later / over weekend.
-
@chillimonster @Zigurana @mitu
@meleu and me already got a solution through bash script to proper shutdown the Raspberry via button event.
I point to the usefull topic thread - category docs & guides
I see no sense in the usage of this python script... as it always polls for button event and sets no IRQ event, so it is as good as the bash script.
But if you want to use the python script then exchange line with shutdown with a call to the script that contains quit ES and shutdown routine :)
Feel free to ask if there is something unclear.#!/usr/bin/python import RPi.GPIO as GPIO import time import subprocess GPIO.setmode(GPIO.BOARD) # we will use the pin numbering to match the pins on the Pi, instead of the # GPIO pin outs (makes it easier to keep track of things) # use the same pin that is used for the reset button (one button to rule them all!) GPIO.setup(5, GPIO.IN, pull_up_down = GPIO.PUD_UP) oldButtonState1 = True while True: #grab the current button state buttonState1 = GPIO.input(5) # check to see if button has been pushed if buttonState1 != oldButtonState1 and buttonState1 == False: # shutdown subprocess.call("shutdown -h now", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) oldButtonState1 = buttonState1 time.sleep(.5)
-
Hello guys! I would like to suggest the solution I proposed here:
https://retropie.org.uk/forum/topic/12895/ensuring-es-gracefully-finish-and-save-metadata-in-every-system-shutdownLet me know if you guys find some problem.
Cheers!
-
@meleu said in Favorites will only save if shutdown by menu option and not via GPIO Shutdown Script:
Hello guys! I would like to suggest the solution I proposed here:
https://retropie.org.uk/forum/topic/12895/ensuring-es-gracefully-finish-and-save-metadata-in-every-system-shutdownLet me know if you guys find some problem.
Cheers!
Thanks for this - I'll give it a 'bash' later :-)
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.