Turn off retropie safely?
-
@rbaker If I shutdown emulationstation, my Pi is still on, and I don't know any other way to start up retropie again than pulling in and out the poser cord
-
@TheBear123 You have a number of options available:
I have my RPi3 plugged into a power strip with an on/off switch so when I shut down RetroPie from the menu I can then turn it off from the power strip. Flipping the switch back on restarts the system.
For my wireless music streamer (running Pi MusicBox) I placed a USB on/off button between the ac adapter and the RPi3 itself. If I need to power it down I shut it down via the menu (not unlike in RetroPie) then hit the switch. https://www.amazon.com/LoveRPi-MicroUSB-Switch-Raspberry-Female/dp/B018BFWLRU
You can install a number of different buttons that via the GPIO pins and some simple scripting will power down the RPi for you though I think they still have power running into them so when you hit the button it boots up the system. Or small circuit boards like the PowerBlock: https://blog.petrockblock.com/powerblock/
There's also the Borkin Button which uses the headphone jack, a small soldering job, and some scripting to shut down the system. @ETAPrime did a video on this:
Ultimately, pulling the power off a running RPi is the last thing you should do as it's likely to corrupt the SD card, which sounds like you've experienced before. But with many alternative options out there to safely stop/start your system you should be right as rain in no time.
-
I've had no issues with my hard shutdowns of the system, works flawlessly everytime after those. But, I myself would prefer of having this sort of safe shutdown gear, that shuts and powers the system during that process, when you cut the main power off. Is there something like that available ?
-
@DD-Indeed
see the PowerBlock:
https://blog.petrockblock.com/powerblock/
or the ControlBlock
https://blog.petrockblock.com/controlblock/ -
So those work, even when I literally shut it down hardly, meaning that the power coming from the USB cable cuts ?
Edit: What I have in my mind is that there should be this device, that starts the shutdown operation, whenever the main power coming to the device shuts down and would have enough power to finish the shutdown process.
-
@DD-Indeed The voltage from the power supply will be connected to the PowerBlock or ControlBlock. Both boards will then supply the power to the RPi via GPIO pins. Both board have a provisions to connect a switch which you can either turn the power On or Off to the RPi. When the switch is set to Off, while the Pi is on, it will complete the shutdown process.
If you are looking for automate the shutdown process, as for an example a power failure or blackout, then you will need to rig a UPS (Uninterruptable Power Supply). The UPS will give you a few minutes to literally shutdown the PI.
-
@ortsac said in Turn off retropie safely?:
If you are looking for automate the shutdown process, as for an example a power failure or blackout, then you will need to rig a UPS (Uninterruptable Power Supply). The UPS will give you a few minutes to literally shutdown the PI.
That's exactly what should be available for these sort of devices. Meaning that whenever the main power cuts off suddenly, there would be this device, that triggers shutdown process immediately and has enough energy stored to do it.
-
When I turn it off, the SD-card gets corrupt. This happens no matter if it is by pulling the power out or shutdown it using options/quit or "sudo shutdown"
-
Well that sounds definitely about faulty SD card. Get a new one and test it out again.
-
@DD-Indeed said in Turn off retropie safely?:
@ortsac said in Turn off retropie safely?:
..for automate the shutdown process [...] then you will need to rig a UPS (Uninterruptable Power Supply). The UPS will give you a few minutes to literally shutdown the PI.
That's exactly what should be available for these sort of devices. Meaning that whenever the main power cuts off suddenly, there would be this device, that triggers shutdown process immediately and has enough energy stored to do it.
You can rig something with a bunch of supercapacitors, e.g. Juice4Halt
-
Or basically, having a small battery alongside the Raspi. Theoretically, it could be pretty simple to create:
Battery, that gives exact 4.7V.
Custom commands to Raspi to trigger shutdown process, once the voltage drops below 4.75V (IE, when the main power line shuts down and the voltage drops from normal 5-5.1V to the battery voltage).
And Battery would charge up in every time you use/start Raspi for some time, or could be charged separately in short time.
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.