From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932072AbcCGQW4 (ORCPT ); Mon, 7 Mar 2016 11:22:56 -0500 Received: from slow1-d.mail.gandi.net ([217.70.178.86]:44761 "EHLO slow1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753414AbcCGQWZ (ORCPT ); Mon, 7 Mar 2016 11:22:25 -0500 X-Originating-IP: 83.155.44.161 Message-ID: <1457367568.2648.72.camel@hadess.net> Subject: Re: [PATCH] ACPI / button: Avoid using broken _LID on Surface tablet From: Bastien Nocera To: "Zheng, Lv" , "Chen, Yu C" , "linux-acpi@vger.kernel.org" Cc: "linux-kernel@vger.kernel.org" , "rjw@rjwysocki.net" , "lenb@kernel.org" , "Zhang, Rui" , "cwhuang@android-x86.org" Date: Mon, 07 Mar 2016 17:19:28 +0100 In-Reply-To: <1AE640813FDE7649BE1B193DEA596E883BB60425@SHSMSX101.ccr.corp.intel.com> References: <1454497460-16803-1-git-send-email-yu.c.chen@intel.com> <1AE640813FDE7649BE1B193DEA596E883BB4B97D@SHSMSX101.ccr.corp.intel.com> <36DF59CE26D8EE47B0655C516E9CE640286C4774@shsmsx102.ccr.corp.intel.com> <1AE640813FDE7649BE1B193DEA596E883BB4DA8A@SHSMSX101.ccr.corp.intel.com> <1456150475.23430.16.camel@hadess.net> <1AE640813FDE7649BE1B193DEA596E883BB60425@SHSMSX101.ccr.corp.intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.1 (3.18.5.1-1.fc23) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2016-03-04 at 03:37 +0000, Zheng, Lv wrote: > > > I'm not happy about the "fix" for this problem either, but blaming > > user-space for this is harsh, given the API exported by the kernel > > and > > how pretty much every laptop worked. > > > [Lv Zheng]  > It worked for so many years on top of traditional x86 laptops where > the LID open event is handled by the BIOS to trigger a wake GPE. > Now we are talking about runtime idle systems where resuming from the > s2idle invokes no BIOS code. > The new case is still working on Windows. > Which forces us to re-consider the kernel API of the ACPI LID. The current kernel API works on 99% of machines up until now, user- space could not have been expected to know that the Lid status might be incorrect on some machines, it had no way to know that, there was no documentation saying "don't use the Lid status outside of Lid status change events". We either need to extend the current API to export the fact that we should ignore the LID status outside of events, or we need a new API. (We could fix this without any kernel changes, but we really need the kernel to document that fact, and export it to user-space) This is something you should have said at the start of the mail, instead of repeatedly saying that user-space was broken. User-space behaviour hasn't changed there for more than 10 years, and I'm fairly certain it's worked the same way as APM (on x86) and PMU (on Mac PPC machines) did. Cheers