[PATCH 0/2] platform/x86: ideapad-laptop: Fix FnLock & kbd backlight not remembered among boots

Rong Zhang posted 2 patches 3 months ago
drivers/platform/x86/ideapad-laptop.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH 0/2] platform/x86: ideapad-laptop: Fix FnLock & kbd backlight not remembered among boots
Posted by Rong Zhang 3 months ago
I had disabled ideapad-laptop for a long time until a critical bug was
fixed[1], and I soon noticed some behavior changes after reenabling
ideapad-laptop.

The behavior changes are about FnLock and keyboard backlight. The HW/FW
can remember their states among boots[2]. After enabling ideapad-laptop,
I noticed that their states were always reset to off after a reboot or a
power cycle.

Historically, FnLock was only exposed under the VPC2004 sysfs node, and
its state was remembered well. Things have changed since the
introduction of its LED class device. As a side effect of the LED class
device unregistering sequence, it is always turned off while shutting
down, making the HW/FW feature meaningless.

The story is similar but a bit different for keyboard backlight. Since
the first introduction of support for it, it has suffered from the same
issue.

Fix the issue by setting LED_RETAIN_AT_SHUTDOWN on their LED class
devices so that their states get remembered, which also aligns with the
behavior of manufacturer utilities on Windows.

[1]: commit 5808c3421695 ("platform/x86: ideapad-laptop: use
usleep_range() for EC polling")

[2]: For FnLock, most (if not all) models should support this; for
keyboard backlight, at least some recent models support this (I am not
sure about old models).

Rong Zhang (2):
  platform/x86: ideapad-laptop: Fix FnLock not remembered among boots
  platform/x86: ideapad-laptop: Fix kbd backlight not remembered among
    boots

 drivers/platform/x86/ideapad-laptop.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


base-commit: d7b8f8e20813f0179d8ef519541a3527e7661d3a
-- 
2.50.0
Re: [PATCH 0/2] platform/x86: ideapad-laptop: Fix FnLock & kbd backlight not remembered among boots
Posted by Ilpo Järvinen 3 months ago
On Tue, 08 Jul 2025 00:38:05 +0800, Rong Zhang wrote:

> I had disabled ideapad-laptop for a long time until a critical bug was
> fixed[1], and I soon noticed some behavior changes after reenabling
> ideapad-laptop.
> 
> The behavior changes are about FnLock and keyboard backlight. The HW/FW
> can remember their states among boots[2]. After enabling ideapad-laptop,
> I noticed that their states were always reset to off after a reboot or a
> power cycle.
> 
> [...]


Thank you for your contribution, it has been applied to my local
review-ilpo-fixes branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-fixes branch only once I've pushed my
local branch there, which might take a while.

The list of commits applied:
[1/2] platform/x86: ideapad-laptop: Fix FnLock not remembered among boots
      commit: 9533b789df7e8d273543a5991aec92447be043d7
[2/2] platform/x86: ideapad-laptop: Fix kbd backlight not remembered among boots
      commit: e10981075adce203eac0be866389309eeb8ef11e

--
 i.