Re: [ibm-acpi-devel] [PATCH] thinkpad_acpi: Add Auto mode support with dynamic max_brightness
From: Rong Zhang
Date: Sat Nov 07 2026 - 12:25:36 EST
Hi Andrea,
On Sat, 2026-11-07 at 14:23 +0100, Andrea Rabbaglietti wrote:
> On Mon, Feb 23, 2026, at 6:19 PM, Mark Pearson wrote:
> > Hi Hans - do you have an opinion on the path forwards?
>
> Hi all,
>
> a data point from a user, since this thread seems to have stalled.
See https://msgid.link/20261101100123.28749-1-kmatzkaczor244@xxxxxxxxx
>
> On a ThinkPad X9-14 Gen 1 (21QA, BIOS 1.25) running 7.2.15, the
> firmware already enters Auto mode on its own: Fn+Space cycles
>
> 0 -> 3 (Auto) -> 1 -> 2 -> 0 -> ...
>
> so with the current driver tpacpi::kbd_backlight reports brightness 3
> while max_brightness is 2, and brightness_hw_changed emits 3 as well.
>
> This is not only cosmetic. UPower 1.91.x treats 3 as out of range and
> stops watching brightness_hw_changed altogether, so the desktop no
> longer follows the hotkey at all after the first time Auto is reached:
> https://gitlab.freedesktop.org/upower/upower/-/work_items/367
+CC Qiling
Oops, this indeed needs a fix patch for backporting.
Qiling, while you series will fix this, it may be better to add a fix
patch CC'ing stable@xxxxxxxxxxxxxxx to the very beginning of the series,
so that the fix can be easily backported.
>
> Whatever interface is chosen for exposing Auto mode (separate attribute
> or hw-control trigger),
>
We've chosen the hw control trigger approach. The relevant support code
has landed in the LED subsystem.
> would a minimal fix in the meantime be
> acceptable? Following Hans' suggestion earlier in the thread, the driver
> would report max_brightness (2) in brightness and brightness_hw_changed
> while MLCG says Auto,
>
My opinion:
If auto mode disables keyboard backlight most of the time, it should
report 0. For example, when the auto mode if backed by an ALS sensor, it
should disable keyboard backlight most of the time, because most users
seldom use the laptop in dark environments.
Same for proximity- or activity-based control, as it only illuminates
when the user touches the keyboard.
The ideapad-laptop driver and Qiling's series have already taken this
strategy.
Thanks,
Rong
> and leave the ABI otherwise unchanged. That keeps
> the 0-2 contract userspace relies on and is easy to backport to stable.
>
> I am happy to write and test such a patch on this machine, or to test
> a v2 of this series, whichever you prefer.
>
> Thanks,
> Andrea Rabbaglietti