Linux ACPI
 help / color / mirror / Atom feed
From: Muhammad Usama Anjum <usama.anjum@collabora.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>, superm1@kernel.org
Cc: usama.anjum@collabora.com, kernel@collabora.com,
	Len Brown <lenb@kernel.org>,
	linux-pm@vger.kernel.org, Danilo Krummrich <dakr@kernel.org>,
	Pavel Machek <pavel@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-input@vger.kernel.org,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/4] PM: Hibernate: Add hibernation cancellation support
Date: Mon, 24 Nov 2025 18:03:16 +0500	[thread overview]
Message-ID: <9c61f778-fd65-4b28-8bda-e8463dda2862@collabora.com> (raw)
In-Reply-To: <20251107184438.1328717-1-usama.anjum@collabora.com>

Hi,

Please review the patches when you have time. 

On 11/7/25 11:44 PM, Muhammad Usama Anjum wrote:
> On a normal laptop/PC, the hibernation takes 15-20 seconds which is
> considerable time. Once hibernation is triggered from command line or by
> some GUI option, the hibernation cannot be cancelled until completed.
> Its not a blocker, but poor user experience.
> 
> When power button is pressed during hibernation, it generates interrupt
> and then the event is routed to userspace. If systemd is being used, the
> logind handles these events and performs the specific action.
> 
> During hibernation, the first stage is to freeze the userspace. Hence
> even if the power button is pressed, it doesn't aborts the hibernation
> as user space daemon is frozen.
> 
> My device takes ~19 seconds to hibernate. When I was testing hibernation
> using rtcwake with timeout of 10 seconds, I found out that hibernation
> gets canceled around 10 seconds mark when the interrupt fires.
> 
> In this series, the idea is to find a way to cancel the hibernation.
> With this series applied, the hibernation gets cancelled gracefully.
> 
> The hibernation cancellation support isn't present in very last stage
> just before power_down(). I've not been able to handle the error paths
> correctly there yet as logs aren't available from that stage. I'll send
> that patch separately when it works.
> 
> Cc: rafael@kernel.org
> Cc: superm1@kernel.org
> ---
> Changes since RFC:
> - Update description of patches
> - Use pm_sleep_transition_in_progress() instead of
>   hibernation_in_progress()
> 
> Muhammad Usama Anjum (4):
>   PM: hibernate: export pm_sleep_transition_in_progress()
>   ACPI: button: Cancel hibernation if button is pressed during
>     hibernation
>   Input: Ignore the KEY_POWER events if hibernation is in progress
>   PM: sleep: clear pm_abort_suspend at suspend
> 
>  drivers/acpi/button.c     | 12 +++++++++---
>  drivers/base/power/main.c |  2 ++
>  drivers/input/input.c     |  6 ++++++
>  kernel/cpu.c              |  1 +
>  kernel/power/hibernate.c  |  5 ++++-
>  kernel/power/main.c       |  1 +
>  kernel/power/process.c    |  1 +
>  7 files changed, 24 insertions(+), 4 deletions(-)
> 


-- 
---
Thanks,
Usama

  parent reply	other threads:[~2025-11-24 13:03 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-07 18:44 [PATCH 0/4] PM: Hibernate: Add hibernation cancellation support Muhammad Usama Anjum
2025-11-07 18:44 ` [PATCH 1/4] PM: hibernate: export pm_sleep_transition_in_progress() Muhammad Usama Anjum
2025-11-24 17:01   ` Greg Kroah-Hartman
2025-11-25 16:44     ` Muhammad Usama Anjum
2025-11-07 18:44 ` [PATCH 2/4] ACPI: button: Cancel hibernation if button is pressed during hibernation Muhammad Usama Anjum
2025-11-24 17:03   ` Greg Kroah-Hartman
2025-11-25 11:12     ` Muhammad Usama Anjum
2025-11-25 11:47       ` Greg Kroah-Hartman
2025-11-25 16:41         ` Muhammad Usama Anjum
2025-11-26  7:38           ` Greg Kroah-Hartman
2025-11-26 12:55             ` Mario Limonciello
2025-11-26 13:26               ` Muhammad Usama Anjum
2025-11-26 13:41             ` Muhammad Usama Anjum
2025-11-24 18:42   ` Rafael J. Wysocki
2025-11-28 14:17     ` Muhammad Usama Anjum
2025-11-07 18:44 ` [PATCH 3/4] Input: Ignore the KEY_POWER events if hibernation is in progress Muhammad Usama Anjum
2025-11-24 18:50   ` Rafael J. Wysocki
2025-11-25 10:22     ` Muhammad Usama Anjum
2025-11-25 12:25       ` Rafael J. Wysocki
2025-11-25 16:05         ` Muhammad Usama Anjum
2025-11-28 17:00         ` Muhammad Usama Anjum
2025-11-07 18:44 ` [PATCH 4/4] PM: sleep: clear pm_abort_suspend at suspend Muhammad Usama Anjum
2025-11-24 18:54   ` Rafael J. Wysocki
2025-11-25  9:53     ` Muhammad Usama Anjum
2025-11-25 12:59       ` Rafael J. Wysocki
2025-11-24 13:03 ` Muhammad Usama Anjum [this message]
2026-01-02 22:40 ` [PATCH 0/4] PM: Hibernate: Add hibernation cancellation support Pavel Machek

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=9c61f778-fd65-4b28-8bda-e8463dda2862@collabora.com \
    --to=usama.anjum@collabora.com \
    --cc=dakr@kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel@collabora.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pavel@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.org \
    --cc=superm1@kernel.org \
    --cc=tglx@linutronix.de \
    /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