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

    Emulationstation Shutdown Script

    Scheduled Pinned Locked Moved Help and Support
    shutdown
    19 Posts 7 Posters 17.2k 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.
    • meleuM
      meleu @GaM3r2Xtreme
      last edited by meleu

      @GaM3r2Xtreme my first shoot would be in /etc/sudoers.

      Like detailed here: https://github.com/retropie/retropie-setup/wiki/RetroPie-Ubuntu-16.04-LTS-x86-Flavor#section-31-emulationstation-hangs-if-shutdownrestart-was-selected

      • Useful topics
      • joystick-selection tool
      • rpie-art tool
      • achievements I made
      1 Reply Last reply Reply Quote 0
      • GaM3r2XtremeG
        GaM3r2Xtreme
        last edited by GaM3r2Xtreme

        Oh, I just found something @meleu. Apparently when I type just emulationstation within the terminal and hit enter, /usr/bin/emulationstation is NOT called, but something else is.

        Now if I force the terminal to execute /usr/bin/emulationstaiton and then select one of the Quit options, it works. I successfully rebooted the system.

        Let me check and see what is in the /etc/sudoers. I should note that DietPi normally runs under the root user (there is no pi user setup by default).

        1 Reply Last reply Reply Quote 0
        • BuZzB
          BuZz administrators
          last edited by BuZz

          Type which emulationstation. Note you won't benefit from any better performance running dietpi. Just more likely to have compatibility issues.

          Please check the link in my signature when asking for help as it saves time if we have all the information about your setup.

          To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

          1 Reply Last reply Reply Quote 0
          • GaM3r2XtremeG
            GaM3r2Xtreme
            last edited by

            Adding the extra line of code within /etc/sudoers didn't seem to do the trick, but thanks for the suggestion to check it out.

            I did use which emulationstation which returned /usr/bin/emulationstation. The funny thing is that /opt/retropie/supplementary/emulationstation/emulationstation is executed directly instead via the emulationstation command, but not the /user/bin/emulationstation. This is all based on what I see in the resource monitor htop.

            Would it be possible to change what file is executed with the emulationstation command? If so, I would think this would be the solution I'm after.

            On a side note, I'll make sure to post system information if I have any other issues and open another thread.

            1 Reply Last reply Reply Quote 0
            • BuZzB
              BuZz administrators
              last edited by BuZz

              Yes, if you find out why that is being launched directly - the which command shows which is being launched if you just type in emulationstation unless there is a system alias in place - type alias.

              also check:
              /usr/bin/emulationstation should just be a script which launches /opt/retropie/supplementary/emulationstation/emulationstation.sh which in turn launches /opt/retropie/supplementary/emulationstation/emulationstation

              If there is an alias - it must be added by dietpi and you should report the issue there - dietpi is not officially supported by retropie.

              To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

              1 Reply Last reply Reply Quote 0
              • BuZzB
                BuZz administrators
                last edited by

                I just saw the thread you have over at the dietpi forums. I see from their code, they are launching is incorrectly at startup. They also do set an alias

                https://github.com/Fourdee/DietPi/blob/dad12d7ef381a5b346975b1dac1f5c4771f77b2b/PREP_SYSTEM_FOR_DIETPI.sh#L388

                You will need to ask them to change this. I can't really help if they are not using our launch scripts.

                To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                1 Reply Last reply Reply Quote 0
                • GaM3r2XtremeG
                  GaM3r2Xtreme
                  last edited by

                  I think you found the issue @BuZz. And yeah, I started a thread with dietpi awhile back and revived it to point out what was found here. I suggested a solution to their auto start script, but never noticed the system alias you found. Both might need a little tweaking, but that's up to those guys if they want to do this.

                  As far as I'm concerned, a solution was found for the issue I was having. Thanks again for all the help everyone.

                  1 Reply Last reply Reply Quote 0
                  • B
                    backstander
                    last edited by

                    @PaulCheffus
                    I am curious about your custom EmulationStation.sh script to shutdown using your ATXRasPi PCB. I have some old power/reset switches that came out of some old PCs and I currently have 1 switch to turn on & off my Pi (gracefully) and I have a 2nd switch I want to use to restart ES (and maybe a 3rd one to exit the currently running emulator). Could you post your script because I'm not sure exactly how I was going to do the ES restart code.

                    P 1 Reply Last reply Reply Quote 0
                    • P
                      PaulCheffus @backstander
                      last edited by PaulCheffus

                      @backstander
                      Hi

                      The script doesn't use extra buttons as it is for shutting down from the emulationstation menu. It requires a bc337 transistor and a 1k resistor with the emitter and collector of the transistor connected across the existing switch. The 1k resistor goes between one of the GPIO pins and the base of the transistor.

                      When I have the laptop out next I'll post the scripts.

                      EmulationStation.sh
                      0_1478523061478_es_sh.jpg

                      ES_Reboot.sh
                      0_1478523218990_es_reboot_sh.jpg

                      ES_Shutdown.sh
                      0_1478523251790_es_shutdown_sh.jpg

                      Cheers

                      Paul

                      1 Reply Last reply Reply Quote 1
                      • M
                        makaveeti
                        last edited by

                        Has anyone figured out how to get the shutdown system option working from windows version of ES?

                        1 Reply Last reply Reply Quote 0
                        • 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.