Skip to content

Comments

Add DPMS screen timeout feature#212

Merged
kdj0c merged 1 commit intokmscon:mainfrom
jtollet:main
Jan 13, 2026
Merged

Add DPMS screen timeout feature#212
kdj0c merged 1 commit intokmscon:mainfrom
jtollet:main

Conversation

@jtollet
Copy link
Contributor

@jtollet jtollet commented Jan 12, 2026

Summary

Implements automatic screen blanking after a configurable period of keyboard and mouse inactivity.

Features

  • Configurable timeout via --dpms-timeout option (in seconds, 0 = disabled by default)
  • Per-seat DPMS timer and state tracking
  • Automatic display turn-off (DPMS_OFF) after inactivity
  • Immediate reactivation on any keyboard or mouse input
  • Proper handling of display hotplug events (only applies DPMS to activated displays)

@kdj0c
Copy link
Contributor

kdj0c commented Jan 12, 2026

Sorry I just merged #211 which renamed kmscon.conf to kmscon.conf.example.
The conflict is trivial to solve.

Implements automatic screen blanking after a configurable period of
keyboard and mouse inactivity. The feature can be enabled via the
--dpms-timeout option (in seconds), with 0 meaning disabled (default).

When the timeout expires, all displays are turned off using DPMS_OFF.
Any keyboard or mouse input will turn the displays back on and reset
the timer.

The implementation includes proper handling of display hotplug events
by only applying DPMS state changes to activated displays, preventing
errors when displays are disconnected and reconnected.

Changes:
- Add dpms_timeout configuration option (kmscon_conf.h, kmscon_conf.c)
- Add per-seat DPMS timer and state tracking (kmscon_seat.c)
- Register keyboard and mouse event handlers to reset timer
- Add DPMS timeout management functions with activated display checks
- Filter pointer events to only react to user actions (MOVED, BUTTON, WHEEL)
- Document new option in example config file
- Add man page documentation (kmscon.1.xml.in, kmscon.conf.1.xml.in)
@jtollet
Copy link
Contributor Author

jtollet commented Jan 13, 2026

No worries @kdj0c I just modified to PR accordingly.

@kdj0c kdj0c merged commit 28df465 into kmscon:main Jan 13, 2026
2 checks passed
@satmandu
Copy link
Contributor

@kdj0c Any chance of a new tagged release soon so I don't have to build from a commit for this feature?

@kdj0c
Copy link
Contributor

kdj0c commented Jan 14, 2026

@satmandu Yes, there are a lot of changes since last release, so I will try to tag one this week.

@satmandu
Copy link
Contributor

@kdj0c Thanks! It would be nice to ping the downstream debian maintainers about the new functionality and why they should put out a new version derived from the new (old) upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants