Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751815AbdFPQdC (ORCPT ); Fri, 16 Jun 2017 12:33:02 -0400 Received: from gardel.0pointer.net ([85.214.157.71]:36692 "EHLO gardel.0pointer.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750865AbdFPQc6 (ORCPT ); Fri, 16 Jun 2017 12:32:58 -0400 Date: Fri, 16 Jun 2017 18:32:55 +0200 From: Lennart Poettering To: Bastien Nocera Cc: "Zheng, Lv" , "Brown, Len" , "systemd-devel@lists.freedesktop.org" , "linux-acpi@vger.kernel.org" , "Wysocki, Rafael J" , "Rafael J . Wysocki" , "linux-kernel@vger.kernel.org" , Lv Zheng , Benjamin Tissoires , "linux-input@vger.kernel.org" Subject: Re: [systemd-devel] [WIP PATCH 0/4] Rework the unreliable LID switch exported by ACPI Message-ID: <20170616163255.GA3461@gardel-login> References: <1AE640813FDE7649BE1B193DEA596E886CED0386@SHSMSX101.ccr.corp.intel.com> <20170615064715.GA6195@jelly> <1AE640813FDE7649BE1B193DEA596E886CED047B@SHSMSX101.ccr.corp.intel.com> <20170615075755.GA10001@jelly> <1AE640813FDE7649BE1B193DEA596E886CED0A03@SHSMSX101.ccr.corp.intel.com> <20170616072322.GL5085@mail.corp.redhat.com> <1AE640813FDE7649BE1B193DEA596E886CED0AC1@SHSMSX101.ccr.corp.intel.com> <20170616080950.GM5085@mail.corp.redhat.com> <1AE640813FDE7649BE1B193DEA596E886CED0C5E@SHSMSX101.ccr.corp.intel.com> <33C872C7-EFB2-4CA0-8CAD-8B6E8916180C@hadess.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <33C872C7-EFB2-4CA0-8CAD-8B6E8916180C@hadess.net> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1086 Lines: 26 On Fri, 16.06.17 11:06, Bastien Nocera (hadess@hadess.net) 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