[PATCH v3 7/7] platform/x86: thinkpad_acpi: Reconcile EC level on resume

From: Qiling Zhu

Date: Sat Nov 14 2026 - 12:57:48 EST


The firmware does not always restore the keyboard backlight level across
sleep: after hibernation from auto mode the EC comes back with the
backlight off, without emitting a notification. The cached level and a
possibly still-active auto trigger then desynchronize from the hardware
until the next user action.

Check the EC level on resume on auto-mode machines and route it through
the regular notification path, which also deactivates the auto trigger
if the firmware left auto mode.

Signed-off-by: Qiling Zhu <kmatzkaczor244@xxxxxxxxx>
---
drivers/platform/x86/lenovo/thinkpad_acpi.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/x86/lenovo/thinkpad_acpi.c b/drivers/platform/x86/lenovo/thinkpad_acpi.c
index f11e61417..802e0d53b 100644
--- a/drivers/platform/x86/lenovo/thinkpad_acpi.c
+++ b/drivers/platform/x86/lenovo/thinkpad_acpi.c
@@ -5395,13 +5395,22 @@ static void kbdlight_suspend(void)
led_classdev_suspend(led_cdev);
}

+static void kbdlight_notify_change(void);
+
static void kbdlight_resume(void)
{
if (!tp_features.kbdlight)
return;

- if (tp_features.kbdlight_auto)
+ if (tp_features.kbdlight_auto) {
+ /*
+ * The firmware may not restore auto mode: after hibernation
+ * from level 3 it comes back with the backlight off. Check
+ * the EC level and reconcile.
+ */
+ kbdlight_notify_change();
return;
+ }

led_classdev_resume(&tpacpi_led_kbdlight.led_classdev);
}
--
2.56.1