[PATCH] platform/x86: hp-wmi: Ignore backlight and FnLock events

Krishna Chomal posted 1 patch 2 months, 1 week ago
drivers/platform/x86/hp/hp-wmi.c | 5 +++++
1 file changed, 5 insertions(+)
[PATCH] platform/x86: hp-wmi: Ignore backlight and FnLock events
Posted by Krishna Chomal 2 months, 1 week ago
On HP OmniBook 7 the keyboard backlight and FnLock keys are handled
directly by the firmware. However, they still trigger WMI events which
results in "Unknown key code" warnings in dmesg.

Add these key codes to the keymap with KE_IGNORE to silence the warnings
since no software action is needed.

Tested-by: Artem S. Tashkinov <aros@gmx.com>
Reported-by: Artem S. Tashkinov <aros@gmx.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221181
Signed-off-by: Krishna Chomal <krishna.chomal108@gmail.com>
---
 drivers/platform/x86/hp/hp-wmi.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
index 304d9ac63c8a..a35ab46442aa 100644
--- a/drivers/platform/x86/hp/hp-wmi.c
+++ b/drivers/platform/x86/hp/hp-wmi.c
@@ -370,6 +370,11 @@ static const struct key_entry hp_wmi_keymap[] = {
 	{ KE_KEY, 0x21a9,  { KEY_TOUCHPAD_OFF } },
 	{ KE_KEY, 0x121a9, { KEY_TOUCHPAD_ON } },
 	{ KE_KEY, 0x231b,  { KEY_HELP } },
+	{ KE_IGNORE, 0x21ab, }, /* FnLock on */
+	{ KE_IGNORE, 0x121ab, }, /* FnLock off */
+	{ KE_IGNORE, 0x30021aa, }, /* kbd backlight: level 2 -> off */
+	{ KE_IGNORE, 0x33221aa, }, /* kbd backlight: off -> level 1 */
+	{ KE_IGNORE, 0x36421aa, }, /* kbd backlight: level 1 -> level 2*/
 	{ KE_END, 0 }
 };
 
-- 
2.53.0
Re: [PATCH] platform/x86: hp-wmi: Ignore backlight and FnLock events
Posted by Ilpo Järvinen 2 months ago
On Fri, 03 Apr 2026 13:31:55 +0530, Krishna Chomal wrote:

> On HP OmniBook 7 the keyboard backlight and FnLock keys are handled
> directly by the firmware. However, they still trigger WMI events which
> results in "Unknown key code" warnings in dmesg.
> 
> Add these key codes to the keymap with KE_IGNORE to silence the warnings
> since no software action is needed.
> 
> [...]


Thank you for your contribution, it has been applied to my local
review-ilpo-next branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-next 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: Ignore backlight and FnLock events
      commit: e8c597368b8500a824c639bfb5ed0044068c6870

--
 i.