From: Dmitry Osipenko <dmitry.osipenko@collabora.com>
To: Antheas Kapenekakis <lkml@antheas.dev>
Cc: bob.beckett@collabora.com, bookeldor@gmail.com,
hadess@hadess.net, jaap@haitsma.org, kernel@collabora.com,
lennart@poettering.net, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org, mccann@jhu.edu, rafael@kernel.org,
richard@hughsie.com, sebastian.reichel@collabora.com,
superm1@kernel.org, systemd-devel@lists.freedesktop.org,
xaver.hugl@gmail.com
Subject: Re: [RFC v2 00/10] acpi/x86: s2idle: Introduce and implement hint class ABI and idle hint for s2idle
Date: Wed, 13 May 2026 06:11:34 +0300 [thread overview]
Message-ID: <580525dd-baf6-45ba-8996-be9e90dd2d10@collabora.com> (raw)
In-Reply-To: <20260425215734.14116-1-lkml@antheas.dev>
Hello Antheas,
On 4/26/26 00:57, Antheas Kapenekakis wrote:
> This is a two-part RFC series that in the first part cleans up the Modern
> Standby firmware notification order and in the second part exposes them to
> userspace using a new hint class ABI that can be extended in the future to
> add more userspace hints to devices.
>
> For more information, see the V1 description.
>
> In the first part, we begin by renaming the s2idle.c constants to match
> their spec from Windows. Following, we place all MS firmware notifications
> to begin() and end() to match Windows, ensuring that the USB subsystems and
> EC are active when they fire, eliminating a class of bugs due to the
> mismatch. Finally, we add a small delay quirk to begin that is required by
> ROG Ally devices, which is bound to asus-wmi through the handler interface
> exposed by s2idle.
>
> Since these bugs completely fix the sleep behavior for all models and
> firmware versions of Ally devices, including those introduced with the
> previous suspend fixes when mcu_powersave is off (which is part of the
> reason the driver forced it to on; not just standby battery drain), a
> cleanup follows that removes the duplicate handling of CSEE (the underlying
> function of the Display On/Off _DSMs and which malfunctioned because the
> USB subsystem was suspended during its calls) and the now unnecessary
> firmware version checks and error logging.
>
> In the second part, a new /sys/class/hint interface is introduced with an
> initial hint, "idle", which allows modifying the idle state of the device.
> I chose the name "idle" instead of "activity" to leave "activity" free to
> use in the future for e.g. "gaming", "video", which might be useful
> especially for embedded devices. "idle" might alias with "s2idle" so the
> name is not set in stone.
>
> Each driver that wants to implement hints can register a hint class and add
> hints to it, which are then exposed in /sys/class/hint/<class>/idle
> allowing them to receive updates as well. Current WMI drivers should not,
> as their behavior is already handled by the initial s2idle idle hint.
> However, non-MS devices can e.g. the ChromeOS EC or even the CPU scheduler.
>
> The two parts are designed to be independent of each other, so that we can
> merge the re-order in an initial kernel version and the hint interface in a
> later kernel version, if needed. As such, after the first part is cleaned
> up it will be resent as non-RFC and the Asus/hid/px86 maintainers will be
> cc'd. Then, we will iterate on the hint interface.
>
> To test this series, it is recommended to enable logs with:
>
> sudo bash -c "cat > /sys/kernel/debug/dynamic_debug/control" << EOF
> file drivers/acpi/x86/s2idle.c +p
> file kernel/power/suspend.c +p
> file drivers/base/hint.c +p
> EOF
> echo 1 | sudo tee /sys/power/pm_debug_messages
>
> Here are some commands afterwards:
>
> echo "active" | sudo tee /sys/class/hint/s2idle/idle; cat /sys/class/hint/s2idle/idle
> echo "inactive" | sudo tee /sys/class/hint/s2idle/idle; cat /sys/class/hint/s2idle/idle
> echo "snooze" | sudo tee /sys/class/hint/s2idle/idle; cat /sys/class/hint/s2idle/idle
>
> I have not tested this series on Ally devices yet, focusing on the Z13.
> A previous version of the series performed correctly and is what was used
> in e.g., Bazzite, with around 5-10k Ally users.
>
> Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
> ---
>
> Changes since v1:
> - Rebase to v7.0
> - Other than the first patch, the rest are re-written.
> - The hint class is based on a simplified version of platform-profiles
> - Transition handling is now done in s2idle.c exclusively and is not
> part of the main ABI. Drivers receive idle hints updates instead.
> - The rename patch now also renames upstream ACPI_MS_TURN_ON_DISPLAY to
> ACPI_LPS0_TURN_ON_DISPLAY for consistency. It is also fired
> unconditionally now by the transition handler in patch n-1.
>
> V1: https://lore.kernel.org/all/20251226102656.6296-1-lkml@antheas.dev/
>
> Antheas Kapenekakis (10):
> acpi/x86: s2idle: Rename LPS0 constants so they mirror their function
> acpi/x86: s2idle: Move Modern Standby calls to s2idle begin/end
> acpi/x86: s2idle: Add support for adding a delay after begin MS calls
> platform/x86: asus-wmi: add s2idle begin delay for Ally devices
> HID: asus: remove quirk handling for Ally devices
> platform/x86: asus-wmi: Remove Ally s2idle resume fixes
> Documentation: Add documentation for the new sysfs hints class
> hint: Add hint class ABI for devices to receive updates on host
> activity
> acpi/x86: s2idle: Listen to idle hints to perform MS transitions
> acpi/x86: s2idle: Subtract delay from last DSM fire in begin delay
>
> Documentation/ABI/testing/sysfs-class-hint | 78 ++++++
> MAINTAINERS | 8 +
> drivers/acpi/Kconfig | 1 +
> drivers/acpi/x86/s2idle.c | 309 ++++++++++++++++-----
> drivers/base/Kconfig | 3 +
> drivers/base/Makefile | 1 +
> drivers/base/hint.c | 283 +++++++++++++++++++
> drivers/hid/hid-asus.c | 113 +-------
> drivers/platform/x86/asus-nb-wmi.c | 40 +++
> drivers/platform/x86/asus-wmi.c | 132 +--------
> drivers/platform/x86/asus-wmi.h | 14 +
> include/linux/acpi.h | 1 +
> include/linux/hint.h | 38 +++
> include/linux/platform_data/x86/asus-wmi.h | 8 -
> 14 files changed, 727 insertions(+), 302 deletions(-)
> create mode 100644 Documentation/ABI/testing/sysfs-class-hint
> create mode 100644 drivers/base/hint.c
> create mode 100644 include/linux/hint.h
>
>
> base-commit: 028ef9c96e96197026887c0f092424679298aae8
The v2 patches work well on my setup, the hint sysfs works. No problems
was spotted.
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
--
Best regards,
Dmitry
prev parent reply other threads:[~2026-05-13 3:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-25 21:57 [RFC v2 00/10] acpi/x86: s2idle: Introduce and implement hint class ABI and idle hint for s2idle Antheas Kapenekakis
2026-04-25 21:57 ` [RFC v2 01/10] acpi/x86: s2idle: Rename LPS0 constants so they mirror their function Antheas Kapenekakis
2026-04-26 14:14 ` Rafael J. Wysocki
2026-04-26 16:54 ` Antheas Kapenekakis
2026-04-27 15:07 ` Rafael J. Wysocki
2026-04-25 21:57 ` [RFC v2 02/10] acpi/x86: s2idle: Move Modern Standby calls to s2idle begin/end Antheas Kapenekakis
2026-05-08 19:24 ` Rafael J. Wysocki
2026-05-08 19:49 ` Antheas Kapenekakis
2026-04-25 21:57 ` [RFC v2 03/10] acpi/x86: s2idle: Add support for adding a delay after begin MS calls Antheas Kapenekakis
2026-04-28 1:57 ` Mario Limonciello
2026-04-28 7:47 ` Antheas Kapenekakis
2026-04-25 21:57 ` [RFC v2 04/10] platform/x86: asus-wmi: add s2idle begin delay for Ally devices Antheas Kapenekakis
2026-04-28 1:56 ` Mario Limonciello
2026-04-28 6:34 ` [systemd-devel] " Paul Menzel
2026-04-28 8:18 ` Antheas Kapenekakis
2026-04-25 21:57 ` [RFC v2 05/10] HID: asus: remove quirk handling " Antheas Kapenekakis
2026-04-25 21:57 ` [RFC v2 06/10] platform/x86: asus-wmi: Remove Ally s2idle resume fixes Antheas Kapenekakis
2026-04-25 21:57 ` [RFC v2 07/10] Documentation: Add documentation for the new sysfs hints class Antheas Kapenekakis
2026-04-25 21:57 ` [RFC v2 08/10] hint: Add hint class ABI for devices to receive updates on host activity Antheas Kapenekakis
2026-04-25 21:57 ` [RFC v2 09/10] acpi/x86: s2idle: Listen to idle hints to perform MS transitions Antheas Kapenekakis
2026-04-25 21:57 ` [RFC v2 10/10] acpi/x86: s2idle: Subtract delay from last DSM fire in begin delay Antheas Kapenekakis
2026-05-13 3:11 ` Dmitry Osipenko [this message]
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=580525dd-baf6-45ba-8996-be9e90dd2d10@collabora.com \
--to=dmitry.osipenko@collabora.com \
--cc=bob.beckett@collabora.com \
--cc=bookeldor@gmail.com \
--cc=hadess@hadess.net \
--cc=jaap@haitsma.org \
--cc=kernel@collabora.com \
--cc=lennart@poettering.net \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkml@antheas.dev \
--cc=mccann@jhu.edu \
--cc=rafael@kernel.org \
--cc=richard@hughsie.com \
--cc=sebastian.reichel@collabora.com \
--cc=superm1@kernel.org \
--cc=systemd-devel@lists.freedesktop.org \
--cc=xaver.hugl@gmail.com \
/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