Recalbox Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • recalbox.com
    • Gitlab repository
    • Documentation
    • Discord

    Pushbutton for power off does not shutdown the pi...

    Recalbox General
    pushbutton does
    2
    8
    857
    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.
    • zebu
      zebu last edited by

      Hello,

      I have followed the tutorial on how to add a momentary pushbutton to stop the Pi.

      I added my button on gpio 3 and ground as stated.
      When i push my button, recalbox starts to shutdown but it hangs on a Black screen with a recalbox page...

      Same if i use the menu > power off

      I can't find what prevents pi from shutting down.

      Any idea ?

      Zing 1 Reply Last reply Reply Quote 0
      • Zing
        Zing Global moderator Translator @zebu last edited by

        @zebu What is your hardware?
        What's your version of Recalbox (say the version, don't say "the last one")?
        Did you build your Recalbox yourself, or download a ready-made image, or, did you buy everything ready?

        Se a minha resposta foi útil, por favor, dê um voto positivo, clicando na seta para cima logo abaixo da resposta, ao lado de "citar".
        If my answer was helpful, please give a positive feedback by clicking the up arrow below the answer, next to "quote".

        zebu 1 Reply Last reply Reply Quote 0
        • zebu
          zebu @Zing last edited by zebu

          @zing I use the 7.2. 1.
          Image ready made on the recalbox webpage.
          Everything else done diy (case, installation, assembly...)

          Zing 1 Reply Last reply Reply Quote 0
          • Zing
            Zing Global moderator Translator @zebu last edited by

            @zebu read this:
            https://recalbox.gitbook.io/documentation/tutorials/other/add-an-on-off-button-to-your-recalbox

            Se a minha resposta foi útil, por favor, dê um voto positivo, clicando na seta para cima logo abaixo da resposta, ao lado de "citar".
            If my answer was helpful, please give a positive feedback by clicking the up arrow below the answer, next to "quote".

            zebu 1 Reply Last reply Reply Quote 0
            • zebu
              zebu @Zing last edited by zebu

              @zing This is the tutorial I followed.

              I don't have a ON/OFF "locked" switch, only a momentary switch, so I use
              "system.power.switch=PIN56PUSH for a push button"

              Line uncommented in the recalbox.conf > rebooted.

              When I press the button short (while on the main Recalbox screen/system list), it goes black, showing only the Recalbox logo, with version on bottom.

              Exactly the same behavior when I try the menu method "Menu > Exit > Shutdown system" ... the screen hangs on the same screen...
              Same behavior when I try reboot (from the menu) ... it hangs on the same screen again.
              Same behavior with the line : "system.power.switch=PIN56PUSH" commented or uncommented...

              Tested from bluetooth gamepad / wired gamepad / keyboard ... (with gamepads disconnected) ==> Always the same

              1 Reply Last reply Reply Quote 0
              • zebu
                zebu last edited by

                UPDATE : I might have found the problem.

                I use a python script to manage a noctua pwm fan.
                The script is actually started by /etc/init.d/S99custom

                It seems that this script is causing the shutdown/reboot to hang.

                I've commented the script start line and shutdown is OK now, even with the switch.

                I'm searching how to start the script somewhere that is not preventing the system to stop.

                Any idea ?

                Zing 1 Reply Last reply Reply Quote 0
                • Zing
                  Zing Global moderator Translator @zebu last edited by

                  @zebu See if this helps:
                  https://recalbox.gitbook.io/documentation/v/francais/tutoriels/systeme/modification/ajouter-votre-propre-script-au-demarrage

                  Se a minha resposta foi útil, por favor, dê um voto positivo, clicando na seta para cima logo abaixo da resposta, ao lado de "citar".
                  If my answer was helpful, please give a positive feedback by clicking the up arrow below the answer, next to "quote".

                  zebu 1 Reply Last reply Reply Quote 0
                  • zebu
                    zebu @Zing last edited by

                    @Zing Thanks for the idea !

                    I found this topic very similar to mine :
                    https://forum.recalbox.com/topic/11228/nespi-fan-control-2-problèmes-résolus-en-même-temps/8

                    I just realized he used the same script (S99Custom) in the /etc/init.d directory, to launch his python script...

                    I then found that I forgot to add a "&" at the end of the line, in order to detach the python script execution from the bash session.

                    I will try asap and then get back here to told you.

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post

                    Want to support us ?

                    60
                    Online

                    98.6k
                    Users

                    28.1k
                    Topics

                    187.0k
                    Posts

                    Copyright © 2021 recalbox.com