Need simple solution for Favorites not saving
-
There are a number of very large topics in the forum on this, but I have not been able to find a simple solution for my simple setup. I'm not using any shutdown scripts (currently) or power button setups or anything. I've made sure the option to save metadata is turned on.
Sometimes I choose shut down or restart from Emulation Station. Sometimes I just flip the switch on the power strip (or smart plug) that's powering my Pi. But no matter what, I can't get a guarantee that my favorites will remain, which is really annoying after spending hours marking favorites.
I have the latest Pi 3B. Can anybody help?
-
Please add more info about your system - https://retropie.org.uk/forum/topic/3/read-this-first.
There are a number of very large topics in the forum on this.
Where ? Can you give an example ?
No metadata will be saved if you shutdown your PI by cutting the power, including favorites. If you want the favorites to be saved, you either shutdown your system using the Emulationstation menu or have some sort of graceful shutdown method (like a shutdown switch/button attached to the GPIOs). In any case, cutting the power to the PI is not recommended.
Get the Emulationstation log in
/home/pi/.emulationstation/es_log.txt
(also available as\\retropie\configs\all\emulationstation\es_log.txt
and see if you spot any errors. Try to reproduce the error and then look in the file (or the previous log file, which should be calledes_log.txt.bak
). -
Like this:
https://retropie.org.uk/forum/topic/16478/metadata-not-saving-favorites-will-never-remain-tagged
There are no errors in the log that I see.
Would cutting power delete favorites that have been added and were already successfully showing in the favorites list after an Emulation Station "soft" restart? Because that happened to me once I think.
-
@strells said in Need simple solution for Favorites not saving:
Like this:
https://retropie.org.uk/forum/topic/16478/metadata-not-saving-favorites-will-never-remain-tagged
That topic is about a shutdown script that will cleanly stop Emulationstation so that metadata is saved. The poster managed to integrate his/her shutdown button with a script and it solved the problem.
There are no errors in the log that I see.
Would cutting power delete favorites that have been added and were already successfully showing in the favorites list after an Emulation Station "soft" restart?
Please don't cut the power and expect things to be ok. You SD card may suffer corruption and you may encounter other issues.
Because that happened to me once I think.
Get the logs when you can reproduce this issue reliably, then we might find if it's a software bug/problem.
-
OK, so what should be my order of operations if I want to shut down the power to my cabinet? Use the shut down in ES and then power off Pi?
-
@strells Use the shutdown menu in Emulationstation and that's it. Do you have an additional power switch attached to the Pi ? If yes, power if to off after the shutdown.
-
@mitu Hello, I've looked at a number of suggestions on this and still can't seem to get it right. I can't seem to get my retropie to save favorites and last played games. I know how to set it up in retropie, but when I exit, I get the error messages:
Error parsing XML file "/home/pi/.emulationstation/gamelists/mame-libretro/gamelist.xml"! no document element found
I'm confused about either permission rights or the file not existing. Is there an easy solution to this that someone can recommend so I don't corrupt my SD card or brick my raspberry pi?
Much appreciated in advance and thanks!
-
@kelkyko said in Need simple solution for Favorites not saving:
I get the error messages
That error message is from the start-up, it's only shown on the screen when you exit.
Please add some info about your system, as detailed in https://retropie.org.uk/forum/topic/3/read-this-first
-
@mitu The error only shows up on exit; it does not appear there are errors on startup. I'm using a raspberry pi 3 b+. I can't tell what version of retropie is running, but I believe is 4.1. The linux version is 4.14.
-
@mitu It boots up normally and then I go in and create favorites. The folder gets created, and I can see the games I save there in emulation station. But then when I exit normally (either quit emulation station or reboot it within emulation station, once it is back up there are no favorites.
-
@kelkyko You haven't provided all the information asked in https://retropie.org.uk/forum/topic/3/read-this-first. Are you using a 3rd party image or you installed from the image at retropie.org.uk/download ?
-
@mitu I'm sorry. I'm really confused by all the information I need to provide. No I'm not using a 3rd party image. I am using a Raspberry pi power source.
-
@kelkyko The favorites are saved in the file
gamelist.xml
. The gamelists are saved either in~/.emulationstation/gamelists/[SYSTEM_NAME]/
or~/.emulationstation/gamelists/[SYSTEM_NAME]/
, depending if and how you scraped the games' information. [SYSTEM_NAME] is the resp. directory in ~/RetroPie/roms, the~
is the shorthand symbol for the current user's home directory, e.g. /home/pi.I would check if the gamelist of the system in question is saved correctly after changing the favorites and quitting Emulation Station (ES).
- Mark some games as favorites, e.g. in the
arcade
system. - Exit ES via the Main Menu or by pressing
F4
. - Enter the following commands. Everything behind a
#
is just a comment.
sudo apt install xmlstarlet # install xmlstarlet if it's not already installed (needs internet access!) cd ~/RetroPie/roms/arcade # change to the system's rom directory ls -l gamelist.xml # list the time the gamelist file was last changed xmlstarlet sel -t -m "/gameList/game[favorite='true']" -v name -n <gamelist.xml # display all games with the <favorite> tag set to "true"
The gamelist's modification time should match the moment when you left ES. The fourth command should lists the games that you marked as favorites before. The success or failure of these commands may help us to pin down the source of the problem.
Enter
exit
to leave the command console and return to ES.edit: Some additions and corrections I forgot, my apologies.
- Mark some games as favorites, e.g. in the
-
@clyde thanks for the reply. when I type ls -1 gamelist.xml it says "ls: cannot access "gamelist.xml': No such file or directory
-
@kelkyko Then it might be in the alternative location
~/.emulationstation/gamelists/arcade
. Try that path after thecd
command. If the error occurs again, show us the output of the second of these commands (but execute both in that order):sudo updatedb locate gamelist.xml
Just to be sure, you are using the correct system in the path? (
arcade
or wherever else your roms reside in).
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.