linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] platform/x86: hp-wmi: Add support for Fn+P hotkey
@ 2025-08-14 20:45 edip
  2025-08-28 16:21 ` Ilpo Järvinen
  0 siblings, 1 reply; 2+ messages in thread
From: edip @ 2025-08-14 20:45 UTC (permalink / raw)
  To: ilpo.jarvinen, hansg, kuba; +Cc: platform-driver-x86, linux-kernel, Edip Hazuri

From: Edip Hazuri <edip@medip.dev>

Add support for the Fn+P hotkey found on newer HP Victus (and probably
newer Omen) laptops. This hotkey is intended for use with Omen Gaming Hub
to change the performance profile (see [1]).

Pressing Fn+P under linux produced the following warning in dmesg:

> hp_wmi: Unknown event_id - 27 - 0x7

Implemented a handling for this event so that the hotkey cycles between the
platform profiles when triggered.

Tested on Victus 16-s1011nt (9Z791EA, MB 8C9C).

Changes in v2:
- Make the key just switches between platform profiles instead of
  assigning a key event code. 
- v1: https://lore.kernel.org/all/20250802213541.18791-2-edip@medip.dev/

[1]: https://jpcdn.it/img/adadf6c927ffeb75afd8038f95db400a.png

Signed-off-by: Edip Hazuri <edip@medip.dev>
---
 drivers/platform/x86/hp/hp-wmi.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
index db5fdee2109..c712d5bdaa1 100644
--- a/drivers/platform/x86/hp/hp-wmi.c
+++ b/drivers/platform/x86/hp/hp-wmi.c
@@ -122,6 +122,7 @@ enum hp_wmi_event_ids {
 	HPWMI_BATTERY_CHARGE_PERIOD	= 0x10,
 	HPWMI_SANITIZATION_MODE		= 0x17,
 	HPWMI_CAMERA_TOGGLE		= 0x1A,
+	HPWMI_FN_P_HOTKEY		= 0x1B,
 	HPWMI_OMEN_KEY			= 0x1D,
 	HPWMI_SMART_EXPERIENCE_APP	= 0x21,
 };
@@ -981,6 +982,9 @@ static void hp_wmi_notify(union acpi_object *obj, void *context)
 						key_code, 1, true))
 			pr_info("Unknown key code - 0x%x\n", key_code);
 		break;
+	case HPWMI_FN_P_HOTKEY:
+		platform_profile_cycle();
+		break;
 	case HPWMI_OMEN_KEY:
 		if (event_data) /* Only should be true for HP Omen */
 			key_code = event_data;
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] platform/x86: hp-wmi: Add support for Fn+P hotkey
  2025-08-14 20:45 [PATCH v2] platform/x86: hp-wmi: Add support for Fn+P hotkey edip
@ 2025-08-28 16:21 ` Ilpo Järvinen
  0 siblings, 0 replies; 2+ messages in thread
From: Ilpo Järvinen @ 2025-08-28 16:21 UTC (permalink / raw)
  To: hansg, kuba, edip; +Cc: platform-driver-x86, linux-kernel

On Thu, 14 Aug 2025 23:45:32 +0300, edip@medip.dev wrote:

> Add support for the Fn+P hotkey found on newer HP Victus (and probably
> newer Omen) laptops. This hotkey is intended for use with Omen Gaming Hub
> to change the performance profile (see [1]).
> 
> Pressing Fn+P under linux produced the following warning in dmesg:
> 
> > hp_wmi: Unknown event_id - 27 - 0x7
> 
> [...]


Thank you for your contribution, it has been applied to my local
review-ilpo-fixes branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-fixes branch only once I've pushed my
local branch there, which might take a while.

The list of commits applied:
[1/1] platform/x86: hp-wmi: Add support for Fn+P hotkey
      commit: 23408874e90ee299ab731bc0e0a9b3339dfc3c6e

--
 i.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-08-28 16:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-14 20:45 [PATCH v2] platform/x86: hp-wmi: Add support for Fn+P hotkey edip
2025-08-28 16:21 ` Ilpo Järvinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).