From: "Mario Limonciello (AMD) (kernel.org)" <superm1@kernel.org>
To: Dmitry Osipenko <dmitry.osipenko@collabora.com>,
Antheas Kapenekakis <lkml@antheas.dev>,
Lennart Poettering <lennart@poettering.net>,
Daniel Stone <daniels@collabora.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Robert Beckett <bob.beckett@collabora.com>,
linux-acpi@vger.kernel.org, kernel@collabora.com,
linux-kernel@vger.kernel.org,
Sebastian Reichel <sebastian.reichel@collabora.com>,
Xaver Hugl <xaver.hugl@gmail.com>,
Richard Hughes <richard@hughsie.com>,
William Jon McCann <mccann@jhu.edu>,
"Jaap A . Haitsma" <jaap@haitsma.org>,
Benjamin Canou <bookeldor@gmail.com>,
Bastien Nocera <hadess@hadess.net>
Subject: Re: [RFC PATCH v1 1/1] ACPI: PM: s2idle: Add lps0_screen_off sysfs interface
Date: Tue, 2 Dec 2025 20:12:01 -0600 [thread overview]
Message-ID: <ba7f9789-fd57-4d53-bf9a-15e85657ddd7@kernel.org> (raw)
In-Reply-To: <35f69c12-ecd4-4b21-bfb0-53bf57f0febf@collabora.com>
On 12/2/2025 4:35 PM, Dmitry Osipenko wrote:
> On 12/3/25 00:25, Mario Limonciello (AMD) (kernel.org) wrote:
>>> An inhibitor process in logind can handle this gracefully very simply.
>>> Involving the DRM subsystem just adds a lot of complexity and it is
>>> not clear what the benefit would be. There are no known devices that
>>> hook DRM components into that DSM.
>>>
>>>> By doing it this way userspace still has control, but it's not
>>>> mandatory for userspace to be changed.
>>>
>>> On that note, the screen off calls/userspace implementations are
>>> optional under both patch series. If userspace is not aware of them,
>>> they are still called by the kernel when suspending.
>>
>> With the proposal I mentioned you can get the LPS0 _DSM called on a
>> handheld when the screen gets called without changing userspace.
>>
>>>
>>> Current userland also duplicates the functionality of the screen off
>>> call, which is primarily turning off the keyboard backlight. So along
>>> implementing this call, userspace software like powerdevil/upower
>>> needs to be tweaked to avoid doing that if the screen off state is
>>> available.
>>
>> Sure Any hooking for turning off LEDs manually based off the screen off
>> _DSM is totally feasible.
>
> It's not that trivial to add screen on/off hooks to DRM, there is no one
> central place for that from what I can tell. I'm seeing variant with DRM
> hooks as unnecessary complexity that doesn't solve any practical problem.
Is it really that hard? I figured that any time
connector->dpms != mode from drm_atomic_connector_commit_dpms() could
walk through all the connectors and make a judgement call whether to
notify the potentially exported symbol.
>
> A week ago in a private conversation, Daniel Stone gave an example of
> laptop's lid-close handling that is done purely in userspace.
> Technically, kernel could have DRM hooks for that too, but it doesn't.
All the way into hardware sleep? There are certain requirements needed
for hardware sleep that kernel drivers are normally used to put devices
into the right state. I guess PCIe devices you can hack around with
userspace PCI config space writes but you're going to confuse the kernel
pretty badly.
>
> Userspace would need to be taught about new power modes in any case.
> Addition of DRM hooks should require a well-defined justification, which
> is currently absent.
>
Why does userspace need to know about them? Besides the inhibitor can't
this be invisible to userspace? I thought this mostly is for the
firmware to flash some LEDs and maybe change some power limits.
next prev parent reply other threads:[~2025-12-03 2:12 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-02 4:34 [RFC PATCH v1 0/1] ACPI: s2idle: Add /sys/power/lps0_screen_off Dmitry Osipenko
2025-12-02 4:34 ` [RFC PATCH v1 1/1] ACPI: PM: s2idle: Add lps0_screen_off sysfs interface Dmitry Osipenko
2025-12-02 4:43 ` Mario Limonciello (AMD) (kernel.org)
2025-12-02 5:26 ` Dmitry Osipenko
2025-12-02 9:32 ` Antheas Kapenekakis
2025-12-02 14:23 ` Mario Limonciello
2025-12-02 15:17 ` Antheas Kapenekakis
2025-12-02 21:25 ` Mario Limonciello (AMD) (kernel.org)
2025-12-02 22:35 ` Dmitry Osipenko
2025-12-03 2:12 ` Mario Limonciello (AMD) (kernel.org) [this message]
2025-12-03 6:46 ` Dmitry Osipenko
2025-12-03 10:12 ` Antheas Kapenekakis
2025-12-03 14:34 ` Mario Limonciello
2025-12-03 14:46 ` Antheas Kapenekakis
2025-12-02 21:59 ` Dmitry Osipenko
2025-12-03 14:58 ` Rafael J. Wysocki
2025-12-04 15:03 ` Dmitry Osipenko
2025-12-04 16:41 ` Rafael J. Wysocki
2025-12-04 18:31 ` Antheas Kapenekakis
2025-12-05 16:32 ` Rafael J. Wysocki
2025-12-05 16:46 ` Mario Limonciello (AMD) (kernel.org)
2025-12-05 17:22 ` Rafael J. Wysocki
2025-12-05 18:07 ` Mario Limonciello
2025-12-05 19:37 ` Rafael J. Wysocki
2025-12-05 19:42 ` Mario Limonciello
2025-12-05 20:06 ` Rafael J. Wysocki
2025-12-05 21:52 ` Antheas Kapenekakis
2025-12-06 14:34 ` Rafael J. Wysocki
2025-12-06 20:50 ` Mario Limonciello
2025-12-06 23:35 ` Antheas Kapenekakis
2025-12-07 0:31 ` Mario Limonciello
2025-12-07 10:34 ` Antheas Kapenekakis
2025-12-05 22:51 ` Antheas Kapenekakis
2025-12-07 11:06 ` Rafael J. Wysocki
2025-12-07 11:19 ` Rafael J. Wysocki
2025-12-07 11:50 ` Antheas Kapenekakis
2025-12-09 22:13 ` Dmitry Osipenko
2025-12-09 22:22 ` Antheas Kapenekakis
2025-12-09 22:23 ` Rafael J. Wysocki
2025-12-07 11:42 ` Antheas Kapenekakis
2025-12-05 13:34 ` [RFC PATCH v1 0/1] ACPI: s2idle: Add /sys/power/lps0_screen_off 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=ba7f9789-fd57-4d53-bf9a-15e85657ddd7@kernel.org \
--to=superm1@kernel.org \
--cc=bob.beckett@collabora.com \
--cc=bookeldor@gmail.com \
--cc=daniels@collabora.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=lkml@antheas.dev \
--cc=mccann@jhu.edu \
--cc=rafael@kernel.org \
--cc=richard@hughsie.com \
--cc=sebastian.reichel@collabora.com \
--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