• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
RetroPie forum home
  • Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

Power On/Off Option in Main Menu

Scheduled Pinned Locked Moved Help and Support
power optionmain menusystem menu
37 Posts 9 Posters 18.4k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C
    Capeman
    last edited by 2 Jun 2017, 14:12

    As for the retropie menu on the carousel, you can disable that by going into the /etc/emulationstation/ (root access only) OR the /home/pi/.emulationstation folder and editing the es_systems.cfg. This is where all the systems reside. Just add <!-- before the retropie system - followed by --> at the end to comment out the code.

    Vector Artist, Designer and Maker of Stuff: Laser Cut Atari / Pixel Theme Bartop

    1 Reply Last reply Reply Quote 0
    • B
      battlecat @Capeman
      last edited by 2 Jun 2017, 14:12

      @Capeman Thanks! I have done a few google searches but that never came up. Huh?

      Now for the hard question! Has this been considered as an option to be built into the RPI by default? I can't be the only one who thinks a prominent and simple Power off or Restart button would be cool. I hope that one of the devs would as well.

      --BC

      C 1 Reply Last reply 2 Jun 2017, 14:16 Reply Quote 0
      • C
        Capeman @battlecat
        last edited by 2 Jun 2017, 14:16

        @battlecat There is probably limited need for a full system dedicated to a power off option when it's easily accessed with the pop up menu. Given it's a niche request and it's easy for novice users to add this to the carousel, the devs probably just figure users who need it will add it themselves. Though i cant speak for them, this seems like the logical approach.

        Vector Artist, Designer and Maker of Stuff: Laser Cut Atari / Pixel Theme Bartop

        B 1 Reply Last reply 2 Jun 2017, 14:19 Reply Quote 0
        • B
          battlecat @Capeman
          last edited by 2 Jun 2017, 14:19

          @Capeman I am thinking that this option is such a logical thing to have on any menu. It would certainly make life easier with kids and such. I am looking at the Youtube vids and the files. Unfortunate they are not self explanatory and there are not walk throughs with the work yet.

          Still going to read it all and give it a good try as this will solve so many issues! :)

          Once more I appreciate all your help.

          --bc

          1 Reply Last reply Reply Quote 0
          • C
            Capeman
            last edited by 2 Jun 2017, 14:25

            No worries. It would likely be a better addition to the existing retropie menu so you dont have too many "systems" in the carousel that are not related to gaming, the carousel gets cluttered enough as it is when you get more than 10 on there.

            Also the fact that this function only shuts the pi down to the standby state, lots of users who dont have power cables with on/off buttons built into them would have to pull the power cord and reinsert to turn the pi back on. It's slightly convoluted when options like the quick GPIO on/power off physical button exist.

            Vector Artist, Designer and Maker of Stuff: Laser Cut Atari / Pixel Theme Bartop

            B 2 Replies Last reply 2 Jun 2017, 14:38 Reply Quote 0
            • B
              battlecat @Capeman
              last edited by 2 Jun 2017, 14:38

              @Capeman I see what you're saying but I do not feel that adding another layer of hardware complexity to the setup is a good idea especially when there is a simple software solution for an elegant shutdown. I am more concerned with the whole elegant shutdown so my SD card doesn't corrupt more than I am with how it turns on and off.

              1 Reply Last reply Reply Quote 0
              • B
                battlecat @Capeman
                last edited by 2 Jun 2017, 14:41

                @Capeman As a side note it appears that the Youtube video has a file to download but no actual instructions on how to use the file. I have read through the comments and I see that this is a common problem.

                Any idea how to use the file that the Youtube creator posted for this? Sorry I am a bit of a pi noob when it comes to changes to the files and file structure.

                1 Reply Last reply Reply Quote 0
                • P
                  pana
                  last edited by pana 9 May 2017, 10:51 5 Sept 2017, 09:48

                  @battlecat Hey, did you figure it out?

                  I am explaining how to set it up anyway:

                  1. Download the compressed folder from the link provided in the video description

                    and unzip it.

                  2. It contain another folder called "Power Menu" which contain 4 folders ("Gamelist", "Images", "Rom", "Theme") and a file ("es_system.cfg").

                  3. Copy the contents of "Gamelist" to "~/.emulationstation/gamelists" ["~" is equivalent to writing "/home/your_user_name", say "/home/pi"]

                  4. Create a directory called "downloaded_images" inside "~/.emulationstation"

                  5. Copy the contents of "Images" to "~/.emulationstation/downloaded_images"

                  6. Copy the contents of "Rom" to "~/RetroPie/roms"

                  7. Copy the contents of "Theme" to "/etc/emulationstation/themes". Here you will need super user permission.

                  8. Copy the content of es_system.cfg (it's 9 lines of text); open the file /etc/emulationstation/es_system.cfg; paste the text to second last line (of course, as separate sentences as in the source; it must be before </systemList> tag and after </system> tag). Here also you will need super user permission.

                  9. Finally convert shutdown and reboot scripts within "~/Retropie/roms" into executable's by the commands:
                    a. chmod +x ~/RetroPie/roms/power/ashutdown.sh
                    b. chmod +x ~/RetroPie/roms/power/reboot.sh

                  10. Restart and you are done!

                  B J 2 Replies Last reply 8 Sept 2017, 19:46 Reply Quote 0
                  • B
                    battlecat @pana
                    last edited by 8 Sept 2017, 19:46

                    @pana That was a great explanation. I appreciate that effort.

                    Since I started to look into the issue I found a flavor of Retropie called Motion Blue. It has a built in GPIO solution that I used to directly hooked to an arcade button on the side of my cabinet.

                    I will have to try your method out on the next cab which is a stripped out pacman cocktail cab sitting in the basement.

                    C 1 Reply Last reply 29 Jul 2018, 20:07 Reply Quote 0
                    • C
                      chicuelo @battlecat
                      last edited by 29 Jul 2018, 20:07

                      @battlecat
                      Is there a way to update the script so now ES can save metadata on exit?

                      C 1 Reply Last reply 29 Jul 2018, 20:17 Reply Quote 0
                      • C
                        cyperghost @chicuelo
                        last edited by 29 Jul 2018, 20:17

                        @chicuelo Yes... use the Multi Switch Shutdown Script with paramters like --es-restart to just restart ES or --es-poweroff to shutdown ES or --es-reboot to reboot the whole system.
                        Metadata will be always saved.

                        Use ./multiswitch --help for more parameters.

                        C 1 Reply Last reply 29 Jul 2018, 20:24 Reply Quote 1
                        • C
                          chicuelo @cyperghost
                          last edited by chicuelo 29 Jul 2018, 20:24

                          @cyperghost
                          Lovely, I read about that script but I dont know how to implement it on this script.
                          Im running it but I have this two scripts only:

                          Shutdown
                          #!/bin/bash
                          sudo shutdown -h now

                          Reboot
                          #!/bin/bash
                          sudo shutdown -r now

                          C 1 Reply Last reply 29 Jul 2018, 20:35 Reply Quote 0
                          • C
                            cyperghost @chicuelo
                            last edited by cyperghost 29 Jul 2018, 20:35

                            @chicuelo
                            In this case I would place the multi_switch.sh in a directory like /home/pi/RetroPie/scripts

                            So type mkdir /home/pi/RetroPie/scripts
                            enter that directory with cd /home/pi/RetroPie/scriptsand then wget https://raw.githubusercontent.com/crcerror/ES-generic-shutdown/master/multi_switch.sh && chmod +x multi_switch.sh to download it.

                            Now the shutdown/reboot calls would be just

                            #!/bin/bash
                            # **SHUTDOWN**
                            echo "Shutdown ...."
                            sleep 1
                            /home/pi/RetroPie/scripts/multi_switch.sh --es-poweroff &
                            

                            and

                            #!/bin/bash
                            # **RESTART ES**
                            echo "Restarting ES ..."
                            sleep 1
                            /home/pi/RetroPie/scripts/multi_switch.sh --es-restart &
                            

                            I would prefer --es-restart instead of --es-reboot

                            Ask if you have further questions about this ;)

                            EDIT
                            The guide is a bit old. I would modify es_system rather like this. Then this will work on FAT32 systems, too.
                            I just added a bash command to the ROM executive ;)

                              <system>
                                <name>power</name>
                                <fullname>Power Menu</fullname>
                                <path>/home/pi/RetroPie/roms/power</path>
                                <extension>.sh .SH</extension>
                                <command>bash %ROM%</command>
                                <platform>linux</platform>
                                <theme>power</theme>
                              </system>
                            
                            C 2 Replies Last reply 29 Jul 2018, 20:57 Reply Quote 1
                            • C
                              chicuelo @cyperghost
                              last edited by 29 Jul 2018, 20:57

                              @cyperghost

                              Great! I will give it a try, many thanks!

                              1 Reply Last reply Reply Quote 0
                              • C
                                chicuelo @cyperghost
                                last edited by 29 Jul 2018, 21:14

                                @cyperghost
                                Unfortunately it does not work, the script worked fine but the favorites won't remain after restar, reboot or power off, I checked any permission issues but there aren't. I went back tho the firs script because I dislike the terminated sentence at the end :(

                                C 1 Reply Last reply 29 Jul 2018, 21:24 Reply Quote 1
                                • C
                                  cyperghost @chicuelo
                                  last edited by 29 Jul 2018, 21:24

                                  @chicuelo Let me try in Monday.
                                  Terminated means no proper shutdown.
                                  I think it has something to do that a script is called weithin ES.
                                  I will test ....

                                  C 1 Reply Last reply 29 Jul 2018, 21:26 Reply Quote 1
                                  • C
                                    chicuelo @cyperghost
                                    last edited by 29 Jul 2018, 21:26

                                    @cyperghost
                                    Thanks! let me know if you find any issue

                                    C 1 Reply Last reply 30 Jul 2018, 14:02 Reply Quote 1
                                    • C
                                      cyperghost @chicuelo
                                      last edited by cyperghost 30 Jul 2018, 14:02

                                      @chicuelo Yes it was so easy! ;)
                                      Just add an &- changed the scripts ... they worked flawless in my testing area ;)
                                      I didn't work because of following....

                                      You start a bash script within ES (that's the same as an emulator call for ex)
                                      Now you start annother script that will shutdown ES. But the first script (started via ES) is still active and waits for the shutdown script to exit ----->> You are bu... terminated!

                                      It's just an ironic... because the orginal NESPi+ script works the same way. As long an emulator is active in background there will be never clean shutdowns ;) But with the multi_switch you can do really fine things like prober shutdown with the an extended python script based on the NESPi+ ones

                                      C 1 Reply Last reply 30 Jul 2018, 14:24 Reply Quote 1
                                      • C
                                        chicuelo @cyperghost
                                        last edited by 30 Jul 2018, 14:24

                                        @cyperghost said in Power On/Off Option in Main Menu:

                                        extended python script based on the NESPi+ ones

                                        Thanks @cyperghost , where I have to add the &? in the reboot and power scirpt?

                                        C 1 Reply Last reply 30 Jul 2018, 14:31 Reply Quote 0
                                        • C
                                          cyperghost @chicuelo
                                          last edited by cyperghost 30 Jul 2018, 14:31

                                          @chicuelo No... take a look here

                                          You have to send the multi_switch to background, then the ES called reboot or shutdown script will finish and my script makes the work ;)

                                          C 1 Reply Last reply 30 Jul 2018, 14:41 Reply Quote 1
                                          • First post
                                            Last post

                                          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.

                                            [[user:consent.lead]]
                                            [[user:consent.not_received]]