Re: [systemd-devel] [WIP PATCH 0/4] Rework the unreliable LID switch exported by ACPI
From: Lennart Poettering
Date: Fri Jun 16 2017 - 12:33:09 EST
On Fri, 16.06.17 11:06, Bastien Nocera (hadess@xxxxxxxxxx) wrote:
> > Let's consider this case with delay:
> > After resume, gnome-setting-daemon queries SW_LID and got "close".
> > Then it lights up the wrong monitors.
> > Then I believe "open" will be delivered to it several seconds later.
> > Should gnome-setting-daemon light-up correct monitors this time?
> > So it just looks like user programs behave with a delay accordingly because of the "platform turnaround" delay.
>
> If you implement it in such a way that GNOME settings daemon behaves weirdly, you'll get my revert request in the mail. Do. Not. Ever. Lie.
Just to mention this:
the reason logind applies the timeout and doesn't immediately react to
lid changes is to be friendly to users, if they quickly close and
reopen the lid. It's not supposed to be a work-around around broken
input drivers.
I am very sure that input drivers shouldn't lie to userspace. If you
don't know the state of the switch, then you don#t know it, and should
clarify that to userspace somehow.
Lennart
--
Lennart Poettering, Red Hat