From: Greg Kroah-Hartman Date: Sun, 21 Sep 2025 16:41:30 +0000 (+0200) Subject: 6.12-stable patches X-Git-Tag: v6.1.154~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f1b0dcb9b7d598f1f40adf6187ec6e29c20169c7;p=thirdparty%2Fkernel%2Fstable-queue.git 6.12-stable patches added patches: platform-x86-asus-wmi-fix-rog-button-mapping-tablet-mode-on-asus-rog-z13.patch platform-x86-asus-wmi-re-add-extra-keys-to-ignore_key_wlan-quirk.patch --- diff --git a/queue-6.12/platform-x86-asus-wmi-fix-rog-button-mapping-tablet-mode-on-asus-rog-z13.patch b/queue-6.12/platform-x86-asus-wmi-fix-rog-button-mapping-tablet-mode-on-asus-rog-z13.patch new file mode 100644 index 0000000000..fe56422336 --- /dev/null +++ b/queue-6.12/platform-x86-asus-wmi-fix-rog-button-mapping-tablet-mode-on-asus-rog-z13.patch @@ -0,0 +1,111 @@ +From 132bfcd24925d4d4531a19b87acb8474be82a017 Mon Sep 17 00:00:00 2001 +From: Antheas Kapenekakis +Date: Fri, 8 Aug 2025 17:47:10 +0200 +Subject: platform/x86: asus-wmi: Fix ROG button mapping, tablet mode on ASUS ROG Z13 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Antheas Kapenekakis + +commit 132bfcd24925d4d4531a19b87acb8474be82a017 upstream. + +On commit 9286dfd5735b ("platform/x86: asus-wmi: Fix spurious rfkill on +UX8406MA"), Mathieu adds a quirk for the Zenbook Duo to ignore the code +0x5f (WLAN button disable). On that laptop, this code is triggered when +the device keyboard is attached. + +On the ASUS ROG Z13 2025, this code is triggered when pressing the side +button of the device, which is used to open Armoury Crate in Windows. + +As this is becoming a pattern, where newer Asus laptops use this keycode +for emitting events, let's convert the wlan ignore quirk to instead +allow emitting codes, so that userspace programs can listen to it and +so that it does not interfere with the rfkill state. + +With this patch, the Z13 wil emit KEY_PROG3 and the Duo will remain +unchanged and emit no event. While at it, add a quirk for the Z13 to +switch into tablet mode when removing the keyboard. + +Signed-off-by: Antheas Kapenekakis +Link: https://lore.kernel.org/r/20250808154710.8981-2-lkml@antheas.dev +Reviewed-by: Ilpo Järvinen +Signed-off-by: Ilpo Järvinen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/platform/x86/asus-nb-wmi.c | 23 +++++++++++++++++++---- + drivers/platform/x86/asus-wmi.h | 3 ++- + 2 files changed, 21 insertions(+), 5 deletions(-) + +--- a/drivers/platform/x86/asus-nb-wmi.c ++++ b/drivers/platform/x86/asus-nb-wmi.c +@@ -146,7 +146,12 @@ static struct quirk_entry quirk_asus_ign + }; + + static struct quirk_entry quirk_asus_zenbook_duo_kbd = { +- .ignore_key_wlan = true, ++ .key_wlan_event = ASUS_WMI_KEY_IGNORE, ++}; ++ ++static struct quirk_entry quirk_asus_z13 = { ++ .key_wlan_event = ASUS_WMI_KEY_ARMOURY, ++ .tablet_switch_mode = asus_wmi_kbd_dock_devid, + }; + + static int dmi_matched(const struct dmi_system_id *dmi) +@@ -538,6 +543,15 @@ static const struct dmi_system_id asus_q + }, + .driver_data = &quirk_asus_zenbook_duo_kbd, + }, ++ { ++ .callback = dmi_matched, ++ .ident = "ASUS ROG Z13", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), ++ DMI_MATCH(DMI_PRODUCT_NAME, "ROG Flow Z13"), ++ }, ++ .driver_data = &quirk_asus_z13, ++ }, + {}, + }; + +@@ -635,6 +649,7 @@ static const struct key_entry asus_nb_wm + { KE_IGNORE, 0xCF, }, /* AC mode */ + { KE_KEY, 0xFA, { KEY_PROG2 } }, /* Lid flip action */ + { KE_KEY, 0xBD, { KEY_PROG2 } }, /* Lid flip action on ROG xflow laptops */ ++ { KE_KEY, ASUS_WMI_KEY_ARMOURY, { KEY_PROG3 } }, + { KE_END, 0}, + }; + +@@ -654,9 +669,9 @@ static void asus_nb_wmi_key_filter(struc + if (atkbd_reports_vol_keys) + *code = ASUS_WMI_KEY_IGNORE; + break; +- case 0x5F: /* Wireless console Disable */ +- if (quirks->ignore_key_wlan) +- *code = ASUS_WMI_KEY_IGNORE; ++ case 0x5F: /* Wireless console Disable / Special Key */ ++ if (quirks->key_wlan_event) ++ *code = quirks->key_wlan_event; + break; + } + } +--- a/drivers/platform/x86/asus-wmi.h ++++ b/drivers/platform/x86/asus-wmi.h +@@ -18,6 +18,7 @@ + #include + + #define ASUS_WMI_KEY_IGNORE (-1) ++#define ASUS_WMI_KEY_ARMOURY 0xffff01 + #define ASUS_WMI_BRN_DOWN 0x2e + #define ASUS_WMI_BRN_UP 0x2f + +@@ -40,7 +41,7 @@ struct quirk_entry { + bool wmi_force_als_set; + bool wmi_ignore_fan; + bool filter_i8042_e1_extended_codes; +- bool ignore_key_wlan; ++ int key_wlan_event; + enum asus_wmi_tablet_switch_mode tablet_switch_mode; + int wapf; + /* diff --git a/queue-6.12/platform-x86-asus-wmi-re-add-extra-keys-to-ignore_key_wlan-quirk.patch b/queue-6.12/platform-x86-asus-wmi-re-add-extra-keys-to-ignore_key_wlan-quirk.patch new file mode 100644 index 0000000000..622c865f75 --- /dev/null +++ b/queue-6.12/platform-x86-asus-wmi-re-add-extra-keys-to-ignore_key_wlan-quirk.patch @@ -0,0 +1,42 @@ +From 225d1ee0f5ba3218d1814d36564fdb5f37b50474 Mon Sep 17 00:00:00 2001 +From: Antheas Kapenekakis +Date: Tue, 16 Sep 2025 09:28:18 +0200 +Subject: platform/x86: asus-wmi: Re-add extra keys to ignore_key_wlan quirk +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Antheas Kapenekakis + +commit 225d1ee0f5ba3218d1814d36564fdb5f37b50474 upstream. + +It turns out that the dual screen models use 0x5E for attaching and +detaching the keyboard instead of 0x5F. So, re-add the codes by +reverting commit cf3940ac737d ("platform/x86: asus-wmi: Remove extra +keys from ignore_key_wlan quirk"). For our future reference, add a +comment next to 0x5E indicating that it is used for that purpose. + +Fixes: cf3940ac737d ("platform/x86: asus-wmi: Remove extra keys from ignore_key_wlan quirk") +Reported-by: Rahul Chandra +Closes: https://lore.kernel.org/all/10020-68c90c80-d-4ac6c580@106290038/ +Cc: stable@kernel.org +Signed-off-by: Antheas Kapenekakis +Link: https://patch.msgid.link/20250916072818.196462-1-lkml@antheas.dev +Reviewed-by: Ilpo Järvinen +Signed-off-by: Ilpo Järvinen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/platform/x86/asus-nb-wmi.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/platform/x86/asus-nb-wmi.c ++++ b/drivers/platform/x86/asus-nb-wmi.c +@@ -669,6 +669,8 @@ static void asus_nb_wmi_key_filter(struc + if (atkbd_reports_vol_keys) + *code = ASUS_WMI_KEY_IGNORE; + break; ++ case 0x5D: /* Wireless console Toggle */ ++ case 0x5E: /* Wireless console Enable / Keyboard Attach, Detach */ + case 0x5F: /* Wireless console Disable / Special Key */ + if (quirks->key_wlan_event) + *code = quirks->key_wlan_event; diff --git a/queue-6.12/series b/queue-6.12/series index 5232633149..044b3a0f7e 100644 --- a/queue-6.12/series +++ b/queue-6.12/series @@ -82,3 +82,5 @@ smb-client-let-smbd_destroy-call-disable_work_sync-i.patch crypto-af_alg-set-merge-to-zero-early-in-af_alg_send.patch smb-client-fix-smbdirect_recv_io-leak-in-smbd_negoti.patch io_uring-fix-incorrect-io_kiocb-reference-in-io_link.patch +platform-x86-asus-wmi-fix-rog-button-mapping-tablet-mode-on-asus-rog-z13.patch +platform-x86-asus-wmi-re-add-extra-keys-to-ignore_key_wlan-quirk.patch