From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795892221; b=H/vCfT9j04ApICsajgs9AjaEq7o/izjUrVq+7Iw0aXNoBsRMPO/C9Z/D3UT4yJOldXIz e7APwwVv+CT6myHe3Ch0PfiujDQjFRS3orZjP2Z0md619O0riAD8zLeacILlrNTMnfYgV GSLuzjcpeJg/DQn/NyxI3fhFKeHQp5mq9NXMLcQS1FSy2NzF9J0NAqN0mzhNlBDheyBXM CW3T2KElu92uT6yCAz+c0P7RabzlvLeKyH3dGpMjRnAvJBuBZuVLrW9IH/K5+yrGItSl4 bcbeeE4Z344MoTLSu6Z/NSL4Z63gdOKGrW5kUpMFy7YyckHtNY0OMnEQCuxyMkmVm/w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795892221; h=Received:DKIM-Signature:Received:From:To:Subject:Date: X-Bugzilla-Reason:X-Bugzilla-Type:X-Bugzilla-Watch-Reason: X-Bugzilla-Product:X-Bugzilla-Component:X-Bugzilla-Version: X-Bugzilla-Keywords:X-Bugzilla-Severity:X-Bugzilla-Who: X-Bugzilla-Status:X-Bugzilla-Resolution:X-Bugzilla-Priority: X-Bugzilla-Assigned-To:X-Bugzilla-Flags:X-Bugzilla-Changed-Fields: Message-ID:Content-Type:Content-Transfer-Encoding:X-Bugzilla-URL: Auto-Submitted:MIME-Version; bh=VUKxN0SMot8/zSgwrGWzEPAKd2Mt/+F04+DUUnGYJ9c=; b=dtVK2thWNVujPMJtm3BhYGw6oUewnDANQ/RzMtyepKnGy7r2pLGiuOS++IvNYSkOsmOZ G47ZTcHmCXoJG5HcxjQ37IxsEc8ed0hgySp/rM59P5XKjnI/ngH5lAiYYErAsQ4stTZeM q48caolY/hPWbkWG5Q1qpoeopIQp/Fq01Yhh5Vv2M5GepyDezCkPXdDdaDTvf3H9LGFhR VAbWWs0MBW+leEaEzqshQbqRAB83yFxNXtC7X6pCnk6WlL76SOGR6+iR61jim3JUsbQYi Z2toRA1ZUwRd0UiVsi70tH02/7gIVAahAlfIyo0K3gyk6Nh3TCmPAU0HqY9HfZ+KCcg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=H9bhHkmI; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A2FD1606A31C for ; Sat, 28 Nov 2026 18:57:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=H9bhHkmI Received: by smtp.kernel.org (Postfix) with ESMTPS id 749461F00897 for ; Sat, 28 Nov 2026 18:57:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795892221; bh=VUKxN0SMot8/zSgwrGWzEPAKd2Mt/+F04+DUUnGYJ9c=; h=From:To:Subject:Date; b=H9bhHkmIkkWpzZkwRhd2+VOmJcG56epNTcl0Sa1Tl3TR6dLQEW9PvKGWPik6ydawX vGt5Bhmnz0W8nUYhimPH+J6oICLYOADY9dPLPn8Qn20FQInQnAgr/R6ZvFsDOwlOUc LIv+lfZ5S/IZNHm3lY0YuuDrSgC0rcNbx+/De9cU8vIl26hzkzJNrZPFBxvoT83Vo0 SwrSnDVHiXG4iltXJe0kSp706v904EYe30pz1ompr+gsMb5OxLRys2vTMNnQ7kMdS4 hgY8T4K4Q0bo2iirD1feXkL9vHWowXU3SISGsLSU0ZE2Q83EPNcUctcdQrk1I0hFLa JISUyMrMaMIZQ== Received: by aws-us-west-2-korg-bugzilla-alma10-1.codeaurora.org (Postfix, from userid 48) id 68DDD240040E; Sat, 28 Nov 2026 18:57:01 +0000 (UTC) From: bugzilla-daemon@kernel.org To: platform-driver-x86@vger.kernel.org Subject: [Bug 222342] New: [BUG] platform/x86: asus-wmi: kbd backlight cannot be set on ZenBook UX431DA (DEVS 0x00050021 is a firmware no-op) Date: Sat, 28 Nov 2026 18:57:01 +0000 X-Bugzilla-Reason: None X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: AssignedTo drivers_platform_x86@kernel-bugs.osdl.org X-Bugzilla-Product: Drivers X-Bugzilla-Component: Platform_x86 X-Bugzilla-Version: 2.5 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: icar.nin@protonmail.com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: drivers_platform_x86@kernel-bugs.osdl.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cf_regression attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugzilla.kernel.org/ Auto-Submitted: auto-generated X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 https://bugzilla.kernel.org/show_bug.cgi?id=3D222342 Bug ID: 222342 Summary: [BUG] platform/x86: asus-wmi: kbd backlight cannot be set on ZenBook UX431DA (DEVS 0x00050021 is a firmware no-op) Product: Drivers Version: 2.5 Hardware: All OS: Linux Status: NEW Severity: normal Priority: P3 Component: Platform_x86 Assignee: drivers_platform_x86@kernel-bugs.osdl.org Reporter: icar.nin@protonmail.com Regression: No Created attachment 311616 --> https://bugzilla.kernel.org/attachment.cgi?id=3D311616&action=3Dedit Proposed patch Hi, On the ASUS ZenBook UX431DA, asus-wmi registers asus::kbd_backlight and reports the level correctly, but writing a level has no effect. The firmware's DEVS handler for ASUS_WMI_DEVID_KBD_BACKLIGHT returns success and does nothing. The backlight hotkey still works because the firmware changes the level itself, by writing an EC register, before it notifies the OS. Writing that EC register from the OS sets the backlight, so I would like to ask whether a quirk for this model would be acceptable. Hardware / software ------------------- Model ASUSTeK COMPUTER INC. ZenBook UX431DA_UM431DA Board UX431DA BIOS UX431DA.304, 08/15/2020 (EC firmware release 3.4) Kernel 7.3.6-arch1-1 (Arch Linux), in-tree asus-wmi / asus-nb-wmi asus_wmi: Initialization: 0x1 asus_wmi: BIOS WMI version: 8.1 asus_wmi: SFUN value: 0x4a0061 asus-nb-wmi asus-nb-wmi: Detected ATK, not ASUSWMI, use DSTS Symptoms -------- * /sys/class/leds/asus::kbd_backlight exists, max_brightness is 3. * Writing to "brightness" succeeds (as root, and through logind's SetBrightness and UPower's KbdBacklight.SetBrightness) but the backlight does not change and the value reads back unchanged. * The keyboard backlight hotkey cycles 0-3 as expected, and the change is reported through brightness_hw_changed. * As a result the desktop can display the level but not set it (GNOME quick settings slider, idle dimming), and systemd-backlight cannot restore the level at boot. Firmware does not act on DEVS ----------------------------- Using the asus-nb-wmi debugfs interface, with the backlight at level 1: DSTS(0x50021) =3D 0x58001 DEVS(0x50021, 0x83) =3D 0x1 DSTS(0x50021) =3D 0x58001 <- unchanged, backlight unchanged So the driver's write path (kbd_led_set() -> kbd_led_update() -> asus_wmi_set_devstate(ASUS_WMI_DEVID_KBD_BACKLIGHT, 0x80 | level)) does reach the firmware, and the firmware reports success. Root cause in the DSDT ---------------------- The DEVS branch calls SLKB, which calls SLKI, which is an empty stub: If ((IIA0 =3D=3D 0x00050021)) { SLKB (IIA1) Return (One) } Method (SLKB, 1, NotSerialized) { Return (SLKI (Arg0)) } Method (SLKI, 1, NotSerialized) { Local0 =3D Zero Return (Local0) } The DSTS branch reads the level from KBLV, a field in a SystemMemory region: If ((IIA0 =3D=3D 0x00050021)) { If (GLKB (One)) { Local0 =3D GLKB (0x03) // GALL (), always 0x80 Local0 <<=3D 0x08 Local0 +=3D GLKB (0x02) // KBLV Local0 |=3D 0x00050000 Return (Local0) } Return (0x8000) } The hotkey is handled by EC query _Q66, which is the only place in the DSDT that writes KBLV or the EC field KBLL: Method (_Q66, 0, NotSerialized) { P80H =3D 0x66 If (ATKP) { Local1 =3D (KBLC & 0x80) If (Local1) { Local0 =3D KBLV Local0 +=3D One If ((Local0 >=3D 0x04)) { Local0 =3D Zero } KBLV =3D Local0 KBLL =3D KBLV ^^^^ATKD.MWGF (0x000200FF, KBLV, 0x4647574D) ^^^^ATKD.IANE (0xC7) } } } KBLL is at offset 0x24 of the EC: OperationRegion (ECF2, EmbeddedControl, Zero, 0xFF) Field (ECF2, ByteAcc, Lock, Preserve) { XXX0, 8, XXX1, 8, XXX2, 8, STAS, 8, Offset (0x0F), , 7, EOBF, 1, Offset (0x20), RCMD, 8, , 7, EGC6, 1, TESR, 8, HBDA, 8, KBLL, 8, ... } So on this machine the firmware has already applied the new level when the driver receives NOTIFY_KBD_BRTTOGGLE (0xc7). The driver then computes kbd_led_wk + 1 and issues a DEVS call that does nothing. The two only agree because both count the same way. Writing the EC register works ----------------------------- With ec_sys loaded with write_support=3D1, writing a level to EC offset 0x24 sets the backlight immediately, for example full brightness: printf '\x03' | dd of=3D/sys/kernel/debug/ec/ec0/io bs=3D1 seek=3D36 conv= =3Dnotrunc I stepped through 0, 1, 2, 3 and back down to 0 this way, and the backlight matched the written level every time (0 is off). The register read back the written value each time, while sysfs "brightness" stayed at 0, the level the firmware had before the test. KBLV is not updated by this, so DSTS and the sysfs "brightness" file keep returning the previous level afterwards, and no brightness_hw_changed event is generated. Userspace therefore does not notice the change. Not fixed by a BIOS update -------------------------- I extracted the DSDT from all four BIOS images ASUS has published for this model (300, 301, 304 and 306). SLKI, SLKB, the DEVS branch and _Q66 are byte-identical in all of them, and the 306 DSDT is identical to the 304 one. I am therefore not reporting this as a kernel regression. Possible fix ------------ A DMI quirk (DMI_BOARD_NAME "UX431DA") that makes the driver set the level with ec_write(0x24, level) instead of, or in addition to, the DEVS call. Two details would need handling: * DSTS cannot be used for read-back after an OS-initiated change, because KBLV is only updated by _Q66. The driver would have to return its cached kbd_led_wk on this model. * After a hotkey press the firmware sets KBLL from its own KBLV + 1, which can differ from the driver's value if the OS changed the level in between. The existing 0xc7 handling (kbd_led_wk + 1, then set) would then overwrite KBLL with the driver's value, which seems like the right result. The UM431DA shares the product name string and, according to the ASUS support site, the same BIOS files, so it is presumably affected too. I have not tested one. I can test patches and provide a full acpidump or any other output on request. Thanks, =C3=8Dcar N.S. --=20 You are receiving this mail because: You are watching the assignee of the bug.=