login: make hold-off timeout configurable

System Internals / systemd - David Herrmann [gmail.com] - 6 March 2015 07:37 UTC

This introduces 'HoldoffTimeoutSec' to logind.conf to make IGNORE_LID_SWITCH_{SUSPEND,STARTUP}_USEC configurable.

Background: If an external monitor is connected, or if the system is docked, we want to ignore LID events. This is required to support setups where a laptop is used with external peripherals while the LID is closed. However, this requires us to probe all hot-plugged devices before reacting to LID events. But with modern buses like USB, the standards do not impose any timeout on the slots, so we have no chance to know whether a given slot is used or not. Hence, after resume and startup, we have to wait a fixed timeout to give the kernel a chance to probe devices. Our timeout has always been generous enough to support even the slowest devices. However, a lot of people didn't use these features and wanted to disable the hold-off timer. Now we provide a knob to do that.

9d10cbe login: make hold-off timeout configurable
man/logind.conf.xml | 15 +++++++++++++++
src/login/logind-dbus.c | 3 ++-
src/login/logind-gperf.gperf | 1 +
src/login/logind.c | 3 ++-
src/login/logind.conf | 1 +
src/login/logind.h | 4 +---
6 files changed, 22 insertions(+), 5 deletions(-)

Upstream: github.com


  • Share