Skip to contentSkip to conversation

platform/x86: hp-wmi: add Omen 16-wf0xxx (board 8BAB) fan & perf-profile support

PATCH In review noahpro 2 participants 3 messages Jul 31, 2025 – Aug 26, 2025 1 message not in the archive x86 platform drivers

lore
Share & tools
lore

noahpro

author
#0 lore raw

PATCH 1/1 platform/x86: hp-wmi: add Omen 16-wf0xxx (board 8BAB) fan & perf-profile support

Recent 2024-era Omen laptops (DMI board 8BAB) use different thermal-profile commands (0x48 default, 0x31 performance) but are very similar to those used by the existing Victus-S code paths although it wasn't in the config. As a result:

- /sys/devices/platform/hp-wmi/fan* reported 0
- echo 0 | sudo tee /sys/devices/platform/hp-wmi/hwmon/*/pwm1_enable max-fan writes failed
- platform_profile was not registered, so performance/balanced switching was not available

I added the new board to victus_s_thermal_profile_boards[] and created omen_2024_thermal_profile_boards[] with HP_OMEN_2024_THERMAL_PROFILE_* enums, and switched the Victus-S performance setter to choose the right wmi commands.

I was was unsure of whether to rename the victus_s_ names to newer or 2024 boards everywhere becuase this would clutter the commit.

Tested on HP Omen 16-wf0xxx (BIOS F.21):
* fan RPMs readable
* performance/balanced switching works (needed nvidiaDynamicBoost to see max wattage changes but it does work)
* "max fans" honoured (firmware reverts after 120 sec, but the existing timed board variables don't work when testing. On Windows the Omen Command Center simply sends lots of commands to keep this alive so this seems fine to me as user applications can write to the fan speed every ~100 sec).

---
 drivers/platform/x86/hp/hp-wmi.c | 41 ++++++++++++++++++++++++++++----
 1 file changed, 36 insertions(+), 5 deletions(-)
drivers/platform/x86/hp/hp-wmi.c +36 -5
index db5fdee2109c..55c3680724b5 100644
@@ -92,9 +92,13 @@ static const char * const victus_thermal_profile_boards[] = {
 	"8A25"
 };
 
-/* DMI Board names of Victus 16-s1000 laptops */
+/* DMI Board names of newer 2024+ laptops that have use different wmi commands */
 static const char * const victus_s_thermal_profile_boards[] = {
-	"8C9C"
+	"8C9C", "8BAB"
+};
+
+static const char * const omen_2024_thermal_profile_boards[] = {
+	"8BAB"
 };
 
 enum hp_wmi_radio {
@@ -245,6 +249,11 @@ enum hp_thermal_profile_victus_s {
 	HP_VICTUS_S_THERMAL_PROFILE_PERFORMANCE		= 0x01,
 };
 
+enum hp_thermal_profile_omen_2024 {
+	HP_OMEN_2024_THERMAL_PROFILE_DEFAULT	  = 0x48,
+	HP_OMEN_2024_THERMAL_PROFILE_PERFORMANCE  = 0x31,
+};
+
 enum hp_thermal_profile {
 	HP_THERMAL_PROFILE_PERFORMANCE	= 0x00,
 	HP_THERMAL_PROFILE_DEFAULT		= 0x01,
@@ -1580,6 +1589,19 @@ static bool is_victus_s_thermal_profile(void)
 			    board_name) >= 0;
 }
 
+static bool is_omen_2024_thermal_profile(void)
+{
+	const char *board_name;
+
+	board_name = dmi_get_system_info(DMI_BOARD_NAME);
+	if (!board_name)
+		return false;
+
+	return match_string(omen_2024_thermal_profile_boards,
+			    ARRAY_SIZE(omen_2024_thermal_profile_boards),
+			    board_name) >= 0;
+}
+
 static int victus_s_gpu_thermal_profile_get(bool *ctgp_enable,
 					    bool *ppab_enable,
 					    u8 *dstate,
@@ -1666,19 +1688,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_2024_thermal_profile())
+			tp = HP_OMEN_2024_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_2024_thermal_profile())
+			tp = HP_OMEN_2024_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_2024_thermal_profile())
+			tp = HP_OMEN_2024_THERMAL_PROFILE_DEFAULT;
+		else
+			tp = HP_VICTUS_S_THERMAL_PROFILE_DEFAULT;
 		gpu_ctgp_enable = false;
 		gpu_ppab_enable = false;
 		gpu_dstate = 1;

base-commit: 1798561befd8be1e52feb54f850efcab5a595f43

Signature · 1 line
2.50.1
maintainer
#1 lore raw
Quoted 72 lines · noahpro

Recent 2024-era Omen laptops (DMI board 8BAB) use different thermal-profile commands (0x48 default, 0x31 performance) but are very similar to those used by the existing Victus-S code paths although it wasn't in the config. As a result:

- /sys/devices/platform/hp-wmi/fan* reported 0
- echo 0 | sudo tee /sys/devices/platform/hp-wmi/hwmon/*/pwm1_enable max-fan writes failed
- platform_profile was not registered, so performance/balanced switching was not available

I added the new board to victus_s_thermal_profile_boards[] and created omen_2024_thermal_profile_boards[] with HP_OMEN_2024_THERMAL_PROFILE_* enums, and switched the Victus-S performance setter to choose the right wmi commands.

I was was unsure of whether to rename the victus_s_ names to newer or 2024 boards everywhere becuase this would clutter the commit.

Tested on HP Omen 16-wf0xxx (BIOS F.21):
* fan RPMs readable
* performance/balanced switching works (needed nvidiaDynamicBoost to see max wattage changes but it does work)
* "max fans" honoured (firmware reverts after 120 sec, but the existing timed board variables don't work when testing. On Windows the Omen Command Center simply sends lots of commands to keep this alive so this seems fine to me as user applications can write to the fan speed every ~100 sec).

---
 drivers/platform/x86/hp/hp-wmi.c | 41 ++++++++++++++++++++++++++++----
 1 file changed, 36 insertions(+), 5 deletions(-)
drivers/platform/x86/hp/hp-wmi.c +13 -2
index db5fdee2109c..55c3680724b5 100644
@@ -92,9 +92,13 @@ static const char * const victus_thermal_profile_boards[] = {
 	"8A25"
 };
 
-/* DMI Board names of Victus 16-s1000 laptops */
+/* DMI Board names of newer 2024+ laptops that have use different wmi commands */
 static const char * const victus_s_thermal_profile_boards[] = {
-	"8C9C"
+	"8C9C", "8BAB"
+};
+
+static const char * const omen_2024_thermal_profile_boards[] = {
+	"8BAB"
 };
 
 enum hp_wmi_radio {
@@ -245,6 +249,11 @@ enum hp_thermal_profile_victus_s {
 	HP_VICTUS_S_THERMAL_PROFILE_PERFORMANCE		= 0x01,
 };
 
+enum hp_thermal_profile_omen_2024 {
+	HP_OMEN_2024_THERMAL_PROFILE_DEFAULT	  = 0x48,
+	HP_OMEN_2024_THERMAL_PROFILE_PERFORMANCE  = 0x31,
+};
+
 enum hp_thermal_profile {
 	HP_THERMAL_PROFILE_PERFORMANCE	= 0x00,
 	HP_THERMAL_PROFILE_DEFAULT		= 0x01,
@@ -1580,6 +1589,19 @@ static bool is_victus_s_thermal_profile(void)
 			    board_name) >= 0;
 }
 
+static bool is_omen_2024_thermal_profile(void)
+{

drivers/platform/x86/hp/hp-wmi.c static bool is_victus_s_thermal_profile(void) · line 1603

Quoted 10 lines
drivers/platform/x86/hp/hp-wmi.c +10 -0
+	const char *board_name;
+
+	board_name = dmi_get_system_info(DMI_BOARD_NAME);
+	if (!board_name)
+		return false;
+
+	return match_string(omen_2024_thermal_profile_boards,
+			    ARRAY_SIZE(omen_2024_thermal_profile_boards),
+			    board_name) >= 0;
+}

This feels something that should be done once and then stored into a variable. Sadly this driver doesn't seem to rely on using drvdata but lots of static vars.

Quoted 38 lines
drivers/platform/x86/hp/hp-wmi.c +12 -3
 static int victus_s_gpu_thermal_profile_get(bool *ctgp_enable,
 					    bool *ppab_enable,
 					    u8 *dstate,
@@ -1666,19 +1688,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_2024_thermal_profile())
+			tp = HP_OMEN_2024_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_2024_thermal_profile())
+			tp = HP_OMEN_2024_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_2024_thermal_profile())
+			tp = HP_OMEN_2024_THERMAL_PROFILE_DEFAULT;
+		else
+			tp = HP_VICTUS_S_THERMAL_PROFILE_DEFAULT;
 		gpu_ctgp_enable = false;
 		gpu_ppab_enable = false;
 		gpu_dstate = 1;

base-commit: 1798561befd8be1e52feb54f850efcab5a595f43

Signature · 1 line
 i.