MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MM current version on Raspberry Pi 5 cannot turn off monitor

    Scheduled Pinned Locked Moved Solved Troubleshooting
    53 Posts 9 Posters 36.4k Views 9 Watching
    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.
    • J Offline
      JohnGalt @jbat66
      last edited by

      @jbat66 - thanks for the offer. If you do wind up sharing your work, I will take a look and see if it works for me.

      I don’t run any remote control module, and don’t find the “MMM-remote” you reference when I search. I do, however, find at least two (2) different modules called “MMM-Remote-Control” by two different authors. Do you mean one of those?

      My progress so far is that I can get the monitor to turn off using the following script (called by a cron job), but the monitor then turns back on after ~10-15 seconds:

      #!/bin/bash
      
      # Script to turn off monitor display when called by crontab
      export WAYLAND_DISPLAY=wayland-1
      export XDG_RUNTIME_DIR=/run/user/1000
      /usr/bin/wlr-randr --output HDMI-A-1 --off
      
      1 J 2 Replies Last reply Reply Quote 0
      • 1 Offline
        1a2a3a @JohnGalt
        last edited by

        @JohnGalt Can you add vc4.force_hotplug=1 to cmdline.txt (on existing line) and check if behaviour changes? Add a space at the end of the line, save and reboot.

        Assuming you are using the first hdmi port closer to the usb c. If using the 2nd port then change the hot plug number to 2

        J J 2 Replies Last reply Reply Quote 0
        • J Offline
          jbat66 @JohnGalt
          last edited by

          @JohnGalt said in MM current version on Raspberry Pi 5 cannot turn off monitor:

          @jbat66 - thanks for the offer. If you do wind up sharing your work, I will take a look and see if it works for me.

          I don’t run any remote control module, and don’t find the “MMM-remote” you reference when I search. I do, however, find at least two (2) different modules called “MMM-Remote-Control” by two different authors. Do you mean one of those?

          This one: https://github.com/Jopyth/MMM-Remote-Control

          Sorry I should have been more clear.

          1 Reply Last reply Reply Quote 0
          • J Offline
            JohnGalt @1a2a3a
            last edited by

            @1a2a3a said in MM current version on Raspberry Pi 5 cannot turn off monitor:

            vc4.force_hotplug

            That does appear to work! So far I have tried it on two different Pi 4 instances, and each responded to a script called in crontab to turn off the monitor display, and then a script to turn it back on, as expected.

            Thanks.

            1 Reply Last reply Reply Quote 0
            • J Offline
              jbat66 @1a2a3a
              last edited by

              @1a2a3a Thank you Thank you Thank you… That worked for me as well… Message me, and I will get you a pizza like I promised to anyone who could get my pi4 running latest rasbian to turn off the monitor. Adding vc4.force_hotplug=1 to the end of the line in /boot/cmdline.txt did the trick along with using wlr-randr!!

              I’m serious about the pizza.

              1 D 2 Replies Last reply Reply Quote 0
              • 1 Offline
                1a2a3a @jbat66
                last edited by

                @jbat66 all good mate. I’m likely in a different geographic region to you. But anyway it was an issue that someone in GitHub that resolved for me so I can’t really take credit. I would point you to the GitHub but it was quite awhile back hence I can’t find the link anymore, therefore I went into my txt file and gave you guys the code.

                1 Reply Last reply Reply Quote 2
                • D Offline
                  devonian69 @jbat66
                  last edited by

                  @jbat66 I know this thread isn’t about getting MMM-Remote-Control to update with this but I was curious if you know how I could go about that.

                  J 1 Reply Last reply Reply Quote 0
                  • J Offline
                    jbat66 @devonian69
                    last edited by

                    @devonian69 Do you mean just a normal update for the module?

                    L 1 Reply Last reply Reply Quote 0
                    • L Offline
                      liminal1 @jbat66
                      last edited by

                      Hey guys,

                      So how did you get this to work? vc4.force_hotplug ive added that to /boot/firmware/cmdline.txt

                      But now what?

                      Im running Raspbian on a Pi 5, so not sure if all of this is even for bookwork :(

                      Thanks

                      S 1 Reply Last reply Reply Quote 0
                      • S Offline
                        sdetweil @liminal1
                        last edited by

                        @liminal1 note that rapios on pi4 and 5 use a new display manager called Wayland.

                        so all the commands for display MGMT have changed. see the commands posted above.

                        or set the os back to x11. see the raspi-config command

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        L 1 Reply Last reply Reply Quote 0
                        • L Offline
                          liminal1 @sdetweil
                          last edited by

                          @sdetweil said in MM current version on Raspberry Pi 5 cannot turn off monitor:

                          see the commands posted above.
                          or set the os back to x11. see the raspi-config command

                          I did try those commands, they are not working for me. Maybe I need more context for that (which is essentially what I was asking for :) Or I switch back to a slower and less efficient display model that negates having a Pi 5. Is that a correct asumption?

                          Maybe I wasn’t clear, but Im just asking if anyone does have it working on the Pi 5 with Bookworm. What did you use and how did you do it?

                          Thank you :)

                          S 1 2 Replies Last reply Reply Quote 0
                          • S Offline
                            sdetweil @liminal1
                            last edited by

                            @liminal1 the posts above say it was working on bookworm.

                            https://forum.magicmirror.builders/post/114283

                            Sam

                            How to add modules

                            learning how to use browser developers window for css changes

                            L 1 Reply Last reply Reply Quote 0
                            • 1 Offline
                              1a2a3a @liminal1
                              last edited by

                              @liminal1 doesn’t matter 4 or 5. As long as bookworm wayland, it’s working fine. For what’s worth, I’m on a 5.

                              L 1 Reply Last reply Reply Quote 0
                              • L Offline
                                liminal1 @sdetweil
                                last edited by

                                @sdetweil said in MM current version on Raspberry Pi 5 cannot turn off monitor:

                                https://forum.magicmirror.builders/post/114283

                                If I create that script and run it, it brings up a logon page :(

                                S 1 Reply Last reply Reply Quote 0
                                • L Offline
                                  liminal1 @1a2a3a
                                  last edited by

                                  @1a2a3a

                                  @1a2a3a said in MM current version on Raspberry Pi 5 cannot turn off monitor:

                                  @liminal1 doesn’t matter 4 or 5. As long as bookworm wayland, it’s working fine. For what’s worth, I’m on a 5.

                                  Thanks mate :)

                                  But what is working fine? Which part :)

                                  Im quite new to the Pi

                                  Thanks

                                  1 Reply Last reply Reply Quote 0
                                  • S Offline
                                    sdetweil @liminal1
                                    last edited by

                                    @liminal1 that makes no sense.

                                    you are running this from a terminal window, right

                                    ctrl-alt-t on the desktop.

                                    nothing login related there

                                    Sam

                                    How to add modules

                                    learning how to use browser developers window for css changes

                                    L 1 Reply Last reply Reply Quote 0
                                    • L Offline
                                      liminal1 @sdetweil
                                      last edited by

                                      @sdetweil said in MM current version on Raspberry Pi 5 cannot turn off monitor:

                                      you are running this from a terminal window, right

                                      Yes

                                      @sdetweil said in MM current version on Raspberry Pi 5 cannot turn off monitor:

                                      ctrl-alt-t on the desktop.

                                      Its a touch screen, what does this do?

                                      nothing login related there

                                      Not sure what you mean?

                                      S 1 Reply Last reply Reply Quote 0
                                      • S Offline
                                        sdetweil @liminal1
                                        last edited by

                                        @liminal1 the terminal window has nothing to do with login.

                                        your system should boot to the desktop
                                        then open a terminal window
                                        and type the commands above

                                        or use an ssh session from your pc

                                        Sam

                                        How to add modules

                                        learning how to use browser developers window for css changes

                                        L 1 Reply Last reply Reply Quote 0
                                        • L Offline
                                          liminal1 @sdetweil
                                          last edited by

                                          @sdetweil

                                          Yes,

                                          So this is what is happening to me when I try the script or the command

                                          https://forums.raspberrypi.com/viewtopic.php?p=2196846&hilit=wlr+randr#p2196846

                                          S 1 Reply Last reply Reply Quote 0
                                          • S Offline
                                            sdetweil @liminal1
                                            last edited by

                                            @liminal1 are you doing this over VNC?

                                            I have never seen this on the monitor attached to the pi

                                            Sam

                                            How to add modules

                                            learning how to use browser developers window for css changes

                                            L 1 Reply Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 3
                                            • 3 / 3
                                            • First post
                                              Last post
                                            Enjoying MagicMirror? Please consider a donation!
                                            MagicMirror created by Michael Teeuw.
                                            Forum managed by Sam, technical setup by Karsten.
                                            This forum is using NodeBB as its core | Contributors
                                            Contact | Privacy Policy