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

    How to turn On/Off monitor when Raspi Pi turns On/Off

    Scheduled Pinned Locked Moved Help and Support
    monitorpower
    14 Posts 7 Posters 3.0k 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.
    • retroprogrammerR
      retroprogrammer
      last edited by retroprogrammer

      @mitu I read through and don't understand what I am supposed to do. I already saw the site, but didn't get it.

      Here is me converting the original Xbox for a case:
      https://retropie.org.uk/forum/topic/15232/converting-original-xbox-into-case-for-raspberrypi/15
      Check out my GitHub: https://github.com/retro-programmer

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

        @retroprogrammer You intall the CEC libraries, then use cec-client to control the HDMI output, see https://blog.gordonturner.com/2016/12/14/using-cec-client-on-a-raspberry-pi/.

        1 Reply Last reply Reply Quote 0
        • retroprogrammerR
          retroprogrammer
          last edited by

          My monitor does not support cec to control the monitor

          Here is me converting the original Xbox for a case:
          https://retropie.org.uk/forum/topic/15232/converting-original-xbox-into-case-for-raspberrypi/15
          Check out my GitHub: https://github.com/retro-programmer

          markyh444M 1 Reply Last reply Reply Quote 0
          • markyh444M
            markyh444 @retroprogrammer
            last edited by

            @retroprogrammer looks like you'll have to use the button then

            Retropie in a NES - Pi 3 with Mausberry circuit shutdown switch wired to buttons and 8bitdo NesPro30 controller
            Retropie in a Saturn Controller - Pi Zero, GPIO controls using DB9 driver
            Retropie in a PSX - Pi3
            https://markyh444.wordpress.com

            1 Reply Last reply Reply Quote 0
            • retroprogrammerR
              retroprogrammer
              last edited by

              @markyh444 Is their any other way, this is for my bartop arcade

              Here is me converting the original Xbox for a case:
              https://retropie.org.uk/forum/topic/15232/converting-original-xbox-into-case-for-raspberrypi/15
              Check out my GitHub: https://github.com/retro-programmer

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

                @retroprogrammer You could link the power sources for both the Pi and Monitor to a single button, so operating it will shutdown/power up both devices.

                1 Reply Last reply Reply Quote 0
                • thelostsoulT
                  thelostsoul
                  last edited by thelostsoul

                  Its possible without additional buttons. There are power strips with master/slave function. Whenever it detects a single master connection got on, then it turns on all other too. When it detects it goes off, then all slaves are set offline too. In most cases you can setup how sensitive it should be.

                  Btw, I do it without this thing. A single power strips with a button is enough.

                  πŸ“œ RE/SET: 100 SNES Games for your RetroPie, 🎁 Share your hidden gems and insider tips

                  1 Reply Last reply Reply Quote 1
                  • DougAD
                    DougA
                    last edited by

                    The most elegant way I have found is if you use a power strip with built in control relay, like this one

                    https://www.amazon.com/Iot-Relay-Enclosed-High-power-Raspberry/dp/B00WV7GMA2

                    And then run jumpers from a 3.3 or 5v and a ground GPIO pin to the relay. As soon as the PI powers up the controlled outlets will come on because the power from the Pi triggers the relay, and the reverse when it powers down. That way you can control monitors, amps, lights etc. When I get to my PC I can post a link to exactly how it is done. I will be installing this solution on my cabinet build soon.

                    1 Reply Last reply Reply Quote 2
                    • DougAD
                      DougA
                      last edited by

                      Here is the link. By the way, the entire build is really useful - I got a lot of ideas for finishing touches from it.

                      https://andrewdupont.net/2017/09/18/nostalgia-tron-part-11-not-electrocuting-yourself/

                      1 Reply Last reply Reply Quote 0
                      • C
                        crazydude2
                        last edited by

                        a cheaper option basically the same as what @DougA has suggest is just to use a simple relay. Something like this https://www.ebay.co.uk/itm/5v-DC-Single-Channel-Relay-Module-Arduino-Raspberry-AVR-Pi-Pic-UK-Hobby-UK-A504/161442238589?epid=1424956013&hash=item2596b5107d:g:KhsAAOSw~05Z2NMd

                        Its much cheaper and i personally prefer it in a cabinet but you have to be confident you know what you are doing. It is not complicated just double check what you have done. You can get solid ones which do not click when they activate as well. Get one that supports the right voltage for the raspberry pi and your monitor.

                        DougAD 1 Reply Last reply Reply Quote 1
                        • DougAD
                          DougA @crazydude2
                          last edited by

                          @crazydude2 Yes, that would definitely cut the cost. I hadn't thought of doing it that way. But, then again, that's the point of being on this forum - getting other people's ideas as well as your own. Thanks

                          1 Reply Last reply Reply Quote 2
                          • BiZzAr721B
                            BiZzAr721
                            last edited by

                            I resurrect this old thread just to add some more info for future reference. I came across this topic multiple times while searching the best way to turn on an Iot-relay, such as the one @DougA mentioned above. (My original way was to use a USB plugged into the Pi, with - & + going to the relay)

                            I am using an ADAfruit arcade bonnet, so some gpio pins were causing conflict with the controls.

                            To test I used:

                            sudo su
                            cd /sys/class/gpio
                            echo 8 > export
                            cd gpio8
                            echo out > direction
                            echo 1 > value
                            

                            To set a specific pin to turn high/low (on/off), add one of these options in /boot/config.txt

                            xx is the BCM number of the GPIO you want to use

                            dtoverlay=gpio-poweroff,gpiopin=xx
                            

                            for the default where GPIOxx will go low on boot and high after shutdown

                            dtoverlay=gpio-poweroff,gpiopin=xx,active_low
                            

                            to make the GPIO go high while the system is up

                            Adding to the /boot/config.txt allowed my Iot-relay to power on the switched outlets within 1-2 seconds of boot

                            references
                            https://www.raspberrypi.org/forums/viewtopic.php?t=154824

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