From: Antheas Kapenekakis <lkml@antheas.dev>
To: dmitry.osipenko@collabora.com
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, lkml@antheas.dev, 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: [RFC v2 07/10] Documentation: Add documentation for the new sysfs hints class
Date: Sat, 25 Apr 2026 23:57:31 +0200 [thread overview]
Message-ID: <20260425215734.14116-8-lkml@antheas.dev> (raw)
In-Reply-To: <20260425215734.14116-1-lkml@antheas.dev>
The new sysfs hints class allows adding standardized hints to inform
devices of the host state. The initial hint added is the idle hint,
which allows userspace to inform devices of the host's idle state
based on user interaction (e.g., inactive). Add the documentation for
the new class and the currently available activity hint.
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
---
Documentation/ABI/testing/sysfs-class-hint | 78 ++++++++++++++++++++++
1 file changed, 78 insertions(+)
create mode 100644 Documentation/ABI/testing/sysfs-class-hint
diff --git a/Documentation/ABI/testing/sysfs-class-hint b/Documentation/ABI/testing/sysfs-class-hint
new file mode 100644
index 000000000000..9d6ec956ebb4
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-hint
@@ -0,0 +1,78 @@
+What: /sys/class/hint/*/name
+Date: June 2026
+KernelVersion: 7.2
+Description: Name of the class device given by the driver.
+
+ RO
+
+What: /sys/class/hint/*/idle_choices
+Date: June 2026
+KernelVersion: 7.2
+Description: If the device supports idle states, this file contains
+ space-separated list of idle states supported for this device.
+ These states can be used to modify the runtime appearance of the
+ device (e.g., turn off the fan for snooze, turn off the keyboard
+ backlight for inactive) in response to user activity and host
+ state. Userspace can keep track of the idle state of the host
+ and inform devices with idle hint support of the current state.
+
+ The following idle states are supported:
+
+ ========== ========================================
+ active The user is actively interacting with the host.
+ The device appearance is unchanged and normal.
+ inactive The user has stopped interacting with the
+ host and triggered an inactivity timer (e.g.,
+ lockscreen timeout) and the host displays
+ (if any) are off. The device may choose to
+ change its appearance (e.g. turn off its
+ backlight) or suspend if it is user facing
+ (e.g., handheld controller).
+ snooze The host enters a "dark resume" state where the
+ host should look like it is suspended. In
+ response, platform devices may turn off the
+ device fan, pulse the power light, or lower
+ the thermal envelope of the device.
+ resume While in the snooze state, userspace has decided
+ to prepare for user interaction while remaining
+ in snooze (e.g., user pressed a keyboard
+ button). If the device lowered its thermal
+ envelope for the snooze state, it can use this
+ hint to restore the normal thermal envelope and
+ lower the time to interaction.
+ ========== ========================================
+
+ Reference the following diagram for userspace implementations:
+
+ <Suspend> <-> <Snooze> <-> <Inactive> <-> <Active>
+ -> <Resume> /\
+
+ Where Suspend is the normal suspend path (e.g., s2idle). Devices
+ may support a subset of these idle states (e.g., only active and
+ inactive). In this case, userspace should report the closest
+ supported idle state that's higher than the target one.
+
+ Examples:
+ 1) Device supports inactive and active:
+ If the desired state is snooze, choose inactive
+ 2) Device supports snooze and active:
+ If the desired state is inactive, choose active
+ 3) Device does not support resume:
+ If the desired state is resume, stay in snooze
+
+ RO
+
+What: /sys/class/hint/*/idle
+Date: June 2026
+KernelVersion: 7.2
+Description: Reading this file gives the current selected idle hint for
+ this device. Writing this file with one of the strings from
+ idle_choices changes the idle state to the new value.
+
+ Depending on the device, certain transition combinations may
+ be disallowed. Specifically, devices can choose to reject
+ entering resume from a state other than snooze and re-entering
+ snooze from resume. In this case, the device rejects the change
+ with -EINVAL.
+
+ RW
--
2.53.0
next prev parent reply other threads:[~2026-04-25 21:57 UTC|newest]
Thread overview: 19+ 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-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 ` Antheas Kapenekakis [this message]
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
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=20260425215734.14116-8-lkml@antheas.dev \
--to=lkml@antheas.dev \
--cc=bob.beckett@collabora.com \
--cc=bookeldor@gmail.com \
--cc=dmitry.osipenko@collabora.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=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