How to prevent input devices from unblanking the X screen when DPMS is on?
Merlijn Wajer
merlijn at wizzup.org
Fri Aug 7 14:07:35 UTC 2020
Hi,
Is it possible to have X handle input events, but not actually unblank
the screen upon input events when dpms is enabled?
Our use case (in Maemo Leste, GNU/Linux+Debian smartphone OS) is
reporting physical volume buttons to X clients when the device is
locked. When the device is locked, the screen is blanked / turned off
(via DPMS), but pressing a volume button causes the screen to unblank,
leading to significant power drain.
I am aware that one can tell X to close certain/all input devices, but
then the volume buttons (and others: like 'next') would not be sent to X
applications.
I have not tested this, but I assume the same would apply for "headphone
buttons": play, stop, pause, etc. Or if someone has a phone in their
pocket: pressing a button by accident shouldn't cause the screen to
unblank and cause significant battery drain. By design, the DPMS timeout
is set to 0, and an external program will dim the screen brightness, and
tell X when to blank and unblank.
Turning off the screen with DPMS, and then disabling DPMS in an attempt
to keep the screen blanked (and have input not affect it) also does not
work - then the screen doesn't stay blanked - this is with the
modesetting driver.
Due to the way DRM works, X is the master of the screen, so it is my
understanding that there also cannot be another helper tool that blanks
the display via DRM, because X is still the master, even when DPMS is
disabled.
On older versions of Maemo, where DRM was not used (10+ years ago),
external tools can just blank the fb and everything works as expected.
Then DPMS is simply disabled, and external tools control the blanking
behaviour, but it looks like with DRM, this is no longer possible.
Any suggestions are highly appreciated.
Regards,
Merlijn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: OpenPGP digital signature
URL: <https://lists.x.org/archives/xorg-devel/attachments/20200807/f697417a/attachment.sig>
More information about the xorg-devel
mailing list