Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751316AbbEFMlq (ORCPT ); Wed, 6 May 2015 08:41:46 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:60714 "EHLO relay5-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750826AbbEFMln (ORCPT ); Wed, 6 May 2015 08:41:43 -0400 X-Originating-IP: 83.155.44.161 Message-ID: <1430916098.2786.9.camel@hadess.net> Subject: Re: A desktop environment[1] kernel wishlist From: Bastien Nocera To: Chirantan Ekbote Cc: "Rafael J. Wysocki" , John Stultz , Olof Johansson , Linux Kernel Mailing List , snanda@chromium.org, Tomeu Vizoso , Linux PM list Date: Wed, 06 May 2015 14:41:38 +0200 In-Reply-To: References: <1413881397.30379.7.camel@hadess.net> <286173531.vzKW1UoxJJ@vostro.rjw.lan> <1430822800.7954.5.camel@hadess.net> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.1 (3.16.1-1.fc22) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1339 Lines: 34 On Tue, 2015-05-05 at 12:22 -0700, Chirantan Ekbote wrote: > On Tue, May 5, 2015 at 3:46 AM, Bastien Nocera > wrote: > > > > > The last thing the power manager does, right before > > > writing "mem" to /sys/power/state, is write the wakeup_count > > > that it > > > read earlier to /sys/power/wakeup_count. If the write fails, the > > > power manager considers the suspend attempt failed, reads the new > > > wakeup_count, and starts a timer (usually 10 seconds) to retry > > > the > > > suspend. The same thing happens if the write to /sys/power/state > > > fails. > > > > Is this something that logind should do as well? > > > > We do it to avoid a race condition where a wakeup event occurs after > userspace has started the suspend process but before anything writes > "mem" to /sys/power/state. I'm guessing that this is something > logind > should be doing as well since the chances of missing a wakeup event > increase the longer any given delay inhibitor takes to delay a > suspend. File https://bugzilla.freedesktop.org/show_bug.cgi?id=90339 Cheers -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/