From: Antheas Kapenekakis <lkml@antheas.dev>
To: mario.limonciello@amd.com, mpearson-lenovo@squebb.ca
Cc: ilpo.jarvinen@linux.intel.com, lenb@kernel.org,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
platform-driver-x86@vger.kernel.org, rafael@kernel.org,
hdegoede@redhat.com, me@kylegospodneti.ch, luke@ljones.dev,
Antheas Kapenekakis <lkml@antheas.dev>
Subject: [PATCH v2 0/2] ACPI: platform_profile: fix legacy sysfs with multiple handlers
Date: Thu, 27 Feb 2025 16:36:01 +0100 [thread overview]
Message-ID: <20250227153603.131046-1-lkml@antheas.dev> (raw)
On the Asus Z13 (2025), a device that would need the amd-pmf quirk that
was removed on the platform_profile refactor, we see the following output
from the sysfs platform profile:
$ cat /sys/firmware/acpi/platform_profile_choices
balanced performance
I.e., the quiet profile is missing. Which is a major regression in terms of
power efficiency and affects both tuned, and ppd (it also affected my
software but I fixed that on Saturday). This would affect any laptop that
loads both amd-pmf and asus-wmi (around 15 models give or take?) and only
get worse in 2025, as more laptops start to integrate amd-pmf.
The problem stems from the fact that wmi handlers use different
profiles than amd-pmf, which can load alongside them, and block their
choices. This patch series is a mitigation of this issue, by making pmf
accept all profiles through the legacy sysfs, and by making it a secondary
handler.
While we can argue about whether the secondary handler concept is
necessary, alternatives such as renaming profiles in current drivers will
break existing scripts that are tested for a particular manufacturer, and
allowing amd-pmf override options may cause unforseen regressions in
other wmi drivers.
+CC Luke
Changelog since V1:
- merge patches 1 and 3 as per Rafael
- simplify secondary comment about secondary and make it last
Behavior with this patch applied and asus-wmi, amd-pmf
(maintains interop with 6.13):
$ cat /sys/firmware/acpi/platform_profile_choices
quiet balanced performance
And writing quiet to it results in the profile being applied to both
platform profile handlers.
$ echo low-power > /sys/firmware/acpi/platform_profile
bash: echo: write error: Operation not supported
$ echo quiet > /sys/firmware/acpi/platform_profile
$ cat /sys/class/platform-profile/platform-profile-*/{name,profile}
asus-wmi
amd-pmf
quiet
quiet
Agreed ABI still works:
$ echo quiet > /sys/class/platform-profile/platform-profile-0/profile
$ echo quiet > /sys/class/platform-profile/platform-profile-1/profile
bash: echo: write error: Operation not supported
$ echo low-power > /sys/class/platform-profile/platform-profile-0/profile
bash: echo: write error: Operation not supported
$ echo low-power > /sys/class/platform-profile/platform-profile-1/profile
Antheas Kapenekakis (2):
ACPI: platform_profile: Add handlers that do not occlude power options
ACPI: platform_profile: make amd-pmf a secondary handler
drivers/acpi/platform_profile.c | 57 +++++++++++++++++++++++++-----
drivers/platform/x86/amd/pmf/spc.c | 3 ++
drivers/platform/x86/amd/pmf/sps.c | 8 +++++
include/linux/platform_profile.h | 5 +++
4 files changed, 65 insertions(+), 8 deletions(-)
--
2.48.1
next reply other threads:[~2025-02-27 15:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-27 15:36 Antheas Kapenekakis [this message]
2025-02-27 15:36 ` [PATCH v2 1/2] ACPI: platform_profile: Add handlers that do not occlude power options Antheas Kapenekakis
2025-02-27 15:36 ` [PATCH v2 2/2] ACPI: platform_profile: make amd-pmf a secondary handler Antheas Kapenekakis
2025-02-27 16:45 ` Mario Limonciello
2025-02-27 17:04 ` Antheas Kapenekakis
2025-02-27 17:10 ` Mario Limonciello
2025-02-27 17:18 ` Antheas Kapenekakis
2025-02-27 17:23 ` Mario Limonciello
2025-02-27 17:28 ` 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=20250227153603.131046-1-lkml@antheas.dev \
--to=lkml@antheas.dev \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luke@ljones.dev \
--cc=mario.limonciello@amd.com \
--cc=me@kylegospodneti.ch \
--cc=mpearson-lenovo@squebb.ca \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rafael@kernel.org \
/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