0

I want to blank a touch screen monitor on inactivity without loosing signal on HDMI.

I've found xset dpms force off (and suspend and standby), but all these commands result in no signal being sent via HDMI, and monitor displays No Input Signal with a very bright blue background, which is annoying.

Is it possible to turn off display without making it think, that HDMI signal was lost?

The touch is connected via USB, and work even if the screen is turned off via command above - screen turns on after touched.

1 Answer 1

0

DDC/CI for turning off the screen (instead of HDMI DPMS)

I've solved it using DDC/CI protocol, with ddcutil tool.

Example run commands:

ddcutil setvcp D6 0x02; sleep 10s; ddcutil setvcp D6 0x01

Warning: this bypasses X server and wayland compositor, and therefore reset back to 0x01 needs to be handled manually. The example command resets it back after waiting for 10s. Just, make sure you copy paste the full command as one-liner.

Full kiosk setup

For auto-off based on idle detection, I've created a script based on this answer (see it for getIdle):

#!/bin/bash

idle=false
idleAfter=90000

while true; do
  idleTimeMillis=$(./getIdle)
  
  if [[ $idle = false && $idleTimeMillis -gt $idleAfter ]] ; then
    i3lock -c 000000 &
    ddcutil setvcp D6 0x02
    idle=true
  fi

  if [[ $idle = true && $idleTimeMillis -lt $idleAfter ]] ; then
    ddcutil setvcp D6 0x01
    sleep 3s
    pkill i3lock
    idle=false
  fi
  sleep 0.1s

done

And, I created ~/.config/lxsession/LXDE-pi/autostart for auto starting all things:

@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi

@/path/to/idle-monitor.sh
@chromium-browser http://url-of-the-fullscreen-app/ --kiosk --noerrdialogs --disable-infobars --no-first-run --enable-features=OverlayScrollbar --start-maximize

Notes:

  • I added i3lock (because it's simple), and sleep 3s before killing it, to prevent registration of touches in the chromium until display slowly comes back on,
  • kiosk setup above is for X backend and not Wayland.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.