Software Shutdown using Atxraspi
-
@cyperghost I tried the 1st one which did not work and then the 2nd one causes it to just cut the power. The atxraspi has a status led which flashes when in shutdown. At a guess it times out and just cuts the power if its not received the success signal. Perhaps that shutdown script takes too long? Nothing seems to happen in retropi before the power just cuts. The rest signal still works so i assume its still going through the python script
-
@crazydude2 So you press the button 4 seconds right?
And then a shutdown is performed, right?Can you restart ES and type in SSH
sudo /etc/es_shutdown.sh
?
ES should shutoff and metadata is saved. -
@cyperghost When i run from ssh i get this error message and then it shuts down
pi@retropie:~ $ sudo /etc/es_shutdown.sh
sed: can't read /dev/shm/runcommand.info: No such file or directoryIt seems to shutdown correct if no metadata has changed from the switch. For example freshly turned on and then off. If i load a game exit back to check it is in last played when i use the power switch it just cuts the power rather than shutdown
-
@crazydude2 I have to take a look ... as I have not the atx here it's hard to suggest.
If you can switch to the install bash script it would be much easier
sudo wget https://raw.githubusercontent.com/LowPowerLab/ATX-Raspi/master/shutdownchecksetup.sh sudo bash shutdownchecksetup.sh sudo rm shutdownchecksetup.sh sudo reboot
I guess the bash shutdown script can be changed to this ...
with
sudo nano /etc/shutdowncheck.sh
https://ghostbin.com/paste/bo2vu -
@cyperghost Thanks for the help. This seems to work. I just need to remember to hold the button long enough as restart just shutdowns and leaves the atxraspi on which isn't ideal. Tomorrow i need to look into the software shutdown but i am not as worried about this as i probably wont use very often
-
@crazydude2
I made a small rework to the script to make reboot and shutdown for this script available hereFor software shutdown with the transistor you have to edit
sudo nano /opt/retropie/supplementary/emulationstation/emulationstation.sh
delete all content and add new one posted down in this posting.be aware... if you update RetroPie you may loose this script! as it is part of the RetroPie package!
Can you post your outfindings please?
#!/bin/sh esdir="$(dirname $0)" while true; do rm -f /tmp/es-restart /tmp/es-sysrestart /tmp/es-shutdown "$esdir/emulationstation" "$@" ret=$? [ -f /tmp/es-restart ] && continue if [ -f /tmp/es-sysrestart ]; then rm -f /tmp/es-sysrestart sudo /usr/bin/local/softshutdown.sh 1 sudo reboot break fi if [ -f /tmp/es-shutdown ]; then rm -f /tmp/es-shutdown sudo /usr/bin/local/softshutdown.sh 4 sudo poweroff break fi break done
-
@cyperghost Hi I think it is now working well. Thanks for all your help. What do you mean by posting outfindings? Just so people know
nano /opt/retropie/supplementary/emulationstation/emulationstation.sh
had to be changed tosudo nano /opt/retropie/supplementary/emulationstation/emulationstation.sh
to allow editingand the script also had to be altered to
#!/bin/sh esdir="$(dirname $0)" while true; do rm -f /tmp/es-restart /tmp/es-sysrestart /tmp/es-shutdown "$esdir/emulationstation" "$@" ret=$? [ -f /tmp/es-restart ] && continue if [ -f /tmp/es-sysrestart ]; then rm -f /tmp/es-sysrestart sudo /usr/local/bin/softshutdown.sh 1 sudo reboot break fi if [ -f /tmp/es-shutdown ]; then rm -f /tmp/es-shutdown sudo /usr/local/bin/softshutdown.sh 4 sudo poweroff break fi break done
-
@crazydude2 Outfindings? ... tell me if it works ;)
make 3 backticks liker here ```
in beginning and ending of codeblock
One backtick ` in beginning and ending of line or word makes it red
__ makes bold
~~makes striceout
_ makes italicI'm wondering that you need root-access for editing this file!
can you post me output of
ls -l /opt/retropie/supplementary/emulationstation
please -
@cyperghost
pi@retropie:~ $ ls -l /opt/retropie/supplementary/emulationstation
total 4756
-rw-r--r-- 1 root root 451 Jul 11 15:38 CREDITS.md
-rwxr-xr-x 1 root root 4804496 Jul 11 15:38 emulationstation
-rwxr-xr-x 1 root root 526 Sep 19 20:56 emulationstation.sh
-rwxr-xr-x 1 root root 527 Sep 19 20:56 emulationstation.sh.save
-rw-r--r-- 1 root root 5667 Jul 11 15:38 GAMELISTS.md
-rw-r--r-- 1 root root 10181 Jul 11 15:38 README.md
drwxr-xr-x 3 root root 4096 Jul 21 23:18 scripts
-rw-r--r-- 1 root root 27979 Jul 11 15:38 THEMES.md -
@crazydude2 Okay correct... yes we need sudo for editing - forget that! thx
Now you can test shutdown via ES MainMenu... it should work like you press the button.
Have fun -
@cyperghost Yes i can confirm it now works as it should. I have tried all combinations i can think of all with success. Thanks for all the help.
-
@crazydude2 Okay, keep in mind that if you update RetroPie it may happen you will loose settings to
/opt/retropie/supplementary/emulationstation/emulationstation.sh
as the two lines I added will be erased. So you have to add them manually....This will only affect the software-shutdown. Does the LED also blink if you choose software shutdown? I'm just interested to know ;) It should so as it triggers the same GPIO as the button press ;)
-
@cyperghost Yes the led does still flash on software shutdown
-
@crazydude2 Wow awesome! So have fun...
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.