Read the statement by Michael Teeuw here.
HDMI turns on without movement
-
Hi All,
I needed to re-setup my MagicMirror, now it runs on Raspi 4 and Debian Trixie 64-bit.
Everything works nicely as before, PIR is on PIN 22 and I use:
{
module: “MMM-Universal-Pir”,
position: “top_left”,
config: {
gpioCommand: “/usr/bin/gpiomon -e rising -c 0 22”,
//onCommand: “WAYLAND_DISPLAY=‘wayland-1’ wlr-randr --output HDMI-A-1 --on”,
//offCommand: “WAYLAND_DISPLAY=‘wayland-1’ wlr-randr --output HDMI-A-1 --off”,
onCommand: “wlr-randr --output HDMI-A-1 --on”,
offCommand: “wlr-randr --output HDMI-A-1 --off”,
deactivateDelay: 20 * 1000,
}
},
As you can see I experimented already with the commands, now it works fine with “wlr-randr --output HDMI-A-1 --on”, and the monitor turns off after 20 seconds if no movement, and turns back on when moving.Now comes the trick: when turned off, after ca. 1 minute the monitor goes back on and the MM shows “0 sec”. I.e., the HDMI activation did not come from the MM.
I tested the offCommand directly in the Terminal, the monitor goes off, and again after a minute or so goes back on. So this does not come from the MM.
I looked in the settings of the NT68676.2A Controller Board if there is an AutoDetect for HDMI or so, but did not find an entry.
Any idea what I can do? Thanks for your help!
Hobbes
-
@Hobbes-0 I would invest in direction of GPIO…
As I’ve experienced GPIO in bookworm was strongly different as in earlier version - may this applies to Trixie as well?
If monitor “awakes” suddenly this seem not to be a problem of HDMI-commands ?Sorry cannot advice more concrete - I#m still on bookwork, not Trixie.
Good luck!
Ralf
-
@karsten13 have you had a chance to test universal pir on Trixie yet?
-
@sdetweil said in HDMI turns on without movement:
@karsten13 have you had a chance to test universal pir on Trixie yet?
I’m on it …
@Hobbes-0 said in HDMI turns on without movement:
I tested the offCommand directly in the Terminal, the monitor goes off, and again after a minute or so goes back on. So this does not come from the MM.
@sdetweil so this problem is not related to universal pir or mm
I tested universal pir on mmos, which is on trixie but uses the os lite version, mm and labwc/wayland are started as containers.
I cannot reproduce the unexpected activation there.
(I found another permission problem which I will fix later)fixedOther difference between trixie and bookworm is a breaking version change of
gpiomonso you have to use different commands:bookworm:
gpiomon -r -b gpiochip0 23
trixie:gpiomon -e rising -c 0 23 -
@karsten13 dang I hate breaking changes for no obvious value
-
Thanks for the analysis so far. Anything I can test?
-
@karsten13 said
trixie:
gpiomon -e rising -c 0 23You could try Karsten‘s suggestion…
Replace your configs gpioCommand with the suggested one and check what happens…
As I had assumed in my earlier post it‘s may related more to gpio than to HDMI …Regards,
Ralf -
Hi Ralf and Karsten,
Thanks for your support. I tried, but did not work unfortunately. Still the monitor goes on for no reason.
So I switched now to X11, and updated the config file, AND finally it works. Here my command:
{
module: “MMM-Universal-Pir”,
position: “top_left”,
config: {
gpioCommand: “/usr/bin/gpiomon -e rising -c 0 22”,
//onCommand: “WAYLAND_DISPLAY=‘wayland-1’ wlr-randr --output HDMI-A-1 --on”,
//offCommand: “WAYLAND_DISPLAY=‘wayland-1’ wlr-randr --output HDMI-A-1 --off”,
//onCommand: “wlr-randr --output HDMI-A-1 --on”,
//offCommand: “wlr-randr --output HDMI-A-1 --off”,
//onCommand: “echo on | sudo tee /sys/class/drm/card0-HDMI-A-1/status”,
//offCommand: “echo off | sudo tee /sys/class/drm/card0-HDMI-A-1/status”,
//onCommand: “/usr/local/bin/hdmi-on.sh”,
//offCommand: “/usr/local/bin/hdmi-off.sh”,//X11:
onCommand: “xrandr --output HDMI-1 --mode 1920x1080 --rate 60”,
offCommand: “xrandr --output HDMI-1 --off”,
//onCommand: “xrandr --output HDMI-1 --on”,
//offCommand: “xrandr --output HDMI-1 --off”,
//onCommand: “vcgencmd display_power 1”,
//offCommand: “vcgencmd display_power 0”,
//onCommand: “wlr-randr --output HDMI-1 --on”,
//offCommand: “wlr-randr --output HDMI-1 --off”,deactivateDelay: 40 * 1000,
}
},
My assumption is that the auto-switch to On of the monitor comes from raspi-connect. With VNC this is not the case. But this is not thoroughly tested, just gut feel.Maybe a last question you might help me with: with the now working offCommand my VNC window on the PC shrinks to tiny. Any suggestion how to avoid?
Best,
Hobbes aka Dirk
-
@Hobbes-0 Dear Dirk,
This is „normal“ behaviour with VNC…
Some other PIR modules (especially Bugsounet‘s MMM-Pir) solved this with placing a mouse-sensitive layer on the GUI and mouse click in VNV wakes the screen.
AFAIK this is not true for MMM-Universal-Pir.Regards,
Ralf -
H Hobbes 0 has marked this topic as solved on
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