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 Button in 2022

    Scheduled Pinned Locked Moved Help and Support
    power button2022
    6 Posts 2 Posters 926 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.
    • L
      lindsay
      last edited by

      Retropie 4.8
      Raspberry Pi 4 2GB
      Official power adaptor
      PS3 controller
      lr-Mame 2003 (0.78) and 2010

      Hi All,
      What is the current recommendation for power buttons and script to run them?
      I tried following old ETA Prime tutorials but they didn't work with Retropie 4.8

      Also on this forum the latest I could find was from 2 years ago.
      Thanks so much

      L 1 Reply Last reply Reply Quote 0
      • L
        lindsay @lindsay
        last edited by

        @lindsay
        Redirecting the output of rc.local to a log file yielded this error:

        • sudo python /home/pi/scripts/shutdown.py
          Traceback (most recent call last):
          File "/home/pi/scripts/shutdown.py", line 3, in <module>
          import RPi.GPIO as GPIO
          RuntimeError: This module can only be run on a Raspberry Pi!

        Well, it definitely is being run on a Raspberry pi!

        1 Reply Last reply Reply Quote 0
        • mituM
          mitu Global Moderator
          last edited by

          Save yourself the trouble and use @cyperghost's shutdown script - it's at https://github.com/crcerror/ES-generic-shutdown.

          L 1 Reply Last reply Reply Quote 1
          • L
            lindsay @mitu
            last edited by

            @mitu thanks, this is from 2018, does it still work in 2022?
            And it seems it needs special case with a special power switch installed, or am I mistaken?

            mituM 1 Reply Last reply Reply Quote 0
            • mituM
              mitu Global Moderator @lindsay
              last edited by

              @lindsay said in Power Button in 2022:

              @mitu thanks, this is from 2018, does it still work in 2022?

              Yes.

              And it seems it needs special case with a special power switch installed, or am I mistaken?

              No, it supports a number of special power switches, but it works also with a generic GPIO button.

              L 1 Reply Last reply Reply Quote 0
              • L
                lindsay @mitu
                last edited by

                @mitu Many thanks.

                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.