public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mario Limonciello <superm1@kernel.org>
To: Antheas Kapenekakis <lkml@antheas.dev>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	Dmitry Osipenko <dmitry.osipenko@collabora.com>,
	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>,
	systemd-devel@lists.freedesktop.org,
	Lennart Poettering <lennart@poettering.net>
Subject: Re: [RFC PATCH v1 1/1] ACPI: PM: s2idle: Add lps0_screen_off sysfs interface
Date: Sat, 6 Dec 2025 18:31:46 -0600	[thread overview]
Message-ID: <edfc3586-84fb-4dee-a047-9f204054e6f2@kernel.org> (raw)
In-Reply-To: <CAGwozwEp3Xc_pv-YGb_Xc46CcLKPppYaZbphV24kiNHM4Eqb-w@mail.gmail.com>



On 12/6/25 5:35 PM, Antheas Kapenekakis wrote:
> On Sat, 6 Dec 2025 at 21:50, Mario Limonciello <superm1@kernel.org> wrote:
>>
>>>> I will reply to the earlier reply from Rafael with more context, but
>>>> runtime suspend of the GPU is not part of or related to these
>>>> notifications.
>>>
>>> Of course it isn't.
>>>
>>> What we were talking about was how to get from the "displays off, no
>>> GUI activity" user space smoothly into system suspend and back.
>>>
>>> You are saying that this has been done already on AMD, so I'm not sure
>>> why you want more.
>>>
>>
>> I'm not aware this existing in any unique way for AMD.  The decision of
>> displays off; start a timer and enter suspend would be the same for any
>> vendor.
> 
> AMD retains CRTC DPMS state from userspace to s0ix currently, and you
> fixed hibernation recently too. Intel sometimes doesn't, the screen
> will sometimes flash while entering suspend.

I was talking about what Rafael said.  "What we were talking about was 
how to get from the displays off no guid activity user space smoothly 
into system suspend and back".

> 
> There is also runtime suspend on most components. Is there a case for
> powering off the iGPU completely to improve energy use?
> 

I don't really *think& there will be much of a difference.  We already 
go into GFXOFF when GC is idle, and SDMA, VCN, JPEG and VPE will be 
clock gated when not in use.

Someone would have to do power profiling to see if it's significant 
enough difference to justify it.  The easiest way to check would be:
1) Turn off all displays
2) Connect over SSH
3) Collect a RAPL power measurement for the package.
4) Unbind the PCI device from amdgpu
5) Collect a RAPL power measurement for the package.
6) Compare 3 and 5.

> The most expensive component in this process is unfreezing, then
> runtime pm freezing the GPU IP blocks after s0ix exit, then unfreezing
> it two seconds later to perform runtime checks and freezing it again.
> So for multiple exits from suspend where the IP is inactive this will
> keep repeating.

I think we would set the auto-suspend delay appropriately if we did this 
and use DPM_FLAG_SMART_SUSPEND and DPM_FLAG_MAY_SKIP_RESUME in this case.

> 
>> But GPUs aren't only used for display.  If you're actively running a
>> different workload (for example an LLM) using the GPU and happen to turn
>> off all the displays you wouldn't want it to suspend.
>>
>> What you would want is to key off:
>>
>> 1) All displays are off.
>> 2) All GPUs are unsused.
>> 3) Some time has passed.
>>
>> I feel that if userspace is going to adopt a policy like this kernel
>> drivers need to use runtime PM when displays are off and the GPUs aren't
>> being used for anything else.
>>
>> At least for AMD this doesn't happen today and would require driver
>> work.  But the same kind of work would be needed by any GPU driver.
>>
> 
> You could potentially do that, first you'd need to show that there is
> a latency benefit to powering off the GPU over entering s0ix (as
> userspace will be frozen in both cases for the GPU to suspend). Then,
> you'd need to show that there is an energy benefit over just staying
> unsuspended with userspace frozen and the GPU being in runtime
> suspend. WIth both of these, a case could be made for powering off the
> GPU completely for a marginal latency/energy benefit.
> 
> These notifications do not affect runtime pm though so this discussion
> is a bit tangential.
> 

I'm not worried about the latency.  We can change the policy for the 
autosuspend delay if latency is a problem.

If we added runtime suspend support to integrated GPUs this sounds like 
a really good thing to key off for that "display off notification" that 
started this whole thread.

Some infrastructure could be added so DRM core could monitor runtime 
status for all GPUs on the system.  If they're all in runtime PM it 
could use an exported symbol to send LPS0 screen off and when any one of 
them exits then send LPS0 screen on.

  reply	other threads:[~2025-12-07  0:31 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)
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 [this message]
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=edfc3586-84fb-4dee-a047-9f204054e6f2@kernel.org \
    --to=superm1@kernel.org \
    --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=lkml@antheas.dev \
    --cc=mccann@jhu.edu \
    --cc=rafael@kernel.org \
    --cc=richard@hughsie.com \
    --cc=sebastian.reichel@collabora.com \
    --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