From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0D07EC433EF for ; Thu, 16 Jun 2022 17:06:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233189AbiFPRGS (ORCPT ); Thu, 16 Jun 2022 13:06:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231343AbiFPRGR (ORCPT ); Thu, 16 Jun 2022 13:06:17 -0400 Received: from smtpq1.tb.ukmail.iss.as9143.net (smtpq1.tb.ukmail.iss.as9143.net [212.54.57.96]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1315E25294 for ; Thu, 16 Jun 2022 10:06:16 -0700 (PDT) Received: from [212.54.57.107] (helo=csmtp3.tb.ukmail.iss.as9143.net) by smtpq1.tb.ukmail.iss.as9143.net with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1swg-00073O-GQ for linux-pm@vger.kernel.org; Thu, 16 Jun 2022 19:06:14 +0200 Received: from llamedos.mydomain ([81.97.236.130]) by cmsmtp with ESMTPA id 1swfoFkxh45FH1swgo8XkA; Thu, 16 Jun 2022 19:06:14 +0200 X-SourceIP: 81.97.236.130 X-Authenticated-Sender: zarniwhoop@ntlworld.com X-Spam: 0 X-Authority: v=2.4 cv=e64V9Il/ c=1 sm=1 tr=0 ts=62ab6306 cx=a_exe a=OGiDJHazYrvzwCbh7ZIPzQ==:117 a=OGiDJHazYrvzwCbh7ZIPzQ==:17 a=IkcTkHD0fZMA:10 a=JPEYwPQDsx4A:10 a=QX4gbG5DAAAA:8 a=QyXUC8HyAAAA:8 a=NLZqzBF-AAAA:8 a=fS49ki5Q-W1sAaxG2SAA:9 a=QEXdDO2ut3YA:10 a=AbAUZ8qAyYyZVLSsDulk:22 a=wW_WBVUImv98JQXhvVPZ:22 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ntlworld.com; s=meg.feb2017; t=1655399174; bh=bGgOKyySvPDBIQ0HARYvFv7INGOOP345o5Y06M18/LU=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=521wBzsIhBiPthrG380iXdJ5B7lYK+xJoCqizjjUUSWVSstmDpNoGUVYmTHZdZpqz tFo9jczAr+oOhiAtOGStx7DZQHp67L2rARPfD2x3Hwjl1G4lN1b7oXnqx0yGuXN1/o +g9dvLILCcW152J7RlN8ZX4TGdcuaCXPxSbmi9OvtkH7vpkWRdCXhmbVHw85J+9qJH 0laJrKiyZ9QPEli5RCwQm6GIBNh+mc3sIj9lS4iEdXAvNPQ4IxCdAHbfD0N2QGhsW4 wTYxSFn1wh9rPJxAcG/zt0+i8DQe8w0bkrZsKfI+6WZZ6zS0YY+1LlgETSJ9zzfniG EnQinJU4kXFgQ== Received: by llamedos.mydomain (Postfix, from userid 1000) id A91868DB58; Thu, 16 Jun 2022 18:06:13 +0100 (BST) Date: Thu, 16 Jun 2022 18:06:13 +0100 From: Ken Moffat To: Dmitry Osipenko Cc: Thorsten Leemhuis , linux-kernel@vger.kernel.org, "regressions@lists.linux.dev" , Linux PM , Pavel Machek , "Rafael J. Wysocki" Subject: Re: regression, 5.19.0-rc1 not powering off when hibernated Message-ID: References: <84d01637-febb-f602-2d03-fe1600e85ae3@leemhuis.info> <65fbe95b-241a-c5c5-4eca-d6932e0fd59d@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Clacks-Overhead: GNU Terry Pratchett Content-Transfer-Encoding: 8bit In-Reply-To: <65fbe95b-241a-c5c5-4eca-d6932e0fd59d@collabora.com> User-Agent: Mutt/2.2.3 (2022-04-12) X-CMAE-Envelope: MS4xfNgKlh3OEABvgXRinkp/fVv/xnQv5XuI2wEFyIuhBAGpa/dBHRPoWZ/a10uHG59LQKkkgIGSiamZkqHuj7MsbcKkVW5YEm6MqLbVqZ5XoQeu4ec8R3VP 6oASgOBlqT94kaAj0bCzK2mKdljRK9hFcjEGPG3/xwOQdvwXlNSFcCvv9MGr9n/VFQN0sDcpcM+YcPdYndac3s9foWIh2EyVqud1xVs7hHMCd+0MA+gD3qWB wouc3cU9JMPQwA21O58froNwr6Y5Fvpu/+xDKVqrGssSNcAuyCctqiSSRhQWgdW4oCBFMuIdrYkBMjZMbcnZ11QrV2VlVHPqSbtwa/+naGI6LwMExwWOEPBR u9WjIeAkgf96I+38LG2P/9e/Atlect2vhoEC7tbAT/MHwe9QeJl4zkyu1LBvgmtAWjGknFcu Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On Thu, Jun 16, 2022 at 05:59:10PM +0300, Dmitry Osipenko wrote: > Hi, > > On 6/15/22 22:52, Ken Moffat wrote: > > On Wed, Jun 15, 2022 at 05:40:46PM +0100, Ken Moffat wrote: > >> On Mon, Jun 13, 2022 at 08:46:22PM +0100, Ken Moffat wrote: > >> > >>>>>> But with 5.19.0-rc1 the screen is blank throughtout the hibernation, > >>>>>> and briefly when restoring (no complaint about that), but when > >>>>>> hibernating it no longer powers off and I have to hold the on/off > >>>>>> switch to power off. > >>>>>> > >>>>>> Is this a known problem ? > >>>>> > > [...] > >> Indeed, on the second attempt I've got a much more likely commit to > >> blame: > >> > >> 98f30d0ecf79da8cf17a171fa4cf6eda7ba4dd71 is the first bad commit > >> commit 98f30d0ecf79da8cf17a171fa4cf6eda7ba4dd71 > >> Author: Dmitry Osipenko > >> Date: Tue May 10 02:32:30 2022 +0300 > >> > >> ACPI: power: Switch to sys-off handler API > >> > >> Switch to sys-off API that replaces legacy pm_power_off callbacks, > >> allowing us to remove global pm_* variables and support chaining of > >> all restart and power-off modes consistently. > >> > >> Signed-off-by: Dmitry Osipenko > >> Signed-off-by: Rafael J. Wysocki > >> > >> Unsurprisingly, with this reverted 5.19-rc2 fails to build. > >> > > It occurs to me that maybe I'm missing something in my .config. > > Since that is 117K, here is the gzipped config from the version that > > git blamed (apart from not powering off, it appears to work ok). > > The patch below likely should fix the problem, please give it a try on > top of the 5.19-rc2. Thanks, works like a charm. Feel free to add Reported-by: Ken Moffat Tested-by: Ken Moffat if you wish. Cheers, ĸen > > diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c > index 20a66bf9f465..89c71fce225d 100644 > --- a/kernel/power/hibernate.c > +++ b/kernel/power/hibernate.c > @@ -665,7 +665,7 @@ static void power_down(void) > hibernation_platform_enter(); > fallthrough; > case HIBERNATION_SHUTDOWN: > - if (pm_power_off) > + if (kernel_can_power_off()) > kernel_power_off(); > break; > } -- "Happiness isn't happiness without a violin-playing goat." -- Notting Hill