From: Patryk Pilichowski <pat.pilichowski@gmail.com>
To: "Hans de Goede" <hansg@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org,
Patryk Pilichowski <pat.pilichowski@gmail.com>
Subject: [PATCH v2 2/2] platform/x86: msi-wmi: Ignore WMI events for keys also handled by atkbd
Date: Tue, 20 Oct 2026 16:14:27 +0200 [thread overview]
Message-ID: <20261020141427.1580282-3-pat.pilichowski@gmail.com> (raw)
In-Reply-To: <20261020141427.1580282-1-pat.pilichowski@gmail.com>
On MSI notebooks, several keys generate a WMI event through the Wind
event GUID in addition to a regular AT keyboard event. Their event
codes are not in the keymap, so every press logs "Unknown key
pressed".
These keys already work through the AT keyboard, so mark their WMI
codes as KE_IGNORE, as is already done for the MSI Claw. On models
where a code does not also produce a keyboard event, the event is
already dropped, so the only change there is that the log
message goes away.
The Wind event GUID is not specific to the MSI Wind. It is present in
17 of 18 MSI notebooks in the linuxhw ACPI dump collection (2012 to
2024), with the same _WED structure. The codes are shared across
models too: the volume keys on the tested notebook send the same codes
as the MSI Claw (0x21, 0x32).
Tested on an MSI Katana 15 B13VFK: Fn (0x0b), mic mute (0x19),
settings (0x1d), mute (0x23) and Bluetooth (0x78) no longer log
unknown key messages, and the keys keep working through atkbd.
Link: https://github.com/linuxhw/ACPI/tree/d6d30c6ef6f4/Notebook/MSI
Signed-off-by: Patryk Pilichowski <pat.pilichowski@gmail.com>
---
drivers/platform/x86/msi-wmi.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/platform/x86/msi-wmi.c b/drivers/platform/x86/msi-wmi.c
index 5369ac28f4c5..dc56e8da0cdb 100644
--- a/drivers/platform/x86/msi-wmi.c
+++ b/drivers/platform/x86/msi-wmi.c
@@ -34,7 +34,11 @@ MODULE_ALIAS("wmi:" MSIWMI_WIND_EVENT_GUID);
enum msi_scancodes {
WIND_KEY_TOUCHPAD = 0x08, /* Fn+F3 touchpad toggle */
+ WIND_KEY_FN_NB = 0x0b,
+ WIND_KEY_MICMUTE_NB = 0x19,
+ WIND_KEY_SETTINGS_NB = 0x1d,
CLAW_KEY_VOLUMEDOWN = 0x21,
+ WIND_KEY_MUTE_NB = 0x23,
CLAW_KEY_CENTER = 0x29, /* MSI M-Center main menu */
CLAW_KEY_QUICK_LONG = 0x2a, /* MSI M-Center quick access long hold */
CLAW_KEY_VOLUMEUP = 0x32,
@@ -44,6 +48,7 @@ enum msi_scancodes {
WIND_KEY_WLAN = 0x5f, /* Fn+F11 Wi-Fi toggle */
WIND_KEY_TURBO = 0x60, /* Fn+F10 turbo mode toggle */
WIND_KEY_ECO = 0x69, /* Fn+F10 ECO mode toggle */
+ WIND_KEY_BLUETOOTH_NB = 0x78,
MSI_KEY_BRIGHTNESSUP = 0xd0,
MSI_KEY_BRIGHTNESSDOWN = 0xd1,
MSI_KEY_VOLUMEUP = 0xd2,
@@ -63,6 +68,13 @@ static struct key_entry msi_wmi_keymap[] = {
{ KE_IGNORE, WIND_KEY_CAMERA, {KEY_CAMERA} },
{ KE_IGNORE, WIND_KEY_WLAN, {KEY_WLAN} },
+ /* These MSI Notebook keys work without WMI. Ignore them to avoid double keycodes */
+ { KE_IGNORE, WIND_KEY_FN_NB },
+ { KE_IGNORE, WIND_KEY_MICMUTE_NB },
+ { KE_IGNORE, WIND_KEY_SETTINGS_NB },
+ { KE_IGNORE, WIND_KEY_MUTE_NB },
+ { KE_IGNORE, WIND_KEY_BLUETOOTH_NB },
+
/* These are unknown WMI events found on MSI Wind */
{ KE_IGNORE, 0x00 },
{ KE_IGNORE, 0x62 },
--
2.56.0
prev parent reply other threads:[~2026-10-20 14:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-20 14:14 [PATCH v2 0/2] " Patryk Pilichowski
2026-10-20 14:14 ` [PATCH v2 1/2] platform/x86: msi-wmi: Sort scancodes numerically Patryk Pilichowski
2026-10-20 14:14 ` Patryk Pilichowski [this message]
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=20261020141427.1580282-3-pat.pilichowski@gmail.com \
--to=pat.pilichowski@gmail.com \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®