* [PATCH] hid-asus: Disable OOBE mode on the ProArt P16
@ 2025-01-11 1:01 Luke D. Jones
2025-01-16 10:08 ` Jiri Kosina
0 siblings, 1 reply; 2+ messages in thread
From: Luke D. Jones @ 2025-01-11 1:01 UTC (permalink / raw)
To: linux-input
Cc: linux-kernel, bentiss, jikos, Luke D. Jones, Connor Belli, Jan Schmidt
The new ASUS ProArt 16" laptop series come with their keyboards stuck in
an Out-Of-Box-Experience mode. While in this mode most functions will
not work such as LED control or Fn key combos. The correct init sequence
is now done to disable this OOBE.
This patch addresses only the ProArt series so far and it is unknown if
there may be others, in which case a new quirk may be required.
Signed-off-by: Luke D. Jones <luke@ljones.dev>
Co-developed-by: Connor Belli <connorbelli2003@gmail.com>
Signed-off-by: Connor Belli <connorbelli2003@gmail.com>
Tested-by: Jan Schmidt <jan@centricular.com>
---
drivers/hid/hid-asus.c | 26 ++++++++++++++++++++++
include/linux/platform_data/x86/asus-wmi.h | 5 +++++
2 files changed, 31 insertions(+)
diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
index ef18f721e2ff..b89329f78257 100644
--- a/drivers/hid/hid-asus.c
+++ b/drivers/hid/hid-asus.c
@@ -437,6 +437,26 @@ static int asus_kbd_get_functions(struct hid_device *hdev,
return ret;
}
+static int asus_kbd_disable_oobe(struct hid_device *hdev)
+{
+ const u8 init[][6] = {
+ { FEATURE_KBD_REPORT_ID, 0x05, 0x20, 0x31, 0x00, 0x08 },
+ { FEATURE_KBD_REPORT_ID, 0xBA, 0xC5, 0xC4 },
+ { FEATURE_KBD_REPORT_ID, 0xD0, 0x8F, 0x01 },
+ { FEATURE_KBD_REPORT_ID, 0xD0, 0x85, 0xFF }
+ };
+ int ret;
+
+ for (size_t i = 0; i < ARRAY_SIZE(init); i++) {
+ ret = asus_kbd_set_report(hdev, init[i], sizeof(init[i]));
+ if (ret < 0)
+ return ret;
+ }
+
+ hid_info(hdev, "Disabled OOBE for keyboard\n");
+ return 0;
+}
+
static void asus_schedule_work(struct asus_kbd_leds *led)
{
unsigned long flags;
@@ -539,6 +559,12 @@ static int asus_kbd_register_leds(struct hid_device *hdev)
ret = asus_kbd_init(hdev, FEATURE_KBD_LED_REPORT_ID2);
if (ret < 0)
return ret;
+
+ if (dmi_match(DMI_PRODUCT_FAMILY, "ProArt P16")) {
+ ret = asus_kbd_disable_oobe(hdev);
+ if (ret < 0)
+ return ret;
+ }
} else {
/* Initialize keyboard */
ret = asus_kbd_init(hdev, FEATURE_KBD_REPORT_ID);
diff --git a/include/linux/platform_data/x86/asus-wmi.h b/include/linux/platform_data/x86/asus-wmi.h
index cc21e4272460..c427b6c20d3f 100644
--- a/include/linux/platform_data/x86/asus-wmi.h
+++ b/include/linux/platform_data/x86/asus-wmi.h
@@ -206,6 +206,11 @@ static const struct dmi_system_id asus_use_hid_led_dmi_ids[] = {
DMI_MATCH(DMI_PRODUCT_FAMILY, "ROG Flow"),
},
},
+ {
+ .matches = {
+ DMI_MATCH(DMI_PRODUCT_FAMILY, "ProArt P16"),
+ },
+ },
{
.matches = {
DMI_MATCH(DMI_BOARD_NAME, "GA403U"),
--
2.47.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] hid-asus: Disable OOBE mode on the ProArt P16
2025-01-11 1:01 [PATCH] hid-asus: Disable OOBE mode on the ProArt P16 Luke D. Jones
@ 2025-01-16 10:08 ` Jiri Kosina
0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2025-01-16 10:08 UTC (permalink / raw)
To: Luke D. Jones
Cc: linux-input, linux-kernel, bentiss, Connor Belli, Jan Schmidt
On Sat, 11 Jan 2025, Luke D. Jones wrote:
> The new ASUS ProArt 16" laptop series come with their keyboards stuck in
> an Out-Of-Box-Experience mode. While in this mode most functions will
> not work such as LED control or Fn key combos. The correct init sequence
> is now done to disable this OOBE.
>
> This patch addresses only the ProArt series so far and it is unknown if
> there may be others, in which case a new quirk may be required.
>
> Signed-off-by: Luke D. Jones <luke@ljones.dev>
> Co-developed-by: Connor Belli <connorbelli2003@gmail.com>
> Signed-off-by: Connor Belli <connorbelli2003@gmail.com>
> Tested-by: Jan Schmidt <jan@centricular.com>
Applied, thanks.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-16 10:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-11 1:01 [PATCH] hid-asus: Disable OOBE mode on the ProArt P16 Luke D. Jones
2025-01-16 10:08 ` Jiri Kosina
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®