From: noahpro <noahpro@gmail.com>
To: ilpo.jarvinen@linux.intel.com, hansg@kernel.org
Cc: platform-driver-x86@vger.kernel.org, noahpro <noahpro@gmail.com>
Subject: [PATCH] platform/x86: hp-wmi: add Omen 16-wf0xxx (board 8BAB) fan & perf-profile support
Date: Thu, 31 Jul 2025 17:35:29 -0400 [thread overview]
Message-ID: <20250731213529.27378-1-noahpro@gmail.com> (raw)
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).
Signed-off-by: noahpro <noahpro@gmail.com>
---
drivers/platform/x86/hp/hp-wmi.c | 41 ++++++++++++++++++++++++++++----
1 file changed, 36 insertions(+), 5 deletions(-)
diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
index db5fdee2109c..55c3680724b5 100644
--- a/drivers/platform/x86/hp/hp-wmi.c
+++ b/drivers/platform/x86/hp/hp-wmi.c
@@ -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
--
2.50.1
next reply other threads:[~2025-07-31 21:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-31 21:35 noahpro [this message]
2025-08-04 7:58 ` [PATCH] platform/x86: hp-wmi: add Omen 16-wf0xxx (board 8BAB) fan & perf-profile support Ilpo Järvinen
[not found] ` <CALjHL5-tjMkiAYJ1gtehtHMj+gySVthJSnCcM1iUNndRoBxEDg@mail.gmail.com>
2025-08-26 22:56 ` Noah Provenzano
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=20250731213529.27378-1-noahpro@gmail.com \
--to=noahpro@gmail.com \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=platform-driver-x86@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.