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.

    Having trouble with screen on and off? Here are some tips that could help

    Scheduled Pinned Locked Moved Tutorials
    20 Posts 8 Posters 16.4k Views 8 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.
    • BKeyportB Offline
      BKeyport Module Developer @mumblebaj
      last edited by

      @mumblebaj Course, I just switched back to X11 for now. 🙃

      The “E” in “Javascript” stands for “Easy”

      1 Reply Last reply Reply Quote 0
      • mumblebajM Offline
        mumblebaj Module Developer @langejos
        last edited by

        @langejos I am assuming you ran wlr-randr prior to creating the scripts to obtain your mirrors current display settings and then using that as input in the mon.sh?

        Check out my modules at: https://github.com/mumblebaj?tab=repositories
        Check my blog-post: https://mumblebaj.xyz/
        Check my MM Container: https://hub.docker.com/repository/docker/mumblebaj/magicmirror/general

        1 Reply Last reply Reply Quote 0
        • R Offline
          reviewsfornerds
          last edited by

          Hello all and thank you for all the suggestions. I apologize as I never got followup notifications of your responses.

          I ended up reverting back to the original desktop as I did not feel like fighting to change everything.

          Again, thank you all for your time and help.

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

            @sdetweil Yes, I did! I tried switching to x-11 and adjusting all parameters, but ended up switching back to wayland which works fine with a scheduled shut-down in the evening. Thank you once again for taking the time to lead me through this!

            1 Reply Last reply Reply Quote 1
            • mumblebajM mumblebaj referenced this topic on
            • karsten13K karsten13 referenced this topic on
            • mumblebajM mumblebaj referenced this topic on
            • mumblebajM mumblebaj referenced this topic on
            • mumblebajM mumblebaj referenced this topic on
            • mumblebajM Offline
              mumblebaj Module Developer @mumblebaj
              last edited by

              For users who are having issues with monitor on and monitor off and looking for a cron job to start their wayland setup. See my original post with updates.

              Check out my modules at: https://github.com/mumblebaj?tab=repositories
              Check my blog-post: https://mumblebaj.xyz/
              Check my MM Container: https://hub.docker.com/repository/docker/mumblebaj/magicmirror/general

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

                @mumblebaj hey, do you know why my off job when i triggered it either manually or via the cron job, it turns the monitor off, but after a few seconds it turns it on immediately again…?

                mumblebajM 1 Reply Last reply Reply Quote 0
                • mumblebajM Offline
                  mumblebaj Module Developer @1a2a3a
                  last edited by

                  Hi @1a2a3a . Honestly, no idea. I remember seeing a few posts from people having that exact same issue. Maybe if you search the forum for related content you may find something. I have not had the same issue myself.

                  Check out my modules at: https://github.com/mumblebaj?tab=repositories
                  Check my blog-post: https://mumblebaj.xyz/
                  Check my MM Container: https://hub.docker.com/repository/docker/mumblebaj/magicmirror/general

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

                    @mumblebaj I found this old thread of mine - https://forum.magicmirror.builders/topic/18318/mm-current-version-on-raspberry-pi-5-cannot-turn-off-monitor/32?page=4

                    Did you input the vc4 hot plug command?

                    mumblebajM 2 Replies Last reply Reply Quote 0
                    • mumblebajM Offline
                      mumblebaj Module Developer @1a2a3a
                      last edited by

                      @1a2a3a I am a little confused. I am not having any issues after implementing my solution in this post. I thought you were having issues.

                      Check out my modules at: https://github.com/mumblebaj?tab=repositories
                      Check my blog-post: https://mumblebaj.xyz/
                      Check my MM Container: https://hub.docker.com/repository/docker/mumblebaj/magicmirror/general

                      1 Reply Last reply Reply Quote 0
                      • mumblebajM Offline
                        mumblebaj Module Developer @1a2a3a
                        last edited by mumblebaj

                        @1a2a3a For the latest Wayland on off I use the new adjusted scripts.

                        mon.sh

                        #!/bin/bash
                        export WAYLAND_DISPLAY=wayland-0
                        export XDG_RUNTIME_DIR=/run/user/1000
                        /usr/bin/wlr-randr --output HDMI-A-1 --on --mode 1920x1080@60Hz --transform 270
                        

                        mof.sh

                        #!/bin/bash
                        export WAYLAND_DISPLAY=wayland-0
                        export XDG_RUNTIME_DIR=/run/user/1000
                        /usr/bin/wlr-randr --output HDMI-A-1 --off
                        

                        This works pretty well for me. The screen eventually times out as there is no input and it turns off.

                        In addition to these I have these cron entries to call the scripts.

                        Turns the screen on at 6am and off at 9pm.

                        00 06 * * * /home/pi/mon.sh >> /home/pi/mon.log 2>&1
                        00 21 * * * /home/pi/mof.sh >> /home/pi/mof.log 2>&1
                        

                        Check out my modules at: https://github.com/mumblebaj?tab=repositories
                        Check my blog-post: https://mumblebaj.xyz/
                        Check my MM Container: https://hub.docker.com/repository/docker/mumblebaj/magicmirror/general

                        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 / 1
                        • 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