From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rafael J. Wysocki" Subject: Re: [patch] Refresh lid state on resume Date: Tue, 31 Jul 2007 11:08:42 +0200 Message-ID: <200707311108.42947.rjw@sisk.pl> References: <1184670921.8890.2.camel@work> <1185808891.18821.25.camel@queen.suse.de> <1185809610.24649.3.camel@hughsie-laptop> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Return-path: Received: from ogre.sisk.pl ([217.79.144.158]:56748 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752531AbXGaI77 (ORCPT ); Tue, 31 Jul 2007 04:59:59 -0400 In-Reply-To: <1185809610.24649.3.camel@hughsie-laptop> Content-Disposition: inline Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Richard Hughes Cc: trenn@suse.de, Len Brown , Dmitry Torokhov , linux-acpi , linux-input , Kay Sievers On Monday, 30 July 2007 17:33, Richard Hughes wrote: > On Mon, 2007-07-30 at 17:21 +0200, Thomas Renninger wrote: > > On Tue, 2007-07-17 at 12:15 +0100, Richard Hughes wrote: > > > On resume we need to refresh the lid status as we will not get an event if > > > the lid opening was what triggered the suspend. > > > This manifests itself in users never getting a "lid open" event when a > > > suspend happens because of lid close on hardware that supports wake on > > > lid open. This makes userspace gets very confused indeed. > > > Patch inline (and also attached) forces a check of the lid status in the > > > resume handler. > > Is this a general problem on all machines? > > I've only seen myself it on new ThinkPads such as the T61 and X60, > although I've been getting a few bug reports about other IBM laptops. > > > Or does this only happen if "shutdown" suspend mode is used? > > No, I don't believe so. > > > I could imagine a lot machines let it up to OS to check for LID state > > change, then this one should be added. > > I guess it's up to the BIOS, and I don't think this refresh hurts any > machines that implement a notify on resume, and fixes a fair few > machines that don't. AFAICS, the notify doesn't seem to work very well on some machines. Are there any downsides of the $subject patch? Greetings, Rafael -- "Premature optimization is the root of all evil." - Donald Knuth