[PATCH] platform/x86: intel-hid: Add H3C MegaBook 14 to dmi_auto_add_switch
From: NanamiKite
Date: Wed Nov 18 2026 - 21:22:28 EST
The H3C MegaBook 14 is a detachable 2-in-1 device with a magnetic USB
keyboard, but its SMBIOS table reports chassis_type 10 (Notebook)
instead of 31 (Convertible) or 32 (Detachable). As a result, intel-hid
leaves SW_TABLET_MODE reporting disabled by default.
Its ACPI HIDD._DSM function 8 (VGBS) unconditionally returns 0, so
probing initial switch state via dmi_vgbs_allow_list would falsely
report tablet mode when booted with the keyboard attached. However, its
EC properly sends ACPI notifications 0xCC on keyboard detach (_QF3) and
0xCD on keyboard attach (_QF2) to INTC107B.
Add the H3C MegaBook 14 to dmi_auto_add_switch so SW_TABLET_MODE is
enabled upon receiving the first tablet-mode switch event. Tested with
intel_hid.enable_sw_tablet_mode=1 and verified via libinput that
detaching and reattaching the keyboard toggles SW_TABLET_MODE between
1 and 0.
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: NanamiKite <nanami@xxxxxxxxx>
---
drivers/platform/x86/intel/hid.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/platform/x86/intel/hid.c b/drivers/platform/x86/intel/hid.c
index 60e6b47..b487739 100644
--- a/drivers/platform/x86/intel/hid.c
+++ b/drivers/platform/x86/intel/hid.c
@@ -242,6 +242,12 @@ static const struct dmi_system_id dmi_auto_add_switch[] = {
DMI_EXACT_MATCH(DMI_CHASSIS_TYPE, "32" /* Detachable */),
},
},
+ {
+ .matches = {
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "H3C"),
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "H3C MegaBook 14"),
+ },
+ },
{} /* Array terminator */
};
--
2.56.1