Bug 212671 - Lenovo legion 5 - FnLock LED Not working (ideapad-laptop)
Summary: Lenovo legion 5 - FnLock LED Not working (ideapad-laptop)
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Platform_x86 (show other bugs)
Hardware: x86-64 Linux
: P1 low
Assignee: platform_x86_64@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-13 17:50 UTC by Fouad
Modified: 2022-12-15 16:30 UTC (History)
3 users (show)

See Also:
Kernel Version: 5.11.13
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmidecode output (16.69 KB, text/plain)
2022-12-15 15:09 UTC, Fouad
Details

Description Fouad 2021-04-13 17:50:44 UTC
On Lenovo legion 5 with Ryzen 7 4800H cpu using Arch Linux, the FnLock LED doesn't switch ON if activated by Fn-Esc key press. Enabling/Disabling FnLock mode works fine using both keyboard shortcut "Fn-Esc" and manually changing the value in sysfs.

The LED reflects the actual status if manipulated via sysfs by manually writing 0 or 1 to "/sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/fn_lock".

Changing modes by keyboard does not update the LED status and keeps the last status enabled in sysfs.

A similar issue was recently solved for thinkpad-acpi in this bug report :
https://bugzilla.kernel.org/show_bug.cgi?id=207841
Comment 1 Hans de Goede 2021-08-18 13:38:04 UTC
I've just merged a fix from Meng Dong (thank you) for this, closing:

https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/commit/?id=18cfd76e7b84ea890c211031bbc4791359bae491
Comment 2 Hans de Goede 2022-11-15 19:11:02 UTC
Note I have just merged a patch which might cause this issue to re-surface.

The driver manually setting the Fn-Lock LED was causing issues on some models, so a patch has been merged to only do this on models on a specific DMI (model-string) based allow list. See:

https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/commit/?h=fixes&id=a3c272fae1468984d2ec4499d665ad8989d18388

The allow-list does contain the model-string of the Legion 5 (R7000P) from the original patch, which is a Ryzen 7 4800H using Legion 5, so hopefully this will cover the Legion 5 from this bug-report too.

If possible please give the patch a test-run. Or alternatively please let us know if the LED stops working again after a future kernel update.

If the LED stops working please run:

sudo dmidecode > dmidecode.txt

And attach the generated dmidecode.txt file here.
Comment 3 Hans de Goede 2022-11-16 07:49:42 UTC
Due to an update to my fixes branch, the commit hash of the patch from comment 2 has changed, it is now:

https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/commit/?h=fixes&id=81a5603a0f50fd7cf17ff21d106052215eaf2028
Comment 4 Fouad 2022-12-15 15:09:46 UTC
Created attachment 303414 [details]
dmidecode output

Tried kernel 6.1.0 (6.1~rc8-1~exp1) from Debian Experimental and the issue has indeed re-surfaced.

Attached you will find dmidecode output as requested.
Comment 5 Hans de Goede 2022-12-15 16:30:09 UTC
(In reply to Fouad from comment #4)
> Tried kernel 6.1.0 (6.1~rc8-1~exp1) from Debian Experimental and the issue
> has indeed re-surfaced.

Thank you for reporting I've send a patch upstream adding your model to the new DMI table of models which need the Fn lock LED to be explicitly turned on/off.

This fix hould find its way into a stable-series kernel within approx. a month.

Note You need to log in before you can comment on or make changes to this bug.