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.

    I cannot disable screen blanking with MagicMirrorOS

    Scheduled Pinned Locked Moved Solved Troubleshooting
    27 Posts 3 Posters 4.8k Views 3 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.
    • S Offline
      smegbadger
      last edited by

      @karsten13 I left it running overnight with the MMM-Universal-Pir config lines commented out and the monitor physically switched off and this morning MM was still working fine when I switched the monitor back on again. When I looked at docker logs labwc the wlr-randr command was failing (still being triggered every fifteen mins) which suggests the connection between the MMM-Universal-Pir and the display driver is the issue rather than the display actually going off. I will try your new build today although i will have to add --transform 90 to the onCommand to get my screen rotation.

      magicm@magicmirror:/opt/mm/mounts/config $ docker logs labwc
      HDMI-A-1 "Raspberry PI RPI MON156 81005568472 (HDMI-A-1)"
        Make: Raspberry PI
        Model: RPI MON156
        Serial: 81005568472
        Physical size: 350x190 mm
        Enabled: yes
        Modes:
          1920x1080 px, 60.000000 Hz (preferred, current)
          1920x1080 px, 60.000000 Hz
          1920x1080 px, 59.939999 Hz
          1920x1080 px, 50.000000 Hz
          1920x1080 px, 48.000000 Hz
          1920x1080 px, 47.952000 Hz
          1280x720 px, 60.000000 Hz
          1280x720 px, 60.000000 Hz
          1280x720 px, 59.939999 Hz
          1280x720 px, 50.000000 Hz
          1280x720 px, 48.000000 Hz
          1280x720 px, 47.952000 Hz
          720x576 px, 50.000000 Hz
          720x480 px, 60.000000 Hz
          720x480 px, 59.939999 Hz
          640x480 px, 60.000000 Hz
          640x480 px, 59.939999 Hz
          640x480 px, 59.939999 Hz
        Position: 0,0
        Transform: 90
        Scale: 1.000000
        Adaptive Sync: disabled
      failed to connect to display
      failed to connect to display
      failed to connect to display
      failed to connect to display
      failed to connect to display
      failed to connect to display
      failed to connect to display
      failed to connect to display
      failed to connect to display
      failed to connect to display
      failed to connect to display
      failed to connect to display
      failed to connect to display
      failed to connect to display
      failed to connect to display
      failed to connect to display
      failed to connect to display
      failed to connect to display
      failed to connect to display
      failed to connect to display
      magicm@magicmirror:/opt/mm/mounts/config $ docker exec -it labwc bash
      pi@c7c64f70849e:/$ wlr-randr
      failed to connect to display
      pi@c7c64f70849e:/$
      

      Steve

      1 Reply Last reply Reply Quote 0
      • S Offline
        smegbadger
        last edited by

        @karsten13 my apologies, I see the transform is not needed as you have taken the rotation into account

        1 Reply Last reply Reply Quote 0
        • S Offline
          smegbadger
          last edited by

          @karsten13 the display failed today as before but we have timestamps in the labwc docker logs

          magicm@magicmirror:~ $ docker logs labwc
          00:00:00.000 [INFO] [seatd/seat.c:48] Created VT-bound seat seat0
          00:00:00.000 [INFO] [seatd/seatd.c:194] seatd started
          00:00:00.052 [INFO] [seatd/server.c:145] New client connected (pid: 17, uid: 1000, gid: 1000)
          00:00:00.052 [INFO] [seatd/seat.c:239] Added client 1 to seat0
          00:00:00.052 [INFO] [seatd/seat.c:563] Opened client 1 on seat0
          00:00:00.120 [ERROR] [EGL] command: eglQueryDeviceStringEXT, error: EGL_BAD_PARAMETER (0x300c), message: "eglQueryDeviceStringEXT"
          00:00:00.120 [ERROR] [EGL] command: eglQueryDeviceStringEXT, error: EGL_BAD_PARAMETER (0x300c), message: "eglQueryDeviceStringEXT"
          executing: wlr-randr --output HDMI-A-1 --transform 90
          Sat Mar 29 08:14:25 UTC 2025
          HDMI-A-1 "Raspberry PI RPI MON156 81005568472 (HDMI-A-1)"
            Make: Raspberry PI
            Model: RPI MON156
            Serial: 81005568472
            Physical size: 350x190 mm
            Enabled: yes
            Modes:
              1920x1080 px, 60.000000 Hz (preferred, current)
              1920x1080 px, 60.000000 Hz
              1920x1080 px, 59.939999 Hz
              1920x1080 px, 50.000000 Hz
              1920x1080 px, 48.000000 Hz
              1920x1080 px, 47.952000 Hz
              1280x720 px, 60.000000 Hz
              1280x720 px, 60.000000 Hz
              1280x720 px, 59.939999 Hz
              1280x720 px, 50.000000 Hz
              1280x720 px, 48.000000 Hz
              1280x720 px, 47.952000 Hz
              720x576 px, 50.000000 Hz
              720x480 px, 60.000000 Hz
              720x480 px, 59.939999 Hz
              640x480 px, 60.000000 Hz
              640x480 px, 59.939999 Hz
              640x480 px, 59.939999 Hz
            Position: 0,0
            Transform: 90
            Scale: 1.000000
            Adaptive Sync: disabled
          Sat Mar 29 08:29:25 UTC 2025
          HDMI-A-1 "Raspberry PI RPI MON156 81005568472 (HDMI-A-1)"
            Make: Raspberry PI
            Model: RPI MON156
            Serial: 81005568472
            Physical size: 350x190 mm
            Enabled: yes
            Modes:
              1920x1080 px, 60.000000 Hz (preferred, current)
              1920x1080 px, 60.000000 Hz
              1920x1080 px, 59.939999 Hz
              1920x1080 px, 50.000000 Hz
              1920x1080 px, 48.000000 Hz
              1920x1080 px, 47.952000 Hz
              1280x720 px, 60.000000 Hz
              1280x720 px, 60.000000 Hz
              1280x720 px, 59.939999 Hz
              1280x720 px, 50.000000 Hz
              1280x720 px, 48.000000 Hz
              1280x720 px, 47.952000 Hz
              720x576 px, 50.000000 Hz
              720x480 px, 60.000000 Hz
              720x480 px, 59.939999 Hz
              640x480 px, 60.000000 Hz
              640x480 px, 59.939999 Hz
              640x480 px, 59.939999 Hz
            Position: 0,0
            Transform: 90
            Scale: 1.000000
            Adaptive Sync: disabled
            
            ...
            
          Sat Mar 29 13:14:26 UTC 2025
          HDMI-A-1 "Raspberry PI RPI MON156 81005568472 (HDMI-A-1)"
            Make: Raspberry PI
            Model: RPI MON156
            Serial: 81005568472
            Physical size: 350x190 mm
            Enabled: yes
            Modes:
              1920x1080 px, 60.000000 Hz (preferred, current)
              1920x1080 px, 60.000000 Hz
              1920x1080 px, 59.939999 Hz
              1920x1080 px, 50.000000 Hz
              1920x1080 px, 48.000000 Hz
              1920x1080 px, 47.952000 Hz
              1280x720 px, 60.000000 Hz
              1280x720 px, 60.000000 Hz
              1280x720 px, 59.939999 Hz
              1280x720 px, 50.000000 Hz
              1280x720 px, 48.000000 Hz
              1280x720 px, 47.952000 Hz
              720x576 px, 50.000000 Hz
              720x480 px, 60.000000 Hz
              720x480 px, 59.939999 Hz
              640x480 px, 60.000000 Hz
              640x480 px, 59.939999 Hz
              640x480 px, 59.939999 Hz
            Position: 0,0
            Transform: 90
            Scale: 1.000000
            Adaptive Sync: disabled
          Sat Mar 29 13:29:26 UTC 2025
          failed to connect to display
          Sat Mar 29 13:44:26 UTC 2025
          failed to connect to display
          Sat Mar 29 13:59:26 UTC 2025
          failed to connect to display
          Sat Mar 29 14:14:26 UTC 2025
          failed to connect to display
          Sat Mar 29 14:29:26 UTC 2025
          failed to connect to display
          Sat Mar 29 14:44:26 UTC 2025
          failed to connect to display
          Sat Mar 29 14:59:26 UTC 2025
          failed to connect to display
          Sat Mar 29 15:14:26 UTC 2025
          failed to connect to display
          Sat Mar 29 15:29:26 UTC 2025
          failed to connect to display
          Sat Mar 29 15:44:26 UTC 2025
          failed to connect to display
          Sat Mar 29 15:59:26 UTC 2025
          failed to connect to display
          Sat Mar 29 16:14:26 UTC 2025
          failed to connect to display
          
          There's also a new item in the `mm` docker logs when I restarted the docker containers on my return
          Gdk-Message: 16:25:24.348: Error reading events from display: Broken pipe
          [entrypoint 16:25:25.533] [INFO]   ***WARNING*** could write to /etc/localtime
          [entrypoint 16:25:25.539] [INFO]   copy default modules
          [entrypoint 16:25:25.603] [INFO]   copy css files
          

          Steve

          karsten13K 1 Reply Last reply Reply Quote 0
          • karsten13K Online
            karsten13 @smegbadger
            last edited by karsten13

            @smegbadger

            I build another new labwc image. You can revert the changes done to MM_IMAGE and the on-/offCommand in your setup.

            The new karsten13/labwc:develop now runs labwc with pid=1 (I thought that was already the case) and additionally kills labwc if the wlr-randr command fails with failed to connect to display.

            Now the container will restart if labwc is terminated inside the container. This does not address the root issue but should be a good workaround (hopefully).

            So please do again a docker compose pull && docker compose up -d to get the latest changes …

            1 Reply Last reply Reply Quote 0
            • S Offline
              smegbadger
              last edited by

              @karsten13, thank you for this. It worked well overnight last night. One question: when the wlr-randr command fails, the labwc container is then killed and then automatically restarts - will the screen be turned on then until the next PIR activity and subsequent timeout of MMM-Universal-Pir?

              Steve

              karsten13K 1 Reply Last reply Reply Quote 0
              • karsten13K Online
                karsten13 @smegbadger
                last edited by

                @smegbadger said in I cannot disable screen blanking with MagicMirrorOS:

                the labwc container is then killed and then automatically restarts - will the screen be turned on then until the next PIR activity and subsequent timeout of MMM-Universal-Pir?

                yes, I tested this by killing and restarting the labwc-container from outside.

                Not nice but I have no idea how to solve this.

                1 Reply Last reply Reply Quote 0
                • S Offline
                  smegbadger
                  last edited by

                  @karsten13 I thought that would be the case. I tried changing the initial RANDR_PARAMS="--output HDMI-A-1 --transform 90" in the .env file to RANDR_PARAMS="--output HDMI-A-1 --off" so that the MMM-Universal-Pir module would be responsible for the first switch on of the display but then I got no display on restart at all.

                  Steve

                  karsten13K 2 Replies Last reply Reply Quote 0
                  • karsten13K Online
                    karsten13 @smegbadger
                    last edited by

                    @smegbadger

                    had to write it down:

                    labwc	after start			wlr-randr --output HDMI-A-1 --transform 90
                    mm	starts and mm is displayed
                    mm	offCommand			wlr-randr --output HDMI-A-1 --off
                    mm	still up but not displayed
                    labwc	fails after a while, killed
                    labwc	after start			wlr-randr --output HDMI-A-1 --transform 90
                    mm	still up and displayed again
                    mm	offCommand			wlr-randr --output HDMI-A-1 --off
                    ...
                    

                    so another idea would be to execute the command defined in RANDR_PARAMS only if the display is not switched off. Will check if I can get this information …

                    1 Reply Last reply Reply Quote 0
                    • karsten13K Online
                      karsten13 @smegbadger
                      last edited by

                      @smegbadger

                      I think I have now a working solution for this.

                      For testing

                      use LABWC_IMAGE="karsten13/labwc:develop" in .env.

                      In /opt/mm do

                      # check if worktree is clean
                      git status
                      # switch to develop branch
                      git switch develop
                      # pull
                      git pull
                      

                      Go to /opt/mm/run and execute docker compose pull and docker compose up -d --force-recreate.

                      With these changes the screen should still be blank after a restart of the labwc-container if the screen was blank before. Let me know if it works.

                      1 Reply Last reply Reply Quote 0
                      • S Offline
                        smegbadger
                        last edited by

                        @karsten13 unfortunately that didn’t work.
                        In the morning the screen was off and could not be restored with docker rm -f labwc && docker compose up -d or docker compose up -d --force-recreate. In both cases the console briefly came back and then the the monitor slept again. Only when i when into the labwc container and did wlr-randr --output HDMI-A-1 --on --transform 90 did the display return. At that point the MMM-Universal-Pir started counting down too and it works as normal.

                        magicm@magicmirror:/opt/mm/run $ docker rm -f labwc && docker compose up -d
                        labwc
                        [+] Running 2/2
                         ✔ Container mm     Running                                                                                        0.0s
                         ✔ Container labwc  Started                                                                                        0.5s
                        magicm@magicmirror:/opt/mm/run $ docker compose up -d --force-recreate
                        [+] Running 2/2
                         ✔ Container mm     Started                                                                                        1.7s
                         ✔ Container labwc  Started                                                                                        1.8s
                        magicm@magicmirror:/opt/mm/run $
                             >>> still no screen output <<<
                        magicm@magicmirror:/opt/mm/run $ docker exec -it labwc bash
                        pi@3f4fb5c07c91:/$ wlr-randr
                        HDMI-A-1 "Raspberry PI RPI MON156 81005568472 (HDMI-A-1)"
                          Make: Raspberry PI
                          Model: RPI MON156
                          Serial: 81005568472
                          Physical size: 350x190 mm
                          Enabled: no
                          Modes:
                            1920x1080 px, 60.000000 Hz (preferred)
                            1920x1080 px, 60.000000 Hz
                            1920x1080 px, 59.939999 Hz
                            1920x1080 px, 50.000000 Hz
                            1920x1080 px, 48.000000 Hz
                            1920x1080 px, 47.952000 Hz
                            1280x720 px, 60.000000 Hz
                            1280x720 px, 60.000000 Hz
                            1280x720 px, 59.939999 Hz
                            1280x720 px, 50.000000 Hz
                            1280x720 px, 48.000000 Hz
                            1280x720 px, 47.952000 Hz
                            720x576 px, 50.000000 Hz
                            720x480 px, 60.000000 Hz
                            720x480 px, 59.939999 Hz
                            640x480 px, 60.000000 Hz
                            640x480 px, 59.939999 Hz
                            640x480 px, 59.939999 Hz
                        pi@3f4fb5c07c91:/$ wlr-randr --output HDMI-A-1 --on --transform 90
                             >>> screen returns <<<
                        pi@3f4fb5c07c91:/$
                        

                        Please check I did the pull etc correctly

                        magicm@magicmirror:/opt/mm $ git status
                        On branch master
                        Your branch is up to date with 'origin/master'.
                        
                        Changes not staged for commit:
                          (use "git add <file>..." to update what will be committed)
                          (use "git restore <file>..." to discard changes in working directory)
                                modified:   install/install.sh
                        
                        Untracked files:
                          (use "git add <file>..." to include in what will be committed)
                                install/install.sh.old
                                run/douglas.env
                        
                        no changes added to commit (use "git add" and/or "git commit -a")
                        magicm@magicmirror:/opt/mm $ git switch develop
                        M       install/install.sh
                        branch 'develop' set up to track 'origin/develop'.
                        Switched to a new branch 'develop'
                        magicm@magicmirror:/opt/mm $ git pull
                        remote: Enumerating objects: 32, done.
                        remote: Counting objects: 100% (32/32), done.
                        remote: Compressing objects: 100% (22/22), done.
                        remote: Total 22 (delta 14), reused 0 (delta 0), pack-reused 0 (from 0)
                        Unpacking objects: 100% (22/22), 2.66 KiB | 247.00 KiB/s, done.
                        From https://gitlab.com/khassel/magicmirror
                           f4542dd..4891458  develop    -> origin/develop
                           a4a4748..c4bb59c  master     -> origin/master
                         * [new tag]         v2.31.0    -> v2.31.0
                        Updating f4542dd..4891458
                        Fast-forward
                         .gitlab-ci.yml            |  2 +-
                         build/labwc/Dockerfile    |  2 +-
                         build/labwc/entrypoint.sh | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++--------
                         run/includes/labwc.yaml   |  4 +++-
                         run/original.env          |  4 ++--
                         5 files changed, 57 insertions(+), 13 deletions(-)
                        magicm@magicmirror:/opt/mm $ cd /opt/mm/run
                        magicm@magicmirror:/opt/mm/run $ docker compose pull
                        [+] Pulling 15/15
                         ✔ labwc Pulled                                                                                                  107.9s
                           ✔ f07a03696dcc Already exists                                                                                   0.0s
                           ✔ 98d9f29a8bdf Pull complete                                                                                  106.0s
                           ✔ 6c9aae6d02f4 Pull complete                                                                                  106.1s
                           ✔ 9d496899b308 Pull complete                                                                                  106.2s
                         ✔ magicmirror Pulled                                                                                            171.5s
                           ✔ d9b636547744 Already exists                                                                                   0.0s
                           ✔ 2fb5eed0caf7 Already exists                                                                                   0.0s
                           ✔ f51205ec4ac4 Already exists                                                                                   0.0s
                           ✔ d7b57be0135b Already exists                                                                                   0.0s
                           ✔ 813d7d6819ab Already exists                                                                                   0.0s
                           ✔ 9e1af87e1f78 Pull complete                                                                                    1.1s
                           ✔ 27001e96a2b0 Pull complete                                                                                    1.3s
                           ✔ deb26dbf1268 Pull complete                                                                                  110.8s
                           ✔ 1b7abece8518 Pull complete                                                                                  169.7s
                        magicm@magicmirror:/opt/mm/run $ docker compose up -d --force-recreate
                        [+] Running 2/2
                         ✔ Container labwc  Started                                                                                       24.9s
                         ✔ Container mm     Started
                        

                        Steve

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