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

    Is it possible to map a controller button to start up the Pi after it has been shutdown?

    Scheduled Pinned Locked Moved Help and Support
    power buttonon switch
    6 Posts 6 Posters 1.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.
    • BillyHB
      BillyH
      last edited by

      Specifically:

      Right now I use the shutdown system command, wait a few seconds. When I want to play again, I unplug the Pi (if I hadn't done that already after the shutdown system command) and plug it back in.

      I use a Switch wired controller with the Pi, so I have a 'home' button that currently isn't mapped to do anything. I thought it would be cool if I could use this button to restart the Pi after a system shutdown.

      I have seen a couple of separate power button solutions online but they all assume I have a soldering iron, which I don't. I have put my Pi in a basic casing which came with the starter pack I bought, and while I might take time to figure out how to build a 'console' casing and add a power button in the future when I'm less busy at work, right now I'm looking for a quick fix.

      • First Pi: Pi 3 in a PSone case
      • Second Pi: Pi 0 in a Retroflag GPi Case
      • Third Pi: Pi 4 as a desktop computer
      • Some time in 2020: Picade
      1 Reply Last reply Reply Quote 0
      • t_mitchT
        t_mitch
        last edited by t_mitch

        Haven't tried it, but this seems like it might help. It's using a separate physical switch rather than a controller button.

        1 Reply Last reply Reply Quote 0
        • E
          ericbsmith42
          last edited by ericbsmith42

          I've rigged a power switch like the one shown in the video on several Pi's now, a few Pi Zero's, ZeroW's, and my Pi3A+. Works great on all of them. For a power-on switch it doesn't need any script installed, but to turn the Pi off you do need to install the script.

          Unfortunately, as I understand it there's no way to 'wake' the Pi from the USB because the Pi just doesn't have sleep functionality built into it. The best you could do with the controller is to modify the controller to either reroute one of the switches in it or add a button to the controller that hooks directly into the Pi, for which you will need to run a separate wire into the controller just for the switch. Better to mount the button on the Pi itself if that's what you want.

          As for the script itself, I recommend Shakz76/Eazy Hax Toolkit v2. It adds a number of scripts into the Retropie Configuration menu, one of which is enabling the Power Button on Pin 5/6 as shown in this video. It makes setting up the script much much easier for the layman.

          https://github.com/Shakz76/Eazy-Hax-RetroPie-Toolkit

          1 Reply Last reply Reply Quote 0
          • stoney66S
            stoney66
            last edited by

            This is the switch I use, works great.

            https://mausberry-circuits.myshopify.com/collections/frontpage/products/shutdown-switch-with-rocker

            cyperghostC 1 Reply Last reply Reply Quote 1
            • LolonoisL
              Lolonois
              last edited by

              The provided video solution works, but is waaay too complicated: A script, W00T?

              Just use the RUN-Pin and GND for this.
              All you need is a extra push-button and a little soldering skills. No script, no frills.

              For the Pi 3B locate J6 [1] on the PCB and connect both connections of J6 to your push-button.
              For the Pi 3B+ locate J2 [2] the label RUN and use a spare GND pin from GPIO. Connect these two to your push-button.

              After you have shutdown your Arcade via Emulationstation or literally by /sbin/halt -p, don't disconnect it from the mains. Now press the Reset button, and tataa your Rpi will boot up again. :-)

              Bonus: If you are stuck in a emulation/game you can restart your pi without a keyboard or pulling the plug.

              HTH

              [1] J6 is in sector C4 of schematic: https://www.raspberrypi.org/documentation/hardware/raspberrypi/schematics/rpi_SCH_3b_1p2_reduced.pdf
              [2] J2 is in sector C4: https://www.raspberrypi.org/documentation/hardware/raspberrypi/schematics/rpi_SCH_3bplus_1p0_reduced.pdf

              1 Reply Last reply Reply Quote 0
              • cyperghostC
                cyperghost @stoney66
                last edited by

                @stoney66 Good choice ;) This is a really good device. I made also very good experience with this one here: Shim ON OFF

                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.