[PATCH v2 1/2] platform/x86: asus-wmi: fix TUF keyboard power state shutdown naming
From: Bartu Alev
Date: Fri Sep 25 2026 - 20:59:35 EST
The fourth state flag of kbd_rgb_state_index is currently named
"keyboard" and was historically assumed to have no effect. In hardware,
this bit (BIT(7) in the WMI DEVS payload) gates whether the keyboard
backlight remains illuminated during the ACPI S5 power-off sequence.
Hardware A/B testing on ASUS TUF Gaming A15 (FA507NV) confirms that
setting this bit causes the keyboard to light up white upon power-off,
while clearing it ensures a dark, clean shutdown.
Relabel this field from "keyboard" to "shutdown" to accurately describe
its hardware function and align it with userspace tooling (asusctl,
g-helper).
Fixes: 61f64515299e ("platform/x86: asus-wmi: Implement TUF laptop keyboard power states")
Cc: stable@xxxxxxxxxxxxxxx
Suggested-by: Denis Benato <denis.benato@xxxxxxxxx>
Signed-off-by: Bartu Alev <bartualev@xxxxxxxxx>
---
drivers/platform/x86/asus-wmi.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index a65090429ca7..db6ee1974838 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -1119,10 +1119,10 @@ static ssize_t kbd_rgb_state_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
- u32 flags, cmd, boot, awake, sleep, keyboard;
+ u32 flags, cmd, boot, awake, sleep, shutdown;
int err;
- if (sscanf(buf, "%d %d %d %d %d", &cmd, &boot, &awake, &sleep, &keyboard) != 5)
+ if (sscanf(buf, "%d %d %d %d %d", &cmd, &boot, &awake, &sleep, &shutdown) != 5)
return -EINVAL;
if (cmd)
@@ -1135,7 +1135,7 @@ static ssize_t kbd_rgb_state_store(struct device *dev,
flags |= BIT(3);
if (sleep)
flags |= BIT(5);
- if (keyboard)
+ if (shutdown)
flags |= BIT(7);
/* 0xbd is the required default arg0 for the method. Nothing happens otherwise */
@@ -1149,7 +1149,7 @@ static ssize_t kbd_rgb_state_store(struct device *dev,
static DEVICE_ATTR_WO(kbd_rgb_state);
static DEVICE_STRING_ATTR_RO(kbd_rgb_state_index, 0444,
- "cmd boot awake sleep keyboard");
+ "cmd boot awake sleep shutdown");
static struct attribute *kbd_rgb_state_attrs[] = {
&dev_attr_kbd_rgb_state.attr,
--
2.55.0