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
    14 Posts 7 Posters 5.2k Views 7 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.
    • R Offline
      reviewsfornerds @mumblebaj
      last edited by

      @mumblebaj Thank you for this tutorial.

      I have been able to modify the MMM-Remote-Control config to use these commands for monitor on and off, and the command “/usr/bin/wlr-randr --output HDMI-A-1 --off” works in ssh terminal, however the log file shows the error “failed to connect to display” when running this as a cron job.

      Would you have any insight as to what I could do? What would I need to provide in order for you to assist?

      I am on Wayland desktop

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

        @reviewsfornerds Hi. Apologies for the late reply. Was away for the weekend.

        Can you share your script that you are calling? Also the output of wlr-randr.

        Check out my modules at: https://github.com/mumblebaj?tab=repositories
        Check my blog-post: https://mumblebaj.xyz/

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

          @reviewsfornerds said in Having trouble with screen on and off? Here are some tips that could help:

          the log file shows the error “failed to connect to display”

          yes, the command wants to know WHICH ‘display’ you want to control
          and normally would get that from the environment variables of the terminal window you are running the command in

          BUT

          the module is running it in the background, with NO window, no env variable… oops…

          IN addition, ‘specifying’ the window info may not work as the environment running the wlr_randr command was NOT started UNDER the window manager

          how to fix THAT is beyond my knowledge… as each of these depends on different stuff…
          (and you put it in cron, and cron runs as ROOT, not the local user you would be if you had a terminal window… even more fun)

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • C Offline
            captsi
            last edited by

            Thank you for the tutorial, it solved my issues of sending the screen to sleep at night. For whatever reasons, I had to use wayland-0 and HDMI-A-2 on my installation.

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

              @captsi HDMI-A-2 is probably because you plugged into 2. Glad it helped you though.

              Check out my modules at: https://github.com/mumblebaj?tab=repositories
              Check my blog-post: https://mumblebaj.xyz/

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

                @captsi said in Having trouble with screen on and off? Here are some tips that could help:

                I had to use wayland-0 and HDMI-A-2

                wayland is the software screen interface,
                HDMI- is the hardware screen interface

                Sam

                How to add modules

                learning how to use browser developers window for css changes

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

                  @mumblebaj

                  Works great, but when the monitor switches back on, chromium does not start maximized and shows the infobar, both of which are managed in the [autostart] section of wayfire.ini. Is there a way to get the MM display back just as when the Pi launches fresh?

                  S mumblebajM 2 Replies Last reply Reply Quote 0
                  • S Offline
                    sdetweil @langejos
                    last edited by

                    @langejos switch back to x11 in raspi-config

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    L 1 Reply Last reply Reply Quote -1
                    • G Offline
                      Gejakem
                      last edited by

                      For me I needed to use wayland-0 on a RPI5 using the ribbon-display cable.
                      From the wlr-randr i got this

                      DSI-1 “(null) (null) (DSI-1)”
                      Physical size: 154x86 mm
                      Enabled: yes
                      Modes:
                      800x480 px, 60.028999 Hz (preferred, current)
                      Position: 368,332
                      Transform: 90
                      Scale: 1.000000

                      So I used DSI-1 instead of HDMI.
                      Also I removed the --mode information since i got something like “Mode 800x480 not recognized”, but apparently my display defaults to that.

                      1 Reply Last reply Reply Quote 0
                      • 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
                        • 1
                        • 2
                        • 1 / 2
                        • 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