[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<CAGwozwF_Phm_MiLg3Zv89aZUGgV-DW6crXT5P9n75hd7j7hQjw@mail.gmail.com>
Date: Tue, 27 Jan 2026 16:59:35 +0100
From: Antheas Kapenekakis <lkml@...heas.dev>
To: "Rafael J. Wysocki" <rafael@...nel.org>
Cc: Jakob Riemenschneider <riemenschneiderjakob@...il.com>,
linux-acpi@...r.kernel.org,
linux-kernel@...r.kernel.org, Dmitry Osipenko <dmitry.osipenko@...labora.com>
Subject: Re: [PATCH] ACPI: x86: s2idle: Invoke Microsoft _DSM Function 9 (Turn
On Display)
On Tue, 27 Jan 2026 at 15:50, Rafael J. Wysocki <rafael@...nel.org> wrote:
>
> On Wed, Jan 7, 2026 at 4:40 PM Jakob Riemenschneider
> <riemenschneiderjakob@...il.com> wrote:
> >
> > Windows 11, version 22H2 introduced a new function index (Function 9) to
> > the Microsoft LPS0 _DSM, titled "Turn On Display Notification".
> >
> > According to Microsoft documentation, this function signals to the system
> > firmware that the OS intends to turn on the display when exiting Modern
> > Standby. This allows the firmware to release Power Limits (PLx) earlier,
> > improving resume latency on supported OEM designs. Without this call,
> > some devices may remain in a throttled power state longer than necessary
> > during resume.
>
> Has this been observed in the field?
>
> Any examples?
>
> > This patch defines the new function index (ACPI_LPS0_MS_DISPLAY_ON) and
> > invokes it in acpi_s2idle_restore_early_lps0() immediately after the
> > screen-on notification, provided the firmware supports the function in
> > its mask.
> >
> > Link: https://learn.microsoft.com/en-us/windows-hardware/design/device-experiences/modern-standby-firmware-notifications#turn-on-display-notification-function-9
> > Link: https://bugzilla.kernel.org/show_bug.cgi?id=220505
> > Signed-off-by: Jakob Riemenschneider <jriemenschne@...dent.ethz.ch>
> > ---
> > drivers/acpi/x86/s2idle.c | 10 +++++++++-
> > 1 file changed, 9 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c
> > index 6d4d06236..4ce4cc8a0 100644
> > --- a/drivers/acpi/x86/s2idle.c
> > +++ b/drivers/acpi/x86/s2idle.c
> > @@ -45,6 +45,7 @@ static const struct acpi_device_id lps0_device_ids[] = {
> > #define ACPI_LPS0_EXIT 6
> > #define ACPI_LPS0_MS_ENTRY 7
> > #define ACPI_LPS0_MS_EXIT 8
> > +#define ACPI_LPS0_MS_DISPLAY_ON 9
> >
> > /* AMD */
> > #define ACPI_LPS0_DSM_UUID_AMD "e3f32452-febc-43ce-9039-932122d37721"
> > @@ -352,6 +353,8 @@ static const char *acpi_sleep_dsm_state_to_str(unsigned int state)
> > return "lps0 ms entry";
> > case ACPI_LPS0_MS_EXIT:
> > return "lps0 ms exit";
> > + case ACPI_LPS0_MS_DISPLAY_ON:
> > + return "lps0 ms display on";
> > }
> > } else {
> > switch (state) {
> > @@ -618,9 +621,14 @@ static void acpi_s2idle_restore_early_lps0(void)
> > }
> >
> > /* Screen on */
> > - if (lps0_dsm_func_mask_microsoft > 0)
> > + if (lps0_dsm_func_mask_microsoft > 0) {
> > acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_ON,
> > lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft);
> > + /* Modern Turn Display On */
> > + acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_DISPLAY_ON,
> > + lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft);
>
> Is the ordering right with respect to the non-MSFT screen-on
> notifications below?
>
> I would expect it to be done after all of the screen-on notifications,
> so is there a specific reason to do it earlier?
>
> > + }
> > +
> > if (lps0_dsm_func_mask > 0)
> > acpi_sleep_run_lps0_dsm(acpi_s2idle_vendor_amd() ?
> > ACPI_LPS0_SCREEN_ON_AMD :
> > --
>
> Also, this kind of clashes with the "dark mode" work in progress, see
> for example:
>
> https://lore.kernel.org/linux-acpi/20251226102656.6296-1-lkml@antheas.dev/
>
Hi,
I wasn't aware of a device that uses this function but I guess OEMs
could so they shipped buggy firmware. It is added speculatively in my
series.
Technically, it is supposed to be called before ms exit, as windows
uses it to signal that _it will_ turn on the display while in sleep.
So, exit, intent, ms exit, display on.
I am not sure if it is also called when in the "screen off" state if
the device uses the mouse while inactive. Someone would need to check
in Windows using power manager. I do not have a device to check.
So, two comments from me:
- Move to before ms_exit, or show it should be fired after (sleep
exit in windows)
- Change the name, as it is a bit confusing, perhaps to
ACPI_MS_TURN_ON_DISPLAY or similar. If you can make that change I will
ack it and add rby
This merging first simplifies my series so it should go through (I can
drop "[RFC v1 6/8] acpi/x86: s2idle: implement turn on display DSM as
resume notification").
In addition, as we now know resume needs to fire always, I will need
to make some changes for V2 of my series to make sure that happens
Antheas
Powered by blists - more mailing lists