[PATCH] platform/x86: hp-wmi: Handle cTGP left enabled after the EC timer expires

From: Arnaud Ungaro via B4 Relay

Date: Sat Oct 24 2026 - 16:40:01 EST


From: Arnaud Ungaro <contact@xxxxxxxxxxxxxxxx>

Board 8A4C uses omen_v1_legacy_board_params. About two minutes after
switching to performance the EC moves the thermal profile in register
0x95 back to its default value while cTGP and PPAB stay enabled. The
same fallback is reported on 8A4D in the bugzilla entry linked below.

platform_profile_victus_s_get_ec() returns -EINVAL for this state
because it only accepts the default thermal profile with cTGP disabled.
If hp-wmi is loaded again at that point thermal_profile_setup() fails
and no platform profile is registered. The power source event handler
also fails to read the profile in that state.

Read this state as balanced since this is what the EC thermal profile
says. thermal_profile_setup() then sets balanced again and this
disables cTGP to match.

Tested on an OMEN 16-k0001nf (board 8A4C, BIOS F.21) with kernel 7.2.9.
Unloading and loading hp-wmi after the EC timer expired registered the
platform profile again. Without this change
/sys/firmware/acpi/platform_profile was missing and in my test it only
came back after a reboot.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=221680
Fixes: eeeb4c9874bb ("platform/x86: hp-wmi: Add EC offsets to read Victus S thermal profile")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Arnaud Ungaro <contact@xxxxxxxxxxxxxxxx>
---
Found while adding board 8A4C (OMEN 16-k0001nf). That patch is sent
separately.

Tested on the laptop with 7.2.9. The change also applies to 7.0.14,
7.1.13, 7.2.12 and 7.3. They all have the code from the Fixes commit.
---
drivers/platform/x86/hp/hp-wmi.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
index 52077833ac89d3f4bd9b99fbbc1812c4f09d16c7..699531157b5e8b002b28a3669acb33b7223cee75 100644
--- a/drivers/platform/x86/hp/hp-wmi.c
+++ b/drivers/platform/x86/hp/hp-wmi.c
@@ -2414,12 +2414,18 @@ static int platform_profile_victus_s_get_ec(enum platform_profile_option *profil
&current_gpu_slowdown_temp);
if (ret < 0)
return ret;
- if (current_ctgp_state == 0 && current_ppab_state == 0)
+ if (current_ctgp_state == 0 && current_ppab_state == 0) {
*profile = PLATFORM_PROFILE_LOW_POWER;
- else if (current_ctgp_state == 0 && current_ppab_state == 1)
+ } else if (current_ppab_state == 1) {
+ /*
+ * cTGP stays enabled when the EC thermal profile timer
+ * drops performance back to default, so treat it as
+ * balanced, which the caller can set again.
+ */
*profile = PLATFORM_PROFILE_BALANCED;
- else
+ } else {
return -EINVAL;
+ }
} else {
return -EINVAL;
}

---
base-commit: 9d3475065167197742b0882aff21cf8e78393277
change-id: 20261024-hp-wmi-rechargement-905112fd792b

Best regards,
--
Arnaud Ungaro <contact@xxxxxxxxxxxxxxxx>