Re: [RFC PATCH 2/2] platform/x86: huawei-wmi: expose native Turbo mode as platform_profile
From: Eren Özen
Date: Sat Nov 14 2026 - 11:03:26 EST
Hi Fuwei,
I tested this series on a HUAWEI MateBook 16 (AMD Ryzen 7 5800H), DMI
product name "CREM-WXX9", BIOS 2.32. Its firmware has the same \GTUB and
\STUB behind WMI commands 0x0e04/0x0f04 and sends the same 0x2a0/0x2a1
events, so with one extra DMI entry the series works there as well:
{
.ident = "Huawei MateBook 16 CREM-WXX9 (BIOS 2.32)",
.matches = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "HUAWEI"),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "CREM-WXX9"),
DMI_EXACT_MATCH(DMI_BIOS_VERSION, "2.32"),
},
},
I applied both patches and this entry to the driver from pdx86 for-next
and built it as a module for a 7.2.15 kernel:
- platform_profile_choices is "balanced performance", and writing either
value switches the firmware mode (checked by reading \GTUB back).
- GNOME's Power Mode menu (tuned-ppd) switches between the two.
- Fn+P updates platform_profile, and 0x2a0/0x2a1 are no longer logged
as "Unknown key pressed".
- On battery, writing "performance" fails and the mode stays balanced.
A few details of this firmware that may be useful:
- \STUB only checks for AC power here, not the battery level. When it
refuses, it still returns status 0 and sends 0x2a6, so the read-back
after the set is what catches the refusal.
- When the charger is unplugged in performance mode, the EC turns Turbo
off by itself and sends no 0x2a0 event. The power supply notifier
picked this up correctly in my test.
- After \STUB, the EC also runs its own Fn+P handler (_Q71/_Q72), which
sets the SMU power limits through ALIB. Switching through
platform_profile therefore has the same effect as Fn+P: the STAPM
limit in the SMU PM table goes from 45 W to about 50-52 W. Each \STUB
call produces two 0x2a1 (or 0x2a0) events about 35 ms apart, which
the refresh work handles fine.
Tested-by: Eren Özen <erenozen@xxxxxxxxxxxxxx> # MateBook 16 CREM-WXX9, with the DMI entry above
Would you be OK with adding this entry in the next version? If you
prefer, I can send it as a separate patch once the series is merged.
Thanks,
Eren