drivers/platform/x86/msi-wmi.c | 92 ++++++++++++++++++++++------------ 1 file changed, 60 insertions(+), 32 deletions(-)
MSI Claw devices produce WMI events through the MSI WMI hotkeys GUID for some of their buttons. When pressed, these cause spam in the kernel. The Claws use a GUID already supported by msi-wmi, but use an ACPI_TYPE_BUFFER instead of an ACPI_TYPE_INTEGER. Patch 1 reformats msi_wmi_notify() to reduce nesting by using early returns and a switch case in preparation for handling this new data type. Patch 2 adds known MSI Claw event keycodes to the keymap and support for ACPI_TYPE_BUFFER. Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com> Derek J. Clark (2): platform/x86: msi-wmi: Reformat msi_wmi_notify() platform/x86: msi-wmi: Add MSI Claw M-Center keys drivers/platform/x86/msi-wmi.c | 92 ++++++++++++++++++++++------------ 1 file changed, 60 insertions(+), 32 deletions(-) -- 2.54.0
Am 12.06.26 um 00:39 schrieb Derek J. Clark: > MSI Claw devices produce WMI events through the MSI WMI hotkeys GUID for > some of their buttons. When pressed, these cause spam in the kernel. The > Claws use a GUID already supported by msi-wmi, but use an > ACPI_TYPE_BUFFER instead of an ACPI_TYPE_INTEGER. > > Patch 1 reformats msi_wmi_notify() to reduce nesting by using early > returns and a switch case in preparation for handling this new data > type. > > Patch 2 adds known MSI Claw event keycodes to the keymap and support for > ACPI_TYPE_BUFFER. Would it be possible to turn this driver into a proper WMI driver using .notify_new()? This would solve the whole ACPI type problem. Thanks, Armin Wolf > > Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com> > > Derek J. Clark (2): > platform/x86: msi-wmi: Reformat msi_wmi_notify() > platform/x86: msi-wmi: Add MSI Claw M-Center keys > > drivers/platform/x86/msi-wmi.c | 92 ++++++++++++++++++++++------------ > 1 file changed, 60 insertions(+), 32 deletions(-) >
On Fri, Jun 12, 2026 at 9:34 AM Armin Wolf <W_Armin@gmx.de> wrote: > > Am 12.06.26 um 00:39 schrieb Derek J. Clark: > > > MSI Claw devices produce WMI events through the MSI WMI hotkeys GUID for > > some of their buttons. When pressed, these cause spam in the kernel. The > > Claws use a GUID already supported by msi-wmi, but use an > > ACPI_TYPE_BUFFER instead of an ACPI_TYPE_INTEGER. > > > > Patch 1 reformats msi_wmi_notify() to reduce nesting by using early > > returns and a switch case in preparation for handling this new data > > type. > > > > Patch 2 adds known MSI Claw event keycodes to the keymap and support for > > ACPI_TYPE_BUFFER. > > Would it be possible to turn this driver into a proper WMI driver using > .notify_new()? This would solve the whole ACPI type problem. > Hi Armin, That would open up a huge can of worms that I'm not really able to manage right now. This driver seems to predate even the older wmi_dev standards (copyright is 2009) and I don't have any devices with the legacy interfaces.There are 3 standalone interfaces, the original WMI BIOS GUID, the backlight GUID, and the Wind GUID. The Claws only use the Wind GUID, but don't implement most of the buttons that were already in the driver, so I would be worried about regressions with the older interfaces. The driver is simple enough that I think we could get away with just one "modern" driver vice doing one for each GUID, but I'd also need to refactor everything to use drvdata instead of global vars so it could be instantiated multiple times. All of that seems like a lot of risk and effort to do what is effectively adding an event for 1 button on the A8 and silence some warnings for the rest of the line. I just now realized I forgot to include the original author in this patch so I've added then to CC here (my apologies Thomas). If there is a v2 needed I'll include them going forward. Thanks, Derek > Thanks, > Armin Wolf > > > > > Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com> > > > > Derek J. Clark (2): > > platform/x86: msi-wmi: Reformat msi_wmi_notify() > > platform/x86: msi-wmi: Add MSI Claw M-Center keys > > > > drivers/platform/x86/msi-wmi.c | 92 ++++++++++++++++++++++------------ > > 1 file changed, 60 insertions(+), 32 deletions(-) > >
Am 12.06.26 um 19:18 schrieb Derek John Clark: > On Fri, Jun 12, 2026 at 9:34 AM Armin Wolf <W_Armin@gmx.de> wrote: >> Am 12.06.26 um 00:39 schrieb Derek J. Clark: >> >>> MSI Claw devices produce WMI events through the MSI WMI hotkeys GUID for >>> some of their buttons. When pressed, these cause spam in the kernel. The >>> Claws use a GUID already supported by msi-wmi, but use an >>> ACPI_TYPE_BUFFER instead of an ACPI_TYPE_INTEGER. >>> >>> Patch 1 reformats msi_wmi_notify() to reduce nesting by using early >>> returns and a switch case in preparation for handling this new data >>> type. >>> >>> Patch 2 adds known MSI Claw event keycodes to the keymap and support for >>> ACPI_TYPE_BUFFER. >> Would it be possible to turn this driver into a proper WMI driver using >> .notify_new()? This would solve the whole ACPI type problem. >> > Hi Armin, > > That would open up a huge can of worms that I'm not really able to > manage right now. This driver seems to predate even the older wmi_dev > standards (copyright is 2009) and I don't have any devices with the > legacy interfaces.There are 3 standalone interfaces, the original WMI > BIOS GUID, the backlight GUID, and the Wind GUID. The Claws only use > the Wind GUID, but don't implement most of the buttons that were > already in the driver, so I would be worried about regressions with > the older interfaces. The driver is simple enough that I think we > could get away with just one "modern" driver vice doing one for each > GUID, but I'd also need to refactor everything to use drvdata instead > of global vars so it could be instantiated multiple times. All of that > seems like a lot of risk and effort to do what is effectively adding > an event for 1 button on the A8 and silence some warnings for the rest > of the line. > > I just now realized I forgot to include the original author in this > patch so I've added then to CC here (my apologies Thomas). If there is > a v2 needed I'll include them going forward. > > Thanks, > Derek No problem, i will see if i can get a MSI notebook somewhere to do this in the future. Thanks, Armin Wolf > >> Thanks, >> Armin Wolf >> >>> Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com> >>> >>> Derek J. Clark (2): >>> platform/x86: msi-wmi: Reformat msi_wmi_notify() >>> platform/x86: msi-wmi: Add MSI Claw M-Center keys >>> >>> drivers/platform/x86/msi-wmi.c | 92 ++++++++++++++++++++++------------ >>> 1 file changed, 60 insertions(+), 32 deletions(-) >>>
© 2016 - 2026 Red Hat, Inc.