Solved FN Keys in Lenovo Laptop

Hi all,

I solved the problem of FN keys not working in Lenovo Thinkpads.
It works in KDE and in other environments there is probably a similar solution.
Instead of invoking rtcwake on boot via crontab (which never worked, cronie ignored it) I created a command to be executed when KDE starts.

In ./config/autostart I created a file with the name rtcwake.desktop with the following content:

[Desktop Entry]
Comment[pt_PT]=
Comment=
Exec=/usr/bin/rtcwake -m mem -s 2
GenericName[pt_PT]=
GenericName=
Icon=
MimeType=
Name[pt_PT]=rtcwake
Name=rtcwake
Path=
StartupNotify=false
Terminal=false
TerminalOptions=
Type=Application
X-KDE-SubstituteUID=false
X-KDE-Username=

After rebooting the laptop recognizes all FN keys.
Hope this works for you.

PS - pt-PT is because I’ve a portuguese keyboard/system language. Perhaps it has no influence but you can always change that to your language en-US, en-GB, whatever language you use.

PS2 - If you find similar solutions for your environment (ie. gnome, etc) post them in here so we keep this info centralized.

Best regards to you all

1 Like

This is an odd workaround.

I have never had a thinkpad or ideapad where the Fn keys dont work, and I would never have guessed that using rtcwake (a command to suspend/sleep state) would be a viable approach, but I do notice some similar examples in places like the archwiki. Well, exactly one example, but its there …
https://wiki.archlinux.org/title/Lenovo_ThinkPad_E14_Gen_2_(AMD)

I’m curious if any other approaches have been tried?

PS.

Cron and cronie are pretty old tech now with not much reason for use. A systemd service or timer usually makes the most sense unless you just want a single dumb autostart and your environment facilitates that (like plasma autostart).

Hi,

I’ve seen other aproaches being tried but they didn’t work or were too elaborate and with caveats.
Most people tried rtcwake in crontab (mainly in Ubuntu and Mint) but if they worked in the past it’s not the case now.
If you google around you will see the reason to use rtcwake.
There is a different approach in github but every time grub is uptaded you’re back to square 1.
As a matter of fact everyone was trying to change the behaviour of the keys at system boot.
I thought out of the box and asked myself why at system boot?
Unless you are using your system as an old terminal one, you are using a graphical environment like KDE in my case and only then you need sound, brightness, etc controls to work properly
So I decided to find out how to launch a program on KDE startup and it works very well.
I don’t know if modern Thinkpads, Ideapads, etc have that problem, I think it’s a Bios issue regarding Lenovo laptops that were not certified to run linux.
Mine is an old AMD Gen 2 and it has that problem.
I solved it some years ago but I re-installed Manjaro to get rid of lots o clutter acumulated over the years and the FN keys problem needed to be solved again.
I forgot how I did in the past and couldn’t find a working solution and that’s what took me to this path.
Systemd is an alternative but as I said, I only need the FN keys to work in my graphical session, not at boot and it’s easier for me to take this approach than to figure out a systemd unit to do the same thing.
Old school quick and dirty :slight_smile:
Thanks for your input.