* [PATCH] platform/x86: msi-wmi: Ignore WMI events for keys also handled by atkbd
@ 2026-09-26 16:50 Patryk Pilichowski
2026-10-12 15:06 ` Ilpo Järvinen
0 siblings, 1 reply; 2+ messages in thread
From: Patryk Pilichowski @ 2026-09-26 16:50 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen
Cc: platform-driver-x86, linux-kernel, Patryk Pilichowski
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
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Patryk Pilichowski <pat.pilichowski@gmail.com>
---
drivers/platform/x86/msi-wmi.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/platform/x86/msi-wmi.c b/drivers/platform/x86/msi-wmi.c
index c9db750fe5..6c798f6177 100644
--- a/drivers/platform/x86/msi-wmi.c
+++ b/drivers/platform/x86/msi-wmi.c
@@ -46,6 +46,12 @@ enum msi_scancodes {
WIND_KEY_WLAN = 0x5f, /* Fn+F11 Wi-Fi toggle */
WIND_KEY_TURBO, /* Fn+F10 turbo mode toggle */
WIND_KEY_ECO = 0x69, /* Fn+F10 ECO mode toggle */
+ /* MSI Notebook keys that use Wind GUID */
+ WIND_KEY_FN_NB = 0x0b,
+ WIND_KEY_MICMUTE_NB = 0x19,
+ WIND_KEY_SETTINGS_NB = 0x1d,
+ WIND_KEY_MUTE_NB = 0x23,
+ WIND_KEY_BLUETOOTH_NB = 0x78,
/* MSI Claw keys */
CLAW_KEY_VOLUMEDOWN = 0x21,
CLAW_KEY_CENTER = 0x29, /* MSI M-Center main menu */
@@ -66,6 +72,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.55.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] platform/x86: msi-wmi: Ignore WMI events for keys also handled by atkbd
2026-09-26 16:50 [PATCH] platform/x86: msi-wmi: Ignore WMI events for keys also handled by atkbd Patryk Pilichowski
@ 2026-10-12 15:06 ` Ilpo Järvinen
0 siblings, 0 replies; 2+ messages in thread
From: Ilpo Järvinen @ 2026-10-12 15:06 UTC (permalink / raw)
To: Patryk Pilichowski; +Cc: Hans de Goede, platform-driver-x86, LKML
On Sat, 26 Sep 2026, Patryk Pilichowski wrote:
> 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
> Assisted-by: Claude:claude-opus-5-5
> Signed-off-by: Patryk Pilichowski <pat.pilichowski@gmail.com>
> ---
> drivers/platform/x86/msi-wmi.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/drivers/platform/x86/msi-wmi.c b/drivers/platform/x86/msi-wmi.c
> index c9db750fe5..6c798f6177 100644
> --- a/drivers/platform/x86/msi-wmi.c
> +++ b/drivers/platform/x86/msi-wmi.c
> @@ -46,6 +46,12 @@ enum msi_scancodes {
> WIND_KEY_WLAN = 0x5f, /* Fn+F11 Wi-Fi toggle */
> WIND_KEY_TURBO, /* Fn+F10 turbo mode toggle */
> WIND_KEY_ECO = 0x69, /* Fn+F10 ECO mode toggle */
> + /* MSI Notebook keys that use Wind GUID */
> + WIND_KEY_FN_NB = 0x0b,
> + WIND_KEY_MICMUTE_NB = 0x19,
> + WIND_KEY_SETTINGS_NB = 0x1d,
> + WIND_KEY_MUTE_NB = 0x23,
> + WIND_KEY_BLUETOOTH_NB = 0x78,
> /* MSI Claw keys */
> CLAW_KEY_VOLUMEDOWN = 0x21,
> CLAW_KEY_CENTER = 0x29, /* MSI M-Center main menu */
Hi,
This is getting increasingly hard to read as the values are not ordered.
And apparently grouping them by model was bogus anyway (as mentioned in
your changelog text).
So my suggestion is you make a two patch series, first ordering these
existing ones numerically and adding the values for those not having one
yet (please also convert 0xD0 -> 0xd0 for consistency). Then in the second
patch add these new entries.
--
i.
> @@ -66,6 +72,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 },
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-12 15:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-26 16:50 [PATCH] platform/x86: msi-wmi: Ignore WMI events for keys also handled by atkbd Patryk Pilichowski
2026-10-12 15:06 ` 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
all inboxes | Powered by JetHome®