Powerblock proper ES shutdown
Capeman last edited by Capeman
@petrockblog I would vote yes on this! It works flawlessly with ES and retroarch. It is such a simple update to the .sh file and even if doesn't clean exit a non retroarch emulator, it will still exit the old fashioned way and clean exit ES for meta save. So either way it seems pretty harmless.
cyperghost last edited by
You are doing awesome work here!
This one has several fathers.
Do you think that the PowerBlock driver in the repository should be modified or extended in any way?
Well ... I think the usecase must be cleared. I'm not sure if everybody will take case in the use of emulators. So I would rather prefer you take this sniplet and push it to your github and let the user get the choice to download/use it during driver installation.
@meleu What is your opinion?
meleu last edited by
@meleu What is your opinion?
Well. I got my ego massage receiving a compliment from the RetroPie's creator. :-)
Oh... You're talking about modifying/extending the PowerBlock's driver in the repo... Well, what we made here is very specific for a RetroPie-EmulationStation setup. Some people use Attract Mode and at some point others will use Pegasus, and maybe there are PowerBlock owners that don't even run RetroPie.
Maybe you can put this code in the repo as an option, not as default.
That is my opinion.
@meleu I agree. I will put that script into the repository as alternative shutdown script. Thanks!
cyperghost last edited by cyperghost
I know this topic a bit old - but I wanted to ask if this is still the best approach for a proper shutdown of a RetroPie/EmulationStation/PowerBlock combo?
@petrockblog you mentioned above that you were going to add this into your repo, but it looks like it's not there?
I just installed the PowerBlock on my Pi4 last night and it's working well, but I just wanted to add the proper shutdown of ES.
Thanks! Apologies for reviving an old thread.
lostless last edited by
I've seen that, but when using the PowerBlock, that script would be overkill since the PowerBlock driver already handles monitoring of the status of the switch and simply calls etc/powerblockswitchoff.sh
So really all that's necessary is ensuring the proper shutdown calls are made within that script to ensure the safe shutdown of ES, etc..
I'll dig through the generic script and compare - just wanted to check in to see there had been any updates/improvements or other best practices for shutting down ES gracefully.
lostless last edited by lostless
@saturnx all you really have to do is, I think, is point to a Different file in that call. No need to edit the powerblockswitchoff.sh file.
Change the main script to be the SHUTDOWNSCRIPT= to
After you install the generic multi switch script. You don’t have to start it as boot up. Just install it where it says to install according to the get hub page and you can use it. No need to use the the scripts ability to sense a switch
Test it out and see if it works.
Took a slightly different approach and called the multi-switch shutdown script from
etc/powerblockswitchoff.shSo that I’d keep the main driver intact.
Thanks again! This was something so simple that I overlooked. Totally missed that the script could issue the necessary ES shutdown without tying it to a physical switch.