[systemd-devel] How does systemd-logind know if it is docked?

Mantas Mikulėnas grawity at gmail.com
Mon Jan 1 15:53:30 UTC 2018


On Mon, Jan 1, 2018 at 1:39 AM, Ian Pilcher <arequipeno at gmail.com> wrote:

> I ran into an issue where systemd-logind is suspending my system when it
> boots with the lid closed, even though it is docked.  The root cause
> seems to be a kernel regression, but it begs the question, how does
> systemd-logind determine whether it is docked?


There are two checks:

1) An input device reports a "switch" with SW_DOCK being enabled.
2) An external display is connected (by counting 'drm' connectors prefixed
"VGA", "DVI", "HDMI", etc.)

(Also I vaguely remember something else that kept resulting in false
positives on one of my old laptops, which implements IDE hotplugging as a
pseudo-"dock" device...)

As a workaround you can just configure HandleLidSwitchDocked=.

-- 
Mantas Mikulėnas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20180101/0f0c01da/attachment.html>


More information about the systemd-devel mailing list