[PATCH v4] platform/asus: asus-wmi: Skip keyboard backlight read-back on B9406CAA
From: Sercan GOKMEN
Date: Fri Nov 27 2026 - 07:04:14 EST
On the ASUS ExpertBook Ultra B9406CAA (BIOS 312), DSTS(0x00050021)
always returns 0x550000: the presence bit is set and the level is 0,
whatever level the EC is driving. The DSDT builds this reply from
constants and never reads the EC. Writes work.
kbd_led_get() stores every read in asus->kbd_led_wk, so each sysfs read
resets the cached level to 0. sysfs, UPower and brightnessctl then
report 0, systemd-backlight restores a dark keyboard at boot, and the
next Fn backlight key press always gives level 1.
Add a kbd_led_no_readback quirk that makes kbd_led_get() return the
cached level, as the !kbd_led_avail path already does, and set it for
this board. Every path that changes the level keeps kbd_led_wk current.
Until the first write after probe, the driver still reports the 0 it
read at probe time.
Signed-off-by: Sercan GOKMEN <gokmensercan@xxxxxxxxx>
---
Tested on the B9406CAA (BIOS 312) on Linux 7.2.3: brightness reads back
the level written to it, UPower reports the same value, and the Fn
backlight key steps 2 -> 3 -> 0 -> 1 from level 2. On 7.3.0, 7.3.5 and
7.3.6, with the same change built as a DKMS module, writes of 3/1/0/2
read back unchanged.
Build-tested on review-ilpo-next (6fc627bda235) with W=1 (clang).
The patch was prepared with the help of an AI coding assistant (Claude
Code). I reviewed it and tested it on the hardware.
---
Changes in v4:
- Rebase onto review-ilpo-next, on top of the G814FP kbd_led_no_wmi
quirk (Ilpo).
- Link to v3: https://patch.msgid.link/20261123-b4-asus-wmi-b9406caa-kbd-readback-v3-1-1e6875af3703@xxxxxxxxx
Changes in v3:
- Rebase onto review-ilpo-next, after the move to drivers/platform/asus/,
and use the platform/asus prefix.
- Trim the commit message.
- Drop the comment on the quirk_entry field and shorten the one on the
quirk.
- Link to v2: https://patch.msgid.link/20261030-b4-asus-wmi-b9406caa-kbd-readback-v2-1-ca93bb9039f6@xxxxxxxxx
Changes in v2:
- Shorten the subject (Burak Goncu).
- Say that kbd_led_wk keeps the 0 read at probe until the first write
(Burak Goncu).
- Move the test details below the cut (Burak Goncu).
- Rebase on current for-next.
- Link to v1: https://patch.msgid.link/20261022-b4-asus-wmi-b9406caa-kbd-readback-v1-1-fb33ed98dd16@xxxxxxxxx
---
drivers/platform/asus/asus-nb-wmi.c | 15 +++++++++++++++
drivers/platform/asus/asus-wmi.c | 3 ++-
drivers/platform/asus/asus-wmi.h | 1 +
3 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/asus/asus-nb-wmi.c b/drivers/platform/asus/asus-nb-wmi.c
index 9b2a4b8298..ef8d6bca57 100644
--- a/drivers/platform/asus/asus-nb-wmi.c
+++ b/drivers/platform/asus/asus-nb-wmi.c
@@ -97,6 +97,12 @@ static struct quirk_entry quirk_asus_g814fp = {
.kbd_led_no_wmi = true,
};
+/* B9406CAA: DSTS(0x00050021) always reports level 0 */
+static struct quirk_entry quirk_asus_b9406caa = {
+ .wmi_backlight_set_devstate = true,
+ .kbd_led_no_readback = true,
+};
+
static struct quirk_entry quirk_asus_q500a = {
.filter_i8042_e1_extended_codes = true,
.wmi_backlight_set_devstate = true,
@@ -180,6 +186,15 @@ static const struct dmi_system_id asus_quirks[] = {
},
.driver_data = &quirk_asus_g814fp,
},
+ {
+ .callback = dmi_matched,
+ .ident = "ASUS ExpertBook Ultra B9406CAA",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "ASUS"),
+ DMI_MATCH(DMI_BOARD_NAME, "B9406CAA"),
+ },
+ .driver_data = &quirk_asus_b9406caa,
+ },
{
.callback = dmi_matched,
.ident = "ASUSTeK COMPUTER INC. Q500A",
diff --git a/drivers/platform/asus/asus-wmi.c b/drivers/platform/asus/asus-wmi.c
index d42efc6521..552080ff5b 100644
--- a/drivers/platform/asus/asus-wmi.c
+++ b/drivers/platform/asus/asus-wmi.c
@@ -1976,7 +1976,8 @@ static enum led_brightness kbd_led_get(struct led_classdev *led_cdev)
asus = container_of(led_cdev, struct asus_wmi, kbd_led);
scoped_guard(spinlock_irqsave, &asus_ref.lock) {
- if (!asus->kbd_led_avail)
+ if (!asus->kbd_led_avail ||
+ asus->driver->quirks->kbd_led_no_readback)
return asus->kbd_led_wk;
}
diff --git a/drivers/platform/asus/asus-wmi.h b/drivers/platform/asus/asus-wmi.h
index e53c6b3fc6..14f2c6c8b2 100644
--- a/drivers/platform/asus/asus-wmi.h
+++ b/drivers/platform/asus/asus-wmi.h
@@ -53,6 +53,7 @@ struct quirk_entry {
*/
int no_display_toggle;
u32 xusb2pr;
+ bool kbd_led_no_readback;
};
struct asus_wmi_driver {
---
base-commit: 6fc627bda235ac5b6f43b5f784b81d6c2450ae5a
change-id: 20261022-b4-asus-wmi-b9406caa-kbd-readback-aed82953d839
Best regards,
--
Sercan GOKMEN <gokmensercan@xxxxxxxxx>