12-25-2017 06:41 AM
I'm running linux on my new lenovo 920, I'm very much used to old working mode of Function Keys and would like to swap the hotkey mode to old fashioned mode.
I've tried from bios, as sugested in lenovo's forum but the option is not available on mine.
Any way I can achive this?
04-29-2018 09:27 AM
Hello, first for all: congratulation with buying a great laptop. With linux onboard it became awesome
I've spent insane amount of time while googling to find a solution with no luck.
But thanks to lenovo engineers it's not very hard to dig in acpi dsdt tables. So i made a fast solution you can find at https://github.com/okeri/ideapad-hacks
No need to override dsdt, just compile kernel module and access to FN-lock via sysfs. Once you change this setting, you can unload module. It works for my yoga 920 and it seems it should work for other Lenovo Yoga's starting from 700 (Lenovo Yoga 910 at least).
05-30-2018 10:13 AM
This is brilliant!
I will try it if i wipe Windows and replace it with Linux.
I wish Lenovo could make life easier for its customers by including the function to switch the behavior in the BIOS though...
06-30-2018 05:12 AM
Here's what I did to automate the process:
Create a script with this content (I know it contains a lot, but thats for my memory)
# This script will
# remove the ideapad_laptop kernel module
# add the ideapad-hack module
# correct the F-keys, so the F-keys after will work as expected
# This means that you'll have to use Fn+Fkey in order to dim light or other Fn functionality
# Get the ideapad-hack module sourceby issuing these commands:
# git clone https://github.com/okeri/ideapad-hacks.git
# cd ideapad-hacks/
# dnf install kernel-headers elfutils-libelf-devel
# Now the hack module is in place you can after boot execute
# due to incompability
# new module inserted
echo 0 > `find /sys -name "fn_lock"`
# and you functionkeys should work as expected again
# Happy Hacking
Next thing is to try this script after a fresh boot. If it works as expected then create a file in /etc/systemd/system
I called mine functionkeys.service and I put this into it:
Finaly enable the script
]$ systemctl enable functiokey.service
and start it
]$ systemctl start functionkeys.service
Reboot an test
07-02-2018 08:35 AM
Hello kolleK, nice job. Anyway i let myself to make some comments:
1. You should not place rmmod into systemd service files. Instead of that simply blacklist unwanted module. (man modprobe.d is highly recommanded). Same for inserting kernel modules at linux boot.
2. ideapad-hacks makes acpi call into laptop's embedded controller, so if you don't need to toggle fn-lock at runtime, you do not need to keep ideapad-hacks permanently loaded . It's enough to load it and set 0 to fn_lock only once. Internal embedded controller will keep this value, until it will not be changed in windows(if present). Battery unplug (probably Reset BIOS to defaults as well) also will reset this value.
07-02-2018 10:21 AM