* [PATCH v3 1/3] acpi: platform_profile - Add max-power profile option
2025-11-13 21:26 [PATCH v3 0/3] Add max-power platform profile Derek J. Clark
@ 2025-11-13 21:26 ` Derek J. Clark
2025-11-16 16:13 ` Armin Wolf
2025-11-13 21:26 ` [PATCH v3 2/3] platform/x86: lenovo-wmi-gamezone Use max-power rather than balanced-performance Derek J. Clark
2025-11-13 21:26 ` [PATCH v3 3/3] platform/x86: wmi-gamezone: Add Legion Go 2 Quirks Derek J. Clark
2 siblings, 1 reply; 11+ messages in thread
From: Derek J. Clark @ 2025-11-13 21:26 UTC (permalink / raw)
To: Ilpo Järvinen, Armin Wolf, Len Brown, Rafael J . Wysocki,
Jonathan Corbet
Cc: Mario Limonciello, Zhixin Zhang, Mia Shao, Mark Pearson,
Pierre-Loup A . Griffais, Kurt Borja, Derek J . Clark,
platform-driver-x86, linux-doc, linux-kernel, linux-acpi
Some devices, namely Lenovo Legion devices, have an "extreme" mode where
power draw is at the maximum limit of the cooling hardware. Add a new
"max-power" platform profile to properly reflect this operating mode.
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Acked-by: Rafael J. Wysocki (Intel) <rafael@kernel.org>
Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
---
Documentation/ABI/testing/sysfs-class-platform-profile | 2 ++
drivers/acpi/platform_profile.c | 1 +
include/linux/platform_profile.h | 1 +
3 files changed, 4 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-class-platform-profile b/Documentation/ABI/testing/sysfs-class-platform-profile
index dc72adfb830a..fcab26894ec3 100644
--- a/Documentation/ABI/testing/sysfs-class-platform-profile
+++ b/Documentation/ABI/testing/sysfs-class-platform-profile
@@ -23,6 +23,8 @@ Description: This file contains a space-separated list of profiles supported
power consumption with a slight bias
towards performance
performance High performance operation
+ max-power Higher performance operation that may exceed
+ internal battery draw limits when on AC power
custom Driver defined custom profile
==================== ========================================
diff --git a/drivers/acpi/platform_profile.c b/drivers/acpi/platform_profile.c
index b43f4459a4f6..aa1dce05121b 100644
--- a/drivers/acpi/platform_profile.c
+++ b/drivers/acpi/platform_profile.c
@@ -37,6 +37,7 @@ static const char * const profile_names[] = {
[PLATFORM_PROFILE_BALANCED] = "balanced",
[PLATFORM_PROFILE_BALANCED_PERFORMANCE] = "balanced-performance",
[PLATFORM_PROFILE_PERFORMANCE] = "performance",
+ [PLATFORM_PROFILE_MAX_POWER] = "max-power",
[PLATFORM_PROFILE_CUSTOM] = "custom",
};
static_assert(ARRAY_SIZE(profile_names) == PLATFORM_PROFILE_LAST);
diff --git a/include/linux/platform_profile.h b/include/linux/platform_profile.h
index a299225ab92e..855b28340e95 100644
--- a/include/linux/platform_profile.h
+++ b/include/linux/platform_profile.h
@@ -24,6 +24,7 @@ enum platform_profile_option {
PLATFORM_PROFILE_BALANCED,
PLATFORM_PROFILE_BALANCED_PERFORMANCE,
PLATFORM_PROFILE_PERFORMANCE,
+ PLATFORM_PROFILE_MAX_POWER,
PLATFORM_PROFILE_CUSTOM,
PLATFORM_PROFILE_LAST, /*must always be last */
};
--
2.51.2
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH v3 1/3] acpi: platform_profile - Add max-power profile option
2025-11-13 21:26 ` [PATCH v3 1/3] acpi: platform_profile - Add max-power profile option Derek J. Clark
@ 2025-11-16 16:13 ` Armin Wolf
2025-11-16 19:01 ` Derek J. Clark
0 siblings, 1 reply; 11+ messages in thread
From: Armin Wolf @ 2025-11-16 16:13 UTC (permalink / raw)
To: Derek J. Clark, Ilpo Järvinen, Len Brown, Rafael J . Wysocki,
Jonathan Corbet
Cc: Mario Limonciello, Zhixin Zhang, Mia Shao, Mark Pearson,
Pierre-Loup A . Griffais, Kurt Borja, platform-driver-x86,
linux-doc, linux-kernel, linux-acpi
Am 13.11.25 um 22:26 schrieb Derek J. Clark:
> Some devices, namely Lenovo Legion devices, have an "extreme" mode where
> power draw is at the maximum limit of the cooling hardware. Add a new
> "max-power" platform profile to properly reflect this operating mode.
>
> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
> Acked-by: Rafael J. Wysocki (Intel) <rafael@kernel.org>
> Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
> ---
> Documentation/ABI/testing/sysfs-class-platform-profile | 2 ++
> drivers/acpi/platform_profile.c | 1 +
> include/linux/platform_profile.h | 1 +
> 3 files changed, 4 insertions(+)
>
> diff --git a/Documentation/ABI/testing/sysfs-class-platform-profile b/Documentation/ABI/testing/sysfs-class-platform-profile
> index dc72adfb830a..fcab26894ec3 100644
> --- a/Documentation/ABI/testing/sysfs-class-platform-profile
> +++ b/Documentation/ABI/testing/sysfs-class-platform-profile
> @@ -23,6 +23,8 @@ Description: This file contains a space-separated list of profiles supported
> power consumption with a slight bias
> towards performance
> performance High performance operation
> + max-power Higher performance operation that may exceed
> + internal battery draw limits when on AC power
I am not sure if it is a good idea to allow platform_profile_cycle() to cycle into this
new max-power profile. The system could encounter a brownout if it is currently operating
on battery power when selecting max-power.
Maybe we should prevent platform_profile_cylce() from selecting max-power?
Other than that:
Reviewed-by: Armin Wolf <W_Armin@gmx.de>
> custom Driver defined custom profile
> ==================== ========================================
>
> diff --git a/drivers/acpi/platform_profile.c b/drivers/acpi/platform_profile.c
> index b43f4459a4f6..aa1dce05121b 100644
> --- a/drivers/acpi/platform_profile.c
> +++ b/drivers/acpi/platform_profile.c
> @@ -37,6 +37,7 @@ static const char * const profile_names[] = {
> [PLATFORM_PROFILE_BALANCED] = "balanced",
> [PLATFORM_PROFILE_BALANCED_PERFORMANCE] = "balanced-performance",
> [PLATFORM_PROFILE_PERFORMANCE] = "performance",
> + [PLATFORM_PROFILE_MAX_POWER] = "max-power",
> [PLATFORM_PROFILE_CUSTOM] = "custom",
> };
> static_assert(ARRAY_SIZE(profile_names) == PLATFORM_PROFILE_LAST);
> diff --git a/include/linux/platform_profile.h b/include/linux/platform_profile.h
> index a299225ab92e..855b28340e95 100644
> --- a/include/linux/platform_profile.h
> +++ b/include/linux/platform_profile.h
> @@ -24,6 +24,7 @@ enum platform_profile_option {
> PLATFORM_PROFILE_BALANCED,
> PLATFORM_PROFILE_BALANCED_PERFORMANCE,
> PLATFORM_PROFILE_PERFORMANCE,
> + PLATFORM_PROFILE_MAX_POWER,
> PLATFORM_PROFILE_CUSTOM,
> PLATFORM_PROFILE_LAST, /*must always be last */
> };
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH v3 1/3] acpi: platform_profile - Add max-power profile option
2025-11-16 16:13 ` Armin Wolf
@ 2025-11-16 19:01 ` Derek J. Clark
2025-11-17 0:21 ` Armin Wolf
0 siblings, 1 reply; 11+ messages in thread
From: Derek J. Clark @ 2025-11-16 19:01 UTC (permalink / raw)
To: Armin Wolf, Ilpo Järvinen, Len Brown, Rafael J . Wysocki,
Jonathan Corbet
Cc: Mario Limonciello, Zhixin Zhang, Mia Shao, Mark Pearson,
Pierre-Loup A . Griffais, Kurt Borja, platform-driver-x86,
linux-doc, linux-kernel, linux-acpi
On November 16, 2025 8:13:17 AM PST, Armin Wolf <W_Armin@gmx.de> wrote:
>Am 13.11.25 um 22:26 schrieb Derek J. Clark:
>
>> Some devices, namely Lenovo Legion devices, have an "extreme" mode where
>> power draw is at the maximum limit of the cooling hardware. Add a new
>> "max-power" platform profile to properly reflect this operating mode.
>>
>> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
>> Acked-by: Rafael J. Wysocki (Intel) <rafael@kernel.org>
>> Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
>> ---
>> Documentation/ABI/testing/sysfs-class-platform-profile | 2 ++
>> drivers/acpi/platform_profile.c | 1 +
>> include/linux/platform_profile.h | 1 +
>> 3 files changed, 4 insertions(+)
>>
>> diff --git a/Documentation/ABI/testing/sysfs-class-platform-profile b/Documentation/ABI/testing/sysfs-class-platform-profile
>> index dc72adfb830a..fcab26894ec3 100644
>> --- a/Documentation/ABI/testing/sysfs-class-platform-profile
>> +++ b/Documentation/ABI/testing/sysfs-class-platform-profile
>> @@ -23,6 +23,8 @@ Description: This file contains a space-separated list of profiles supported
>> power consumption with a slight bias
>> towards performance
>> performance High performance operation
>> + max-power Higher performance operation that may exceed
>> + internal battery draw limits when on AC power
>
>I am not sure if it is a good idea to allow platform_profile_cycle() to cycle into this
>new max-power profile. The system could encounter a brownout if it is currently operating
>on battery power when selecting max-power.
>
>Maybe we should prevent platform_profile_cylce() from selecting max-power?
At least for Lenovo devices unplugging AC will automatically throttle the ppt values to roughly equivalent to performance. It will look at a different WMI data block for the values when switched, so there's no risk for cycling in this case. This seems like smart hardware design, but we've certainly seen bad hardware design so the concern is warranted. Perhaps it is worth visiting if another vendor implements it differently? That being said, what you're describing would match up with how the physical profile selection button works, so it would align with consumer expectation. I have no strong feelings either way, but I'm a little concerned about meeting the merge window as this series fixes a pretty disruptive bug affecting 6.17 users.
Regards,
- Derek
>Other than that:
>Reviewed-by: Armin Wolf <W_Armin@gmx.de>
>
>> custom Driver defined custom profile
>> ==================== ========================================
>> diff --git a/drivers/acpi/platform_profile.c b/drivers/acpi/platform_profile.c
>> index b43f4459a4f6..aa1dce05121b 100644
>> --- a/drivers/acpi/platform_profile.c
>> +++ b/drivers/acpi/platform_profile.c
>> @@ -37,6 +37,7 @@ static const char * const profile_names[] = {
>> [PLATFORM_PROFILE_BALANCED] = "balanced",
>> [PLATFORM_PROFILE_BALANCED_PERFORMANCE] = "balanced-performance",
>> [PLATFORM_PROFILE_PERFORMANCE] = "performance",
>> + [PLATFORM_PROFILE_MAX_POWER] = "max-power",
>> [PLATFORM_PROFILE_CUSTOM] = "custom",
>> };
>> static_assert(ARRAY_SIZE(profile_names) == PLATFORM_PROFILE_LAST);
>> diff --git a/include/linux/platform_profile.h b/include/linux/platform_profile.h
>> index a299225ab92e..855b28340e95 100644
>> --- a/include/linux/platform_profile.h
>> +++ b/include/linux/platform_profile.h
>> @@ -24,6 +24,7 @@ enum platform_profile_option {
>> PLATFORM_PROFILE_BALANCED,
>> PLATFORM_PROFILE_BALANCED_PERFORMANCE,
>> PLATFORM_PROFILE_PERFORMANCE,
>> + PLATFORM_PROFILE_MAX_POWER,
>> PLATFORM_PROFILE_CUSTOM,
>> PLATFORM_PROFILE_LAST, /*must always be last */
>> };
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH v3 1/3] acpi: platform_profile - Add max-power profile option
2025-11-16 19:01 ` Derek J. Clark
@ 2025-11-17 0:21 ` Armin Wolf
2025-11-27 12:11 ` Ilpo Järvinen
0 siblings, 1 reply; 11+ messages in thread
From: Armin Wolf @ 2025-11-17 0:21 UTC (permalink / raw)
To: Derek J. Clark, Ilpo Järvinen, Len Brown, Rafael J . Wysocki,
Jonathan Corbet
Cc: Mario Limonciello, Zhixin Zhang, Mia Shao, Mark Pearson,
Pierre-Loup A . Griffais, Kurt Borja, platform-driver-x86,
linux-doc, linux-kernel, linux-acpi
Am 16.11.25 um 20:01 schrieb Derek J. Clark:
> On November 16, 2025 8:13:17 AM PST, Armin Wolf <W_Armin@gmx.de> wrote:
>> Am 13.11.25 um 22:26 schrieb Derek J. Clark:
>>
>>> Some devices, namely Lenovo Legion devices, have an "extreme" mode where
>>> power draw is at the maximum limit of the cooling hardware. Add a new
>>> "max-power" platform profile to properly reflect this operating mode.
>>>
>>> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
>>> Acked-by: Rafael J. Wysocki (Intel) <rafael@kernel.org>
>>> Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
>>> ---
>>> Documentation/ABI/testing/sysfs-class-platform-profile | 2 ++
>>> drivers/acpi/platform_profile.c | 1 +
>>> include/linux/platform_profile.h | 1 +
>>> 3 files changed, 4 insertions(+)
>>>
>>> diff --git a/Documentation/ABI/testing/sysfs-class-platform-profile b/Documentation/ABI/testing/sysfs-class-platform-profile
>>> index dc72adfb830a..fcab26894ec3 100644
>>> --- a/Documentation/ABI/testing/sysfs-class-platform-profile
>>> +++ b/Documentation/ABI/testing/sysfs-class-platform-profile
>>> @@ -23,6 +23,8 @@ Description: This file contains a space-separated list of profiles supported
>>> power consumption with a slight bias
>>> towards performance
>>> performance High performance operation
>>> + max-power Higher performance operation that may exceed
>>> + internal battery draw limits when on AC power
>> I am not sure if it is a good idea to allow platform_profile_cycle() to cycle into this
>> new max-power profile. The system could encounter a brownout if it is currently operating
>> on battery power when selecting max-power.
>>
>> Maybe we should prevent platform_profile_cylce() from selecting max-power?
> At least for Lenovo devices unplugging AC will automatically throttle the ppt values to roughly equivalent to performance. It will look at a different WMI data block for the values when switched, so there's no risk for cycling in this case. This seems like smart hardware design, but we've certainly seen bad hardware design so the concern is warranted. Perhaps it is worth visiting if another vendor implements it differently? That being said, what you're describing would match up with how the physical profile selection button works, so it would align with consumer expectation. I have no strong feelings either way, but I'm a little concerned about meeting the merge window as this series fixes a pretty disruptive bug affecting 6.17 users.
>
> Regards,
> - Derek
>
If the physical platform selection button does not automatically select the max-power profile under Windows, then we should copy this behavior i think.
The changes necessary for that are fairly small, basically you only have to extend the handling of PLATFORM_PROFILE_CUSTOM inside platform_profile_cycle()
to also include the max-power profile. So i would prefer if we modify platform_profile_cycle() now has doing this later might be seen as a regression.
Thanks,
Armin Wolf
>> Other than that:
>> Reviewed-by: Armin Wolf <W_Armin@gmx.de>
>>
>>> custom Driver defined custom profile
>>> ==================== ========================================
>>> diff --git a/drivers/acpi/platform_profile.c b/drivers/acpi/platform_profile.c
>>> index b43f4459a4f6..aa1dce05121b 100644
>>> --- a/drivers/acpi/platform_profile.c
>>> +++ b/drivers/acpi/platform_profile.c
>>> @@ -37,6 +37,7 @@ static const char * const profile_names[] = {
>>> [PLATFORM_PROFILE_BALANCED] = "balanced",
>>> [PLATFORM_PROFILE_BALANCED_PERFORMANCE] = "balanced-performance",
>>> [PLATFORM_PROFILE_PERFORMANCE] = "performance",
>>> + [PLATFORM_PROFILE_MAX_POWER] = "max-power",
>>> [PLATFORM_PROFILE_CUSTOM] = "custom",
>>> };
>>> static_assert(ARRAY_SIZE(profile_names) == PLATFORM_PROFILE_LAST);
>>> diff --git a/include/linux/platform_profile.h b/include/linux/platform_profile.h
>>> index a299225ab92e..855b28340e95 100644
>>> --- a/include/linux/platform_profile.h
>>> +++ b/include/linux/platform_profile.h
>>> @@ -24,6 +24,7 @@ enum platform_profile_option {
>>> PLATFORM_PROFILE_BALANCED,
>>> PLATFORM_PROFILE_BALANCED_PERFORMANCE,
>>> PLATFORM_PROFILE_PERFORMANCE,
>>> + PLATFORM_PROFILE_MAX_POWER,
>>> PLATFORM_PROFILE_CUSTOM,
>>> PLATFORM_PROFILE_LAST, /*must always be last */
>>> };
>
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH v3 1/3] acpi: platform_profile - Add max-power profile option
2025-11-17 0:21 ` Armin Wolf
@ 2025-11-27 12:11 ` Ilpo Järvinen
2025-11-27 14:36 ` Derek J. Clark
0 siblings, 1 reply; 11+ messages in thread
From: Ilpo Järvinen @ 2025-11-27 12:11 UTC (permalink / raw)
To: Armin Wolf, Derek J. Clark
Cc: Len Brown, Rafael J . Wysocki, Jonathan Corbet, Mario Limonciello,
Zhixin Zhang, Mia Shao, Mark Pearson, Pierre-Loup A . Griffais,
Kurt Borja, platform-driver-x86, linux-doc, LKML, linux-acpi
On Mon, 17 Nov 2025, Armin Wolf wrote:
> Am 16.11.25 um 20:01 schrieb Derek J. Clark:
>
> > On November 16, 2025 8:13:17 AM PST, Armin Wolf <W_Armin@gmx.de> wrote:
> > > Am 13.11.25 um 22:26 schrieb Derek J. Clark:
> > >
> > > > Some devices, namely Lenovo Legion devices, have an "extreme" mode where
> > > > power draw is at the maximum limit of the cooling hardware. Add a new
> > > > "max-power" platform profile to properly reflect this operating mode.
> > > >
> > > > Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
> > > > Acked-by: Rafael J. Wysocki (Intel) <rafael@kernel.org>
> > > > Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
> > > > ---
> > > > Documentation/ABI/testing/sysfs-class-platform-profile | 2 ++
> > > > drivers/acpi/platform_profile.c | 1 +
> > > > include/linux/platform_profile.h | 1 +
> > > > 3 files changed, 4 insertions(+)
> > > >
> > > > diff --git a/Documentation/ABI/testing/sysfs-class-platform-profile
> > > > b/Documentation/ABI/testing/sysfs-class-platform-profile
> > > > index dc72adfb830a..fcab26894ec3 100644
> > > > --- a/Documentation/ABI/testing/sysfs-class-platform-profile
> > > > +++ b/Documentation/ABI/testing/sysfs-class-platform-profile
> > > > @@ -23,6 +23,8 @@ Description: This file contains a space-separated
> > > > list of profiles supported
> > > > power consumption with a
> > > > slight bias
> > > > towards performance
> > > > performance High performance operation
> > > > + max-power Higher performance operation that may
> > > > exceed
> > > > + internal battery draw limits when on
> > > > AC power
> > > I am not sure if it is a good idea to allow platform_profile_cycle() to
> > > cycle into this
> > > new max-power profile. The system could encounter a brownout if it is
> > > currently operating
> > > on battery power when selecting max-power.
> > >
> > > Maybe we should prevent platform_profile_cylce() from selecting max-power?
> > At least for Lenovo devices unplugging AC will automatically throttle the
> > ppt values to roughly equivalent to performance. It will look at a different
> > WMI data block for the values when switched, so there's no risk for cycling
> > in this case. This seems like smart hardware design, but we've certainly
> > seen bad hardware design so the concern is warranted. Perhaps it is worth
> > visiting if another vendor implements it differently? That being said, what
> > you're describing would match up with how the physical profile selection
> > button works, so it would align with consumer expectation. I have no strong
> > feelings either way, but I'm a little concerned about meeting the merge
> > window as this series fixes a pretty disruptive bug affecting 6.17 users.
> >
> > Regards,
> > - Derek
> >
> If the physical platform selection button does not automatically select the
> max-power profile under Windows, then we should copy this behavior i think.
> The changes necessary for that are fairly small, basically you only have to
> extend the handling of PLATFORM_PROFILE_CUSTOM inside platform_profile_cycle()
> to also include the max-power profile. So i would prefer if we modify
> platform_profile_cycle() now has doing this later might be seen as a
> regression.
Derek,
Any comments on this?
I'd very much prefer to take this series in this cycle but this comment
seems unresolved and has userspace visible impact so may bind us
irrevocably to certain behavior.
--
i.
>
> Thanks,
> Armin Wolf
>
> > > Other than that:
> > > Reviewed-by: Armin Wolf <W_Armin@gmx.de>
> > >
> > > > custom Driver defined custom profile
> > > > ====================
> > > > ========================================
> > > > diff --git a/drivers/acpi/platform_profile.c
> > > > b/drivers/acpi/platform_profile.c
> > > > index b43f4459a4f6..aa1dce05121b 100644
> > > > --- a/drivers/acpi/platform_profile.c
> > > > +++ b/drivers/acpi/platform_profile.c
> > > > @@ -37,6 +37,7 @@ static const char * const profile_names[] = {
> > > > [PLATFORM_PROFILE_BALANCED] = "balanced",
> > > > [PLATFORM_PROFILE_BALANCED_PERFORMANCE] =
> > > > "balanced-performance",
> > > > [PLATFORM_PROFILE_PERFORMANCE] = "performance",
> > > > + [PLATFORM_PROFILE_MAX_POWER] = "max-power",
> > > > [PLATFORM_PROFILE_CUSTOM] = "custom",
> > > > };
> > > > static_assert(ARRAY_SIZE(profile_names) == PLATFORM_PROFILE_LAST);
> > > > diff --git a/include/linux/platform_profile.h
> > > > b/include/linux/platform_profile.h
> > > > index a299225ab92e..855b28340e95 100644
> > > > --- a/include/linux/platform_profile.h
> > > > +++ b/include/linux/platform_profile.h
> > > > @@ -24,6 +24,7 @@ enum platform_profile_option {
> > > > PLATFORM_PROFILE_BALANCED,
> > > > PLATFORM_PROFILE_BALANCED_PERFORMANCE,
> > > > PLATFORM_PROFILE_PERFORMANCE,
> > > > + PLATFORM_PROFILE_MAX_POWER,
> > > > PLATFORM_PROFILE_CUSTOM,
> > > > PLATFORM_PROFILE_LAST, /*must always be last */
> > > > };
> >
>
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH v3 1/3] acpi: platform_profile - Add max-power profile option
2025-11-27 12:11 ` Ilpo Järvinen
@ 2025-11-27 14:36 ` Derek J. Clark
0 siblings, 0 replies; 11+ messages in thread
From: Derek J. Clark @ 2025-11-27 14:36 UTC (permalink / raw)
To: Ilpo Järvinen, Armin Wolf
Cc: Len Brown, Rafael J . Wysocki, Jonathan Corbet, Mario Limonciello,
Zhixin Zhang, Mia Shao, Mark Pearson, Pierre-Loup A . Griffais,
Kurt Borja, platform-driver-x86, linux-doc, LKML, linux-acpi
On November 27, 2025 4:11:36 AM PST, "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com> wrote:
>On Mon, 17 Nov 2025, Armin Wolf wrote:
>
>> Am 16.11.25 um 20:01 schrieb Derek J. Clark:
>>
>> > On November 16, 2025 8:13:17 AM PST, Armin Wolf <W_Armin@gmx.de> wrote:
>> > > Am 13.11.25 um 22:26 schrieb Derek J. Clark:
>> > >
>> > > > Some devices, namely Lenovo Legion devices, have an "extreme" mode where
>> > > > power draw is at the maximum limit of the cooling hardware. Add a new
>> > > > "max-power" platform profile to properly reflect this operating mode.
>> > > >
>> > > > Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
>> > > > Acked-by: Rafael J. Wysocki (Intel) <rafael@kernel.org>
>> > > > Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
>> > > > ---
>> > > > Documentation/ABI/testing/sysfs-class-platform-profile | 2 ++
>> > > > drivers/acpi/platform_profile.c | 1 +
>> > > > include/linux/platform_profile.h | 1 +
>> > > > 3 files changed, 4 insertions(+)
>> > > >
>> > > > diff --git a/Documentation/ABI/testing/sysfs-class-platform-profile
>> > > > b/Documentation/ABI/testing/sysfs-class-platform-profile
>> > > > index dc72adfb830a..fcab26894ec3 100644
>> > > > --- a/Documentation/ABI/testing/sysfs-class-platform-profile
>> > > > +++ b/Documentation/ABI/testing/sysfs-class-platform-profile
>> > > > @@ -23,6 +23,8 @@ Description: This file contains a space-separated
>> > > > list of profiles supported
>> > > > power consumption with a
>> > > > slight bias
>> > > > towards performance
>> > > > performance High performance operation
>> > > > + max-power Higher performance operation that may
>> > > > exceed
>> > > > + internal battery draw limits when on
>> > > > AC power
>> > > I am not sure if it is a good idea to allow platform_profile_cycle() to
>> > > cycle into this
>> > > new max-power profile. The system could encounter a brownout if it is
>> > > currently operating
>> > > on battery power when selecting max-power.
>> > >
>> > > Maybe we should prevent platform_profile_cylce() from selecting max-power?
>> > At least for Lenovo devices unplugging AC will automatically throttle the
>> > ppt values to roughly equivalent to performance. It will look at a different
>> > WMI data block for the values when switched, so there's no risk for cycling
>> > in this case. This seems like smart hardware design, but we've certainly
>> > seen bad hardware design so the concern is warranted. Perhaps it is worth
>> > visiting if another vendor implements it differently? That being said, what
>> > you're describing would match up with how the physical profile selection
>> > button works, so it would align with consumer expectation. I have no strong
>> > feelings either way, but I'm a little concerned about meeting the merge
>> > window as this series fixes a pretty disruptive bug affecting 6.17 users.
>> >
>> > Regards,
>> > - Derek
>> >
>> If the physical platform selection button does not automatically select the
>> max-power profile under Windows, then we should copy this behavior i think.
>> The changes necessary for that are fairly small, basically you only have to
>> extend the handling of PLATFORM_PROFILE_CUSTOM inside platform_profile_cycle()
>> to also include the max-power profile. So i would prefer if we modify
>> platform_profile_cycle() now has doing this later might be seen as a
>> regression.
>
>Derek,
>
>Any comments on this?
>
>I'd very much prefer to take this series in this cycle but this comment
>seems unresolved and has userspace visible impact so may bind us
>irrevocably to certain behavior.
>
>--
> i.
Ilpo,
If I'm being totally honest I forgot about this request. I can knock this out pretty quickly and send v4 today.
Thanks,
Derek
>>
>> Thanks,
>> Armin Wolf
>>
>> > > Other than that:
>> > > Reviewed-by: Armin Wolf <W_Armin@gmx.de>
>> > >
>> > > > custom Driver defined custom profile
>> > > > ====================
>> > > > ========================================
>> > > > diff --git a/drivers/acpi/platform_profile.c
>> > > > b/drivers/acpi/platform_profile.c
>> > > > index b43f4459a4f6..aa1dce05121b 100644
>> > > > --- a/drivers/acpi/platform_profile.c
>> > > > +++ b/drivers/acpi/platform_profile.c
>> > > > @@ -37,6 +37,7 @@ static const char * const profile_names[] = {
>> > > > [PLATFORM_PROFILE_BALANCED] = "balanced",
>> > > > [PLATFORM_PROFILE_BALANCED_PERFORMANCE] =
>> > > > "balanced-performance",
>> > > > [PLATFORM_PROFILE_PERFORMANCE] = "performance",
>> > > > + [PLATFORM_PROFILE_MAX_POWER] = "max-power",
>> > > > [PLATFORM_PROFILE_CUSTOM] = "custom",
>> > > > };
>> > > > static_assert(ARRAY_SIZE(profile_names) == PLATFORM_PROFILE_LAST);
>> > > > diff --git a/include/linux/platform_profile.h
>> > > > b/include/linux/platform_profile.h
>> > > > index a299225ab92e..855b28340e95 100644
>> > > > --- a/include/linux/platform_profile.h
>> > > > +++ b/include/linux/platform_profile.h
>> > > > @@ -24,6 +24,7 @@ enum platform_profile_option {
>> > > > PLATFORM_PROFILE_BALANCED,
>> > > > PLATFORM_PROFILE_BALANCED_PERFORMANCE,
>> > > > PLATFORM_PROFILE_PERFORMANCE,
>> > > > + PLATFORM_PROFILE_MAX_POWER,
>> > > > PLATFORM_PROFILE_CUSTOM,
>> > > > PLATFORM_PROFILE_LAST, /*must always be last */
>> > > > };
>> >
>>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v3 2/3] platform/x86: lenovo-wmi-gamezone Use max-power rather than balanced-performance
2025-11-13 21:26 [PATCH v3 0/3] Add max-power platform profile Derek J. Clark
2025-11-13 21:26 ` [PATCH v3 1/3] acpi: platform_profile - Add max-power profile option Derek J. Clark
@ 2025-11-13 21:26 ` Derek J. Clark
2025-11-16 16:14 ` Armin Wolf
2025-11-13 21:26 ` [PATCH v3 3/3] platform/x86: wmi-gamezone: Add Legion Go 2 Quirks Derek J. Clark
2 siblings, 1 reply; 11+ messages in thread
From: Derek J. Clark @ 2025-11-13 21:26 UTC (permalink / raw)
To: Ilpo Järvinen, Armin Wolf, Len Brown, Rafael J . Wysocki,
Jonathan Corbet
Cc: Mario Limonciello, Zhixin Zhang, Mia Shao, Mark Pearson,
Pierre-Loup A . Griffais, Kurt Borja, Derek J . Clark,
platform-driver-x86, linux-doc, linux-kernel, linux-acpi
When developing the gamezone WMI drivers, "extreme mode" was matched to
the performance platform profile and "performance" was matched to the
balanced-performance platform profile, but only if extreme mode was
fully supported; otherwise performance was matched to the "performance"
platform profile. This has led to quite a bit of confusion with users
not understanding why the LED color indicating the platform profile
doesn't match their expectations.
To solve this, replace the confusing convention by using the new
max-power profile to represent "extreme mode". While add it, update the
documentation to reflect the expected LED colors in each operating mode.
Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
driver
---
.../wmi/devices/lenovo-wmi-gamezone.rst | 31 +++++++++----------
drivers/platform/x86/lenovo/wmi-gamezone.c | 18 +++--------
2 files changed, 20 insertions(+), 29 deletions(-)
diff --git a/Documentation/wmi/devices/lenovo-wmi-gamezone.rst b/Documentation/wmi/devices/lenovo-wmi-gamezone.rst
index 997263e51a7d..1769ad3d57b9 100644
--- a/Documentation/wmi/devices/lenovo-wmi-gamezone.rst
+++ b/Documentation/wmi/devices/lenovo-wmi-gamezone.rst
@@ -19,27 +19,26 @@ WMI GUID ``887B54E3-DDDC-4B2C-8B88-68A26A8835D0``
The Gamezone Data WMI interface provides platform-profile and fan curve
settings for devices that fall under the "Gaming Series" of Lenovo devices.
It uses a notifier chain to inform other Lenovo WMI interface drivers of the
-current platform profile when it changes.
+current platform profile when it changes. The currently set profile can be
+determined by the user on the hardware by looking at the color of the power
+or profile LED, depending on the model.
The following platform profiles are supported:
- - low-power
- - balanced
- - balanced-performance
- - performance
- - custom
+ - low-power, blue LED
+ - balanced, white LED
+ - performance, red LED
+ - max-power, purple LED
+ - custom, purple LED
-Balanced-Performance
+Extreme Mode
~~~~~~~~~~~~~~~~~~~~
Some newer Lenovo "Gaming Series" laptops have an "Extreme Mode" profile
-enabled in their BIOS. For these devices, the performance platform profile
-corresponds to the BIOS Extreme Mode, while the balanced-performance
-platform profile corresponds to the BIOS Performance mode. For legacy
-devices, the performance platform profile will correspond with the BIOS
-Performance mode.
-
-For some newer devices the "Extreme Mode" profile is incomplete in the BIOS
-and setting it will cause undefined behavior. A BIOS bug quirk table is
-provided to ensure these devices cannot set "Extreme Mode" from the driver.
+enabled in their BIOS. When available, this mode will be represented by the
+max-power platform profile.
+
+For a subset of these devices the "Extreme Mode" profile is incomplete in
+the BIOS and setting it will cause undefined behavior. A BIOS bug quirk table
+is provided to ensure these devices cannot set "Extreme Mode" from the driver.
Custom Profile
~~~~~~~~~~~~~~
diff --git a/drivers/platform/x86/lenovo/wmi-gamezone.c b/drivers/platform/x86/lenovo/wmi-gamezone.c
index 0eb7fe8222f4..df475e52f79d 100644
--- a/drivers/platform/x86/lenovo/wmi-gamezone.c
+++ b/drivers/platform/x86/lenovo/wmi-gamezone.c
@@ -171,14 +171,10 @@ static int lwmi_gz_profile_get(struct device *dev,
*profile = PLATFORM_PROFILE_BALANCED;
break;
case LWMI_GZ_THERMAL_MODE_PERFORMANCE:
- if (priv->extreme_supported) {
- *profile = PLATFORM_PROFILE_BALANCED_PERFORMANCE;
- break;
- }
*profile = PLATFORM_PROFILE_PERFORMANCE;
break;
case LWMI_GZ_THERMAL_MODE_EXTREME:
- *profile = PLATFORM_PROFILE_PERFORMANCE;
+ *profile = PLATFORM_PROFILE_MAX_POWER;
break;
case LWMI_GZ_THERMAL_MODE_CUSTOM:
*profile = PLATFORM_PROFILE_CUSTOM;
@@ -218,16 +214,12 @@ static int lwmi_gz_profile_set(struct device *dev,
case PLATFORM_PROFILE_BALANCED:
mode = LWMI_GZ_THERMAL_MODE_BALANCED;
break;
- case PLATFORM_PROFILE_BALANCED_PERFORMANCE:
- mode = LWMI_GZ_THERMAL_MODE_PERFORMANCE;
- break;
case PLATFORM_PROFILE_PERFORMANCE:
- if (priv->extreme_supported) {
- mode = LWMI_GZ_THERMAL_MODE_EXTREME;
- break;
- }
mode = LWMI_GZ_THERMAL_MODE_PERFORMANCE;
break;
+ case PLATFORM_PROFILE_MAX_POWER:
+ mode = LWMI_GZ_THERMAL_MODE_EXTREME;
+ break;
case PLATFORM_PROFILE_CUSTOM:
mode = LWMI_GZ_THERMAL_MODE_CUSTOM;
break;
@@ -338,7 +330,7 @@ static int lwmi_gz_platform_profile_probe(void *drvdata, unsigned long *choices)
priv->extreme_supported = lwmi_gz_extreme_supported(profile_support_ver);
if (priv->extreme_supported)
- set_bit(PLATFORM_PROFILE_BALANCED_PERFORMANCE, choices);
+ set_bit(PLATFORM_PROFILE_MAX_POWER, choices);
return 0;
}
--
2.51.2
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH v3 2/3] platform/x86: lenovo-wmi-gamezone Use max-power rather than balanced-performance
2025-11-13 21:26 ` [PATCH v3 2/3] platform/x86: lenovo-wmi-gamezone Use max-power rather than balanced-performance Derek J. Clark
@ 2025-11-16 16:14 ` Armin Wolf
0 siblings, 0 replies; 11+ messages in thread
From: Armin Wolf @ 2025-11-16 16:14 UTC (permalink / raw)
To: Derek J. Clark, Ilpo Järvinen, Len Brown, Rafael J . Wysocki,
Jonathan Corbet
Cc: Mario Limonciello, Zhixin Zhang, Mia Shao, Mark Pearson,
Pierre-Loup A . Griffais, Kurt Borja, platform-driver-x86,
linux-doc, linux-kernel, linux-acpi
Am 13.11.25 um 22:26 schrieb Derek J. Clark:
> When developing the gamezone WMI drivers, "extreme mode" was matched to
> the performance platform profile and "performance" was matched to the
> balanced-performance platform profile, but only if extreme mode was
> fully supported; otherwise performance was matched to the "performance"
> platform profile. This has led to quite a bit of confusion with users
> not understanding why the LED color indicating the platform profile
> doesn't match their expectations.
>
> To solve this, replace the confusing convention by using the new
> max-power profile to represent "extreme mode". While add it, update the
> documentation to reflect the expected LED colors in each operating mode.
>
> Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
Reviewed-by: Armin Wolf <W_Armin@gmx.de>
> driver
> ---
> .../wmi/devices/lenovo-wmi-gamezone.rst | 31 +++++++++----------
> drivers/platform/x86/lenovo/wmi-gamezone.c | 18 +++--------
> 2 files changed, 20 insertions(+), 29 deletions(-)
>
> diff --git a/Documentation/wmi/devices/lenovo-wmi-gamezone.rst b/Documentation/wmi/devices/lenovo-wmi-gamezone.rst
> index 997263e51a7d..1769ad3d57b9 100644
> --- a/Documentation/wmi/devices/lenovo-wmi-gamezone.rst
> +++ b/Documentation/wmi/devices/lenovo-wmi-gamezone.rst
> @@ -19,27 +19,26 @@ WMI GUID ``887B54E3-DDDC-4B2C-8B88-68A26A8835D0``
> The Gamezone Data WMI interface provides platform-profile and fan curve
> settings for devices that fall under the "Gaming Series" of Lenovo devices.
> It uses a notifier chain to inform other Lenovo WMI interface drivers of the
> -current platform profile when it changes.
> +current platform profile when it changes. The currently set profile can be
> +determined by the user on the hardware by looking at the color of the power
> +or profile LED, depending on the model.
>
> The following platform profiles are supported:
> - - low-power
> - - balanced
> - - balanced-performance
> - - performance
> - - custom
> + - low-power, blue LED
> + - balanced, white LED
> + - performance, red LED
> + - max-power, purple LED
> + - custom, purple LED
>
> -Balanced-Performance
> +Extreme Mode
> ~~~~~~~~~~~~~~~~~~~~
> Some newer Lenovo "Gaming Series" laptops have an "Extreme Mode" profile
> -enabled in their BIOS. For these devices, the performance platform profile
> -corresponds to the BIOS Extreme Mode, while the balanced-performance
> -platform profile corresponds to the BIOS Performance mode. For legacy
> -devices, the performance platform profile will correspond with the BIOS
> -Performance mode.
> -
> -For some newer devices the "Extreme Mode" profile is incomplete in the BIOS
> -and setting it will cause undefined behavior. A BIOS bug quirk table is
> -provided to ensure these devices cannot set "Extreme Mode" from the driver.
> +enabled in their BIOS. When available, this mode will be represented by the
> +max-power platform profile.
> +
> +For a subset of these devices the "Extreme Mode" profile is incomplete in
> +the BIOS and setting it will cause undefined behavior. A BIOS bug quirk table
> +is provided to ensure these devices cannot set "Extreme Mode" from the driver.
>
> Custom Profile
> ~~~~~~~~~~~~~~
> diff --git a/drivers/platform/x86/lenovo/wmi-gamezone.c b/drivers/platform/x86/lenovo/wmi-gamezone.c
> index 0eb7fe8222f4..df475e52f79d 100644
> --- a/drivers/platform/x86/lenovo/wmi-gamezone.c
> +++ b/drivers/platform/x86/lenovo/wmi-gamezone.c
> @@ -171,14 +171,10 @@ static int lwmi_gz_profile_get(struct device *dev,
> *profile = PLATFORM_PROFILE_BALANCED;
> break;
> case LWMI_GZ_THERMAL_MODE_PERFORMANCE:
> - if (priv->extreme_supported) {
> - *profile = PLATFORM_PROFILE_BALANCED_PERFORMANCE;
> - break;
> - }
> *profile = PLATFORM_PROFILE_PERFORMANCE;
> break;
> case LWMI_GZ_THERMAL_MODE_EXTREME:
> - *profile = PLATFORM_PROFILE_PERFORMANCE;
> + *profile = PLATFORM_PROFILE_MAX_POWER;
> break;
> case LWMI_GZ_THERMAL_MODE_CUSTOM:
> *profile = PLATFORM_PROFILE_CUSTOM;
> @@ -218,16 +214,12 @@ static int lwmi_gz_profile_set(struct device *dev,
> case PLATFORM_PROFILE_BALANCED:
> mode = LWMI_GZ_THERMAL_MODE_BALANCED;
> break;
> - case PLATFORM_PROFILE_BALANCED_PERFORMANCE:
> - mode = LWMI_GZ_THERMAL_MODE_PERFORMANCE;
> - break;
> case PLATFORM_PROFILE_PERFORMANCE:
> - if (priv->extreme_supported) {
> - mode = LWMI_GZ_THERMAL_MODE_EXTREME;
> - break;
> - }
> mode = LWMI_GZ_THERMAL_MODE_PERFORMANCE;
> break;
> + case PLATFORM_PROFILE_MAX_POWER:
> + mode = LWMI_GZ_THERMAL_MODE_EXTREME;
> + break;
> case PLATFORM_PROFILE_CUSTOM:
> mode = LWMI_GZ_THERMAL_MODE_CUSTOM;
> break;
> @@ -338,7 +330,7 @@ static int lwmi_gz_platform_profile_probe(void *drvdata, unsigned long *choices)
>
> priv->extreme_supported = lwmi_gz_extreme_supported(profile_support_ver);
> if (priv->extreme_supported)
> - set_bit(PLATFORM_PROFILE_BALANCED_PERFORMANCE, choices);
> + set_bit(PLATFORM_PROFILE_MAX_POWER, choices);
>
> return 0;
> }
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v3 3/3] platform/x86: wmi-gamezone: Add Legion Go 2 Quirks
2025-11-13 21:26 [PATCH v3 0/3] Add max-power platform profile Derek J. Clark
2025-11-13 21:26 ` [PATCH v3 1/3] acpi: platform_profile - Add max-power profile option Derek J. Clark
2025-11-13 21:26 ` [PATCH v3 2/3] platform/x86: lenovo-wmi-gamezone Use max-power rather than balanced-performance Derek J. Clark
@ 2025-11-13 21:26 ` Derek J. Clark
2025-11-16 16:14 ` Armin Wolf
2 siblings, 1 reply; 11+ messages in thread
From: Derek J. Clark @ 2025-11-13 21:26 UTC (permalink / raw)
To: Ilpo Järvinen, Armin Wolf, Len Brown, Rafael J . Wysocki,
Jonathan Corbet
Cc: Mario Limonciello, Zhixin Zhang, Mia Shao, Mark Pearson,
Pierre-Loup A . Griffais, Kurt Borja, Derek J . Clark,
platform-driver-x86, linux-doc, linux-kernel, linux-acpi
Add Legion Go 2 SKU's to the Extreme Mode quirks table.
Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
---
drivers/platform/x86/lenovo/wmi-gamezone.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/x86/lenovo/wmi-gamezone.c b/drivers/platform/x86/lenovo/wmi-gamezone.c
index df475e52f79d..381836d29a96 100644
--- a/drivers/platform/x86/lenovo/wmi-gamezone.c
+++ b/drivers/platform/x86/lenovo/wmi-gamezone.c
@@ -266,8 +266,23 @@ static const struct dmi_system_id fwbug_list[] = {
},
.driver_data = &quirk_no_extreme_bug,
},
+ {
+ .ident = "Legion Go 8ASP2",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_VERSION, "Legion Go 8ASP2"),
+ },
+ .driver_data = &quirk_no_extreme_bug,
+ },
+ {
+ .ident = "Legion Go 8AHP2",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_VERSION, "Legion Go 8AHP2"),
+ },
+ .driver_data = &quirk_no_extreme_bug,
+ },
{},
-
};
/**
--
2.51.2
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH v3 3/3] platform/x86: wmi-gamezone: Add Legion Go 2 Quirks
2025-11-13 21:26 ` [PATCH v3 3/3] platform/x86: wmi-gamezone: Add Legion Go 2 Quirks Derek J. Clark
@ 2025-11-16 16:14 ` Armin Wolf
0 siblings, 0 replies; 11+ messages in thread
From: Armin Wolf @ 2025-11-16 16:14 UTC (permalink / raw)
To: Derek J. Clark, Ilpo Järvinen, Len Brown, Rafael J . Wysocki,
Jonathan Corbet
Cc: Mario Limonciello, Zhixin Zhang, Mia Shao, Mark Pearson,
Pierre-Loup A . Griffais, Kurt Borja, platform-driver-x86,
linux-doc, linux-kernel, linux-acpi
Am 13.11.25 um 22:26 schrieb Derek J. Clark:
> Add Legion Go 2 SKU's to the Extreme Mode quirks table.
Reviewed-by: Armin Wolf <W_Armin@gmx.de>
> Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
> ---
> drivers/platform/x86/lenovo/wmi-gamezone.c | 17 ++++++++++++++++-
> 1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/lenovo/wmi-gamezone.c b/drivers/platform/x86/lenovo/wmi-gamezone.c
> index df475e52f79d..381836d29a96 100644
> --- a/drivers/platform/x86/lenovo/wmi-gamezone.c
> +++ b/drivers/platform/x86/lenovo/wmi-gamezone.c
> @@ -266,8 +266,23 @@ static const struct dmi_system_id fwbug_list[] = {
> },
> .driver_data = &quirk_no_extreme_bug,
> },
> + {
> + .ident = "Legion Go 8ASP2",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> + DMI_MATCH(DMI_PRODUCT_VERSION, "Legion Go 8ASP2"),
> + },
> + .driver_data = &quirk_no_extreme_bug,
> + },
> + {
> + .ident = "Legion Go 8AHP2",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> + DMI_MATCH(DMI_PRODUCT_VERSION, "Legion Go 8AHP2"),
> + },
> + .driver_data = &quirk_no_extreme_bug,
> + },
> {},
> -
> };
>
> /**
^ permalink raw reply [flat|nested] 11+ messages in thread