Read the statement by Michael Teeuw here.
I cannot disable screen blanking with MagicMirrorOS
-
@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 toRANDR_PARAMS="--output HDMI-A-1 --off"
so that theMMM-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
-
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 … -
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 executedocker compose pull
anddocker 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.
-
@karsten13 unfortunately that didn’t work.
In the morning the screen was off and could not be restored withdocker rm -f labwc && docker compose up -d
ordocker 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 thelabwc
container and didwlr-randr --output HDMI-A-1 --on --transform 90
did the display return. At that point theMMM-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
-
@smegbadger said in I cannot disable screen blanking with MagicMirrorOS:
Please check I did the pull etc correctly
yes
this seems to become a never ending story …
With the last changes I wrote the display state (on or off) to a temp file so the labwc container knows the last state even after a restart. Problem now is the mm container, here the logs after restart:
> magicmirror@2.32.0-develop start:wayland > WAYLAND_DISPLAY="${WAYLAND_DISPLAY:=wayland-1}" ./node_modules/.bin/electron js/electron.js --enable-features=UseOzonePlatform --ozone-platform=wayland [2025-04-04 21:19:30.050] [LOG] Starting MagicMirror: v2.32.0-develop [2025-04-04 21:19:30.084] [LOG] Loading config ... [2025-04-04 21:19:30.087] [LOG] config template file not exists, no envsubst [2025-04-04 21:19:30.608] [INFO] Checking config file /opt/magic_mirror/config/config.js ... [2025-04-04 21:19:30.674] [INFO] Your configuration file doesn't contain syntax errors :) [2025-04-04 21:19:30.675] [INFO] Checking modules structure configuration ... [2025-04-04 21:19:30.778] [INFO] Your modules structure configuration doesn't contain errors :) [2025-04-04 21:19:30.780] [LOG] Loading module helpers ... [2025-04-04 21:19:30.786] [LOG] Initializing new module helper ... [2025-04-04 21:19:30.788] [LOG] Module helper loaded: MMM-Universal-Pir [2025-04-04 21:19:30.788] [LOG] No helper found for module: alert. [2025-04-04 21:19:30.793] [LOG] Initializing new module helper ... [2025-04-04 21:19:30.793] [LOG] Module helper loaded: updatenotification [2025-04-04 21:19:30.794] [LOG] No helper found for module: clock. [2025-04-04 21:19:30.924] [LOG] Initializing new module helper ... [2025-04-04 21:19:30.925] [LOG] Module helper loaded: calendar [2025-04-04 21:19:30.926] [LOG] No helper found for module: compliments. [2025-04-04 21:19:30.927] [LOG] No helper found for module: weather. [2025-04-04 21:19:31.034] [LOG] Initializing new module helper ... [2025-04-04 21:19:31.034] [LOG] Module helper loaded: newsfeed [2025-04-04 21:19:31.035] [LOG] All module helpers loaded. [2025-04-04 21:19:31.043] [LOG] Starting server on port 8080 ... [2025-04-04 21:19:31.046] [WARN] You're using a full whitelist configuration to allow for all IPs [2025-04-04 21:19:31.681] [LOG] Server started ... [2025-04-04 21:19:31.683] [LOG] Connecting socket for: MMM-Universal-Pir [2025-04-04 21:19:31.684] [LOG] Connecting socket for: updatenotification [2025-04-04 21:19:31.685] [LOG] Starting module helper: updatenotification [2025-04-04 21:19:31.686] [LOG] Connecting socket for: calendar [2025-04-04 21:19:31.687] [LOG] Starting node helper for: calendar [2025-04-04 21:19:31.688] [LOG] Connecting socket for: newsfeed [2025-04-04 21:19:31.689] [LOG] Starting node helper for: newsfeed [2025-04-04 21:19:31.690] [LOG] Sockets connected & modules started ...
The container is running but electron not (the line
Launching application.
is missing), I think it is waiting for an active display …The Pir-Sensor which would active the screen again is running inside mm (which is not really running).
So I have no idea at the moment, maybe we have to live with the situation before, where after restart we need a sensor interval before the screen is blanked again.
-
@karsten13 thank you for all the effort you are putting into this issue. I agree, let’s go back to the version that will kill and restart the container if the display doesn’t respond to
wlr-randr
(and then waits for aMMM-Universal-Pir
cycle to sleep it again).Steve
-
@smegbadger said in I cannot disable screen blanking with MagicMirrorOS:
@karsten13 thank you for all the effort you are putting into this issue.
Well, it is a pleasure to have such a good tester as you
I agree, let’s go back to the version that will kill and restart the container if the display doesn’t respond to
wlr-randr
(and then waits for aMMM-Universal-Pir
cycle to sleep it again).for now I did exactly this, but this issue is still working in my brain …
So to revert all the changes done before:
cd /opt/mm git switch master git pull
Change the images back to latest in
.env
:MM_IMAGE="karsten13/magicmirror:latest" LABWC_IMAGE="karsten13/labwc:latest"
Get new images and restart:
cd /opt/mm/run docker compose pull docker compose up -d
Last point: You should add the
--transform 90
to theonCommand
of the MMM-Universal-Pir config:{ module: "MMM-Universal-Pir", position: "top_right", config: { deactivateDelay: 30000, onCommand: "wlr-randr --output HDMI-A-1 --transform 90 --on", } }