Mausberry Shutdown Script and EmulationStation/RetroArch
-
So I just had this thought... the Mausberry Circuit relies on a script to shutdown the Pi, and once it receives the signal saying it's completed it turns off the power. This is nice and all, but I think it can be improved upon. Some of us are using the EmulationStation metadata to store things like last played. This information doesn't get written to the files unless you physically shut down ES. If you use a script to just cut the power, I have a feeling this doesn't happen. So might it be possible to add a line to the Mausberry Shutdown Script to actually tell it to shutdown ES prior to completely powering off? I was also thinking of taking this another step forward. Suppose you're in a game. Can we send a command to RetroArch to ESCAPE the game (like Run-Command does via the START+SELECT) and then shut down the system?
I recently had a scare where my filesystem on the SD card became corrupted. Luckily I had a backup just prior to scraping metadata, so I didn't lose much. I had no idea how fragile these things are when constantly powering up and down the Pi. And what purpose would having ES keep track of how many times you play/etc if it doesn't store this information during shutdown? I just feel like even though the shutdown script and Mausberry circuit is definitely an improvement from the 'unplug the power' option, there's gotta be something better we can do.
I was even thinking about adding some lines to the script to cause the LED to blink during this process, so you know it's in the middle of doing something, although I don't know how to do it. I was playing around and did manage to write a script that triggers the LED to come on, and go off (connect the LED to a GPIO data pin rather than a +3v pin) and actually blink, but how can you make it blink during the entire shutdown process?
These are all just spitballing ideas. I'd love to make my system do this, but I don't know if it's really something to implement for a base install for EVERYBODY to have. Not everybody has a Mausberry Circuit, or LEDs. But for my own use, I'd like to do something snazzy. Maybe I'll work on figuring this out as I go. I don't know much about Linux and programming though, so I'll need a little hand holding.
But what do you guys think?
-
Hello, so it is definitely so that the metadata is not saved, if one it off via the power button. Does anyone have experience in whether or not in the Mausberry script something can be changed, that it is properly closed and then the Pi is down?
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.