Skip to contentSkip to conversation

platform/x86: hp-wmi: fix platform profile values for Omen 16-wf1xxx

PATCH Superseded Krishna Chomal 2 participants 4 messages Dec 13, 2025 – Dec 16, 2025 x86 platform drivers

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 platform/x86: hp-wmi: fix platform profile values for Omen 16-wf1xxx

HP Omen 16-wf1xxx (board ID 8C78) currently sends the incorrect Victus-specific thermal profile values via WMI, leading to a logical inconsistency when switching between platform profiles.

The driver currently uses Victus S values:
0x00 => Balanced / Low-Power
0x01 => Performance

However, Omen Gaming Hub logs / EC register inspection on Windows shows that this board is intended to use:
0x30 => Balanced / Low-Power
0x31 => Performance

This patch corrects the thermal profile command values to match the values observed from Omen Gaming Hub logs. The performance benchmarks and peak power draw (from both CPU and GPU) show no observable change with this correction (suggesting that the firmware is currently tolerant of the incorrect values). However sending the correct values prevents potential regressions after future firmware updates.

Create a new omen_new_thermal_profile_boards[] array for devices that share the Victus WMI queries but require Omen thermal profile values. Conditionally use these values in platform_profile_victus_s_set_ec().

Tested on: HP Omen 16-wf1xxx (board 8C78)
Result: Confirmed WMI codes 0x30/0x31 are now sent, resolving the logical inconsistency and ensuring the value visible in EC registers match the Windows state for this profile.

Fixes fb146a38cb11 ("platform/x86: hp-wmi: Add Omen 16-wf1xxx fan support")
---
 drivers/platform/x86/hp/hp-wmi.c | 35 +++++++++++++++++++++++++++++---
 1 file changed, 32 insertions(+), 3 deletions(-)
drivers/platform/x86/hp/hp-wmi.c +32 -3
index f4ea1ea05997..4dfd5fc230e2 100644
@@ -105,6 +105,14 @@ static const char * const victus_s_thermal_profile_boards[] = {
 	"8D41",
 };
 
+/* DMI Board names of Omen laptops that have same WMI queries as
+ * victus_s_thermal_profile_boards but use hp_thermal_profile_omen_v1
+ * values.
+ */
+static const char * const omen_new_thermal_profile_boards[] = {
+	"8C78",
+};
+
 enum hp_wmi_radio {
 	HPWMI_WIFI	= 0x0,
 	HPWMI_BLUETOOTH	= 0x1,
@@ -1522,6 +1530,18 @@ static bool is_victus_thermal_profile(void)
 			    board_name) >= 0;
 }
 
+static bool is_omen_new_thermal_profile(void)
+{
+	const char *board_name = dmi_get_system_info(DMI_BOARD_NAME);
+
+	if (!board_name)
+		return false;
+
+	return match_string(omen_new_thermal_profile_boards,
+			    ARRAY_SIZE(omen_new_thermal_profile_boards),
+			    board_name) >= 0;
+}
+
 static int platform_profile_victus_get_ec(enum platform_profile_option *profile)
 {
 	int tp;
@@ -1678,19 +1698,28 @@ static int platform_profile_victus_s_set_ec(enum platform_profile_option profile
 
 	switch (profile) {
 	case PLATFORM_PROFILE_PERFORMANCE:
-		tp = HP_VICTUS_S_THERMAL_PROFILE_PERFORMANCE;
+		if (is_omen_new_thermal_profile())
+			tp = HP_OMEN_V1_THERMAL_PROFILE_PERFORMANCE;
+		else
+			tp = HP_VICTUS_S_THERMAL_PROFILE_PERFORMANCE;
 		gpu_ctgp_enable = true;
 		gpu_ppab_enable = true;
 		gpu_dstate = 1;
 		break;
 	case PLATFORM_PROFILE_BALANCED:
-		tp = HP_VICTUS_S_THERMAL_PROFILE_DEFAULT;
+		if (is_omen_new_thermal_profile())
+			tp = HP_OMEN_V1_THERMAL_PROFILE_DEFAULT;
+		else
+			tp = HP_VICTUS_S_THERMAL_PROFILE_DEFAULT;
 		gpu_ctgp_enable = false;
 		gpu_ppab_enable = true;
 		gpu_dstate = 1;
 		break;
 	case PLATFORM_PROFILE_LOW_POWER:
-		tp = HP_VICTUS_S_THERMAL_PROFILE_DEFAULT;
+		if (is_omen_new_thermal_profile())
+			tp = HP_OMEN_V1_THERMAL_PROFILE_DEFAULT;
+		else
+			tp = HP_VICTUS_S_THERMAL_PROFILE_DEFAULT;
 		gpu_ctgp_enable = false;
 		gpu_ppab_enable = false;
 		gpu_dstate = 1;
Signature · 1 line
2.52.0
maintainer
#1 lore raw
Quoted 95 lines · Krishna Chomal

HP Omen 16-wf1xxx (board ID 8C78) currently sends the incorrect Victus-specific thermal profile values via WMI, leading to a logical inconsistency when switching between platform profiles.

The driver currently uses Victus S values:
0x00 => Balanced / Low-Power
0x01 => Performance

However, Omen Gaming Hub logs / EC register inspection on Windows shows that this board is intended to use:
0x30 => Balanced / Low-Power
0x31 => Performance

This patch corrects the thermal profile command values to match the values observed from Omen Gaming Hub logs. The performance benchmarks and peak power draw (from both CPU and GPU) show no observable change with this correction (suggesting that the firmware is currently tolerant of the incorrect values). However sending the correct values prevents potential regressions after future firmware updates.

Create a new omen_new_thermal_profile_boards[] array for devices that share the Victus WMI queries but require Omen thermal profile values. Conditionally use these values in platform_profile_victus_s_set_ec().

Tested on: HP Omen 16-wf1xxx (board 8C78)
Result: Confirmed WMI codes 0x30/0x31 are now sent, resolving the logical inconsistency and ensuring the value visible in EC registers match the Windows state for this profile.

Fixes fb146a38cb11 ("platform/x86: hp-wmi: Add Omen 16-wf1xxx fan support")
---
 drivers/platform/x86/hp/hp-wmi.c | 35 +++++++++++++++++++++++++++++---
 1 file changed, 32 insertions(+), 3 deletions(-)
drivers/platform/x86/hp/hp-wmi.c +28 -2
index f4ea1ea05997..4dfd5fc230e2 100644
@@ -105,6 +105,14 @@ static const char * const victus_s_thermal_profile_boards[] = {
 	"8D41",
 };
 
+/* DMI Board names of Omen laptops that have same WMI queries as
+ * victus_s_thermal_profile_boards but use hp_thermal_profile_omen_v1
+ * values.
+ */
+static const char * const omen_new_thermal_profile_boards[] = {
+	"8C78",
+};
+
 enum hp_wmi_radio {
 	HPWMI_WIFI	= 0x0,
 	HPWMI_BLUETOOTH	= 0x1,
@@ -1522,6 +1530,18 @@ static bool is_victus_thermal_profile(void)
 			    board_name) >= 0;
 }
 
+static bool is_omen_new_thermal_profile(void)
+{
+	const char *board_name = dmi_get_system_info(DMI_BOARD_NAME);
+
+	if (!board_name)
+		return false;
+
+	return match_string(omen_new_thermal_profile_boards,
+			    ARRAY_SIZE(omen_new_thermal_profile_boards),
+			    board_name) >= 0;
+}
+
 static int platform_profile_victus_get_ec(enum platform_profile_option *profile)
 {
 	int tp;
@@ -1678,19 +1698,28 @@ static int platform_profile_victus_s_set_ec(enum platform_profile_option profile
 
 	switch (profile) {
 	case PLATFORM_PROFILE_PERFORMANCE:
-		tp = HP_VICTUS_S_THERMAL_PROFILE_PERFORMANCE;
+		if (is_omen_new_thermal_profile())
+			tp = HP_OMEN_V1_THERMAL_PROFILE_PERFORMANCE;
+		else
+			tp = HP_VICTUS_S_THERMAL_PROFILE_PERFORMANCE;
 		gpu_ctgp_enable = true;
 		gpu_ppab_enable = true;
 		gpu_dstate = 1;
 		break;
 	case PLATFORM_PROFILE_BALANCED:
-		tp = HP_VICTUS_S_THERMAL_PROFILE_DEFAULT;
+		if (is_omen_new_thermal_profile())
+			tp = HP_OMEN_V1_THERMAL_PROFILE_DEFAULT;
+		else
+			tp = HP_VICTUS_S_THERMAL_PROFILE_DEFAULT;
 		gpu_ctgp_enable = false;
 		gpu_ppab_enable = true;
 		gpu_dstate = 1;

drivers/platform/x86/hp/hp-wmi.c static int platform_profile_victus_s_set_ec(enum platform_profile_option profile · line 1725

Quoted 10 lines
drivers/platform/x86/hp/hp-wmi.c +4 -1
 		break;
 	case PLATFORM_PROFILE_LOW_POWER:
-		tp = HP_VICTUS_S_THERMAL_PROFILE_DEFAULT;
+		if (is_omen_new_thermal_profile())
+			tp = HP_OMEN_V1_THERMAL_PROFILE_DEFAULT;
+		else
+			tp = HP_VICTUS_S_THERMAL_PROFILE_DEFAULT;
 		gpu_ctgp_enable = false;
 		gpu_ppab_enable = false;
 		gpu_dstate = 1;

Hi,

Thank you for the patch but it looks this approach to add mappings using if()s to handle variations should be replaced with something better.

Signature · 1 line
 i.
#2 lore raw

Hi Ilpo,

Quoted 2 lines · Ilpo Järvinen

Thank you for the patch but it looks this approach to add mappings using if()s to handle variations should be replaced with something better.

Thank you for the feedback. I agree that stacking if/else statements for board variations is not a scalable idea.

For V2, I plan to refactor this driver to use DMI system ID table's driver_data field to handle the profile mapping (at least for victus_s_thermal_profile_boards in this patch).

The implementation will introduce a struct thermal_profile_params to hold the specific thermal values (Performance/Balanced/Low-Power). Then I can convert victus_s_thermal_profile_boards from a simple string array to a struct dmi_system_id[] array, where each entry maps a DMI Board Name to its specific thermal_profile_params via driver_data.

Then platform_profile_victus_s_set_ec can simply retrieve the correct parameters via dmi_first_match(), removing the need for nested if()s.

I feel this restructuring makes the code much cleaner and makes the thermal profile choice for new boards explicit. Does this plan look like the right direction for V2?

maintainer
#3 lore raw
Quoted 17 lines · Krishna Chomal
Quoted 2 lines · Ilpo Järvinen

Thank you for the patch but it looks this approach to add mappings using if()s to handle variations should be replaced with something better.

Thank you for the feedback. I agree that stacking if/else statements for board variations is not a scalable idea.

For V2, I plan to refactor this driver to use DMI system ID table's driver_data field to handle the profile mapping (at least for victus_s_thermal_profile_boards in this patch).

The implementation will introduce a struct thermal_profile_params to hold the specific thermal values (Performance/Balanced/Low-Power). Then I can convert victus_s_thermal_profile_boards from a simple string array to a struct dmi_system_id[] array, where each entry maps a DMI Board Name to its specific thermal_profile_params via driver_data.

Quoted 6 lines

Then platform_profile_victus_s_set_ec can simply retrieve the correct parameters via dmi_first_match(), removing the need for nested if()s.

I feel this restructuring makes the code much cleaner and makes the thermal profile choice for new boards explicit. Does this plan look like the right direction for V2?

Yes, something along those lines.

There's also one similar attempt pending in the patchwork, so this hopefully can solve that case as well:

https://patchwork.kernel.org/project/platform-driver-x86/patch/[email protected]/

Thanks for taking up this task. :-)

Signature · 1 line
 i.