Linux Power Management development
 help / color / mirror / Atom feed
From: Ken Moffat <zarniwhoop@ntlworld.com>
To: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Cc: Thorsten Leemhuis <regressions@leemhuis.info>,
	linux-kernel@vger.kernel.org,
	"regressions@lists.linux.dev" <regressions@lists.linux.dev>,
	Linux PM <linux-pm@vger.kernel.org>, Pavel Machek <pavel@ucw.cz>,
	"Rafael J. Wysocki" <rafael@kernel.org>
Subject: Re: regression, 5.19.0-rc1 not powering off when hibernated
Date: Thu, 16 Jun 2022 18:06:13 +0100	[thread overview]
Message-ID: <YqtjBdEY59P9JQsx@llamedos.localdomain> (raw)
In-Reply-To: <65fbe95b-241a-c5c5-4eca-d6932e0fd59d@collabora.com>

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 <dmitry.osipenko@collabora.com>
> >> 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 <dmitry.osipenko@collabora.com>
> >>     Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> >>
> >> 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 <zarniwhhop@ntlworld.com>
Tested-by: Ken Moffat <zarniwhoop@ntlworld.com>

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

  reply	other threads:[~2022-06-16 17:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <YqE22nS9k2+AldI6@llamedos.localdomain>
2022-06-11 13:53 ` regression, 5.19.0-rc1 not powering off when hibernated Thorsten Leemhuis
2022-06-11 17:23   ` Ken Moffat
2022-06-13 19:46     ` Ken Moffat
2022-06-15 16:40       ` Ken Moffat
2022-06-15 19:52         ` Ken Moffat
2022-06-16 14:59           ` Dmitry Osipenko
2022-06-16 17:06             ` Ken Moffat [this message]
2022-06-17 11:48               ` Dmitry Osipenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YqtjBdEY59P9JQsx@llamedos.localdomain \
    --to=zarniwhoop@ntlworld.com \
    --cc=dmitry.osipenko@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rafael@kernel.org \
    --cc=regressions@leemhuis.info \
    --cc=regressions@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox