A Linux kernel patch that fixes failed keyboard initialization on some Lenovo Yoga / XiaoXinPro / IdeaPad (14", Intel) laptops.
Important
The problem was resolved upstream for all laptops/portables in 936e4d4 (kernel version 6.7
and above). Please update your kernel if possible, or use this patch at your own risk.
This patch is tested only on the italicized machines. However, it would presumably work on other machines listed below or sharing the same problem. If you find it working on yours, you can request to mark it as so or add it into the list by creating an issue.
Reports and/or illustrations (dmesg logs) of the problem are included in the footnotes.
82D1
: Yoga Slim 9 14ITL51282D2
: IdeaPad Slim 9 14ITL5345682FX
: Yoga Slim 7 Pro 14ITL57882G2
: Yoga 14sITL 202191082GH
: Lenovo XiaoXinPro 14ITL 2021111282NC
: Yoga 14sIHU 20219 / Lenovo XiaoXinPro 14IHU 20211314 / Yoga Slim 7 Pro 14IHU51582NH
: Yoga 14sIHU 2021 O / Yoga Slim 7 Pro 14IHU5 O1682QT
: IdeaPad Slim 7 Pro 14IHU517181982TK
: Yoga Pro 14s IAH720 / Yoga Slim 7 ProX 14IAH7212223
pacman -S dkms linux-headers
git clone https://github.com/yescallop/atkbd-nogetid
dkms install atkbd-nogetid
mkinitcpio -P
Then, remove all extra kernel parameters for i8042
or atkbd
from the boot loader.
Reboot the laptop for the patch to take effect.
Note: If your machine isn't listed above, add an extra kernel parameter atkbd.nogetid
in the boot loader.
The source file atkbd.c
is currently at c4c7eac, which corresponds to kernel version 6.5
and 6.6
.
You may want to replace it with another version. It'll be automatically patched on installation.
A similar problem on HP Spectre x360 13-aw2xxxng had a workaround provided by Anton Zhilyaev (forum, patch). This workaround, however, turns out to work only once in a while on Yoga 14sIHU 2021.
By analyzing the logs (without patch, with Anton's patch), we can see that this i8042 implementation exhibits more erroneous behaviors in response to the GETID
command than the HP one did. Not only does it sometimes fail to raise interrupts for some response bytes, but it also returns invalid ID bytes (containing only one byte) almost always (which is why Anton's patch doesn't really work).
The patch included in this repo adds quirks in atkbd
that skips the GETID
command on the affected machines. This should work in the most cases since these machines are laptops.
Footnotes
-
https://wiki.archlinux.org/title/Lenovo_Yoga_Slim_9_(Intel)#Keyboard ↩
-
https://www.reddit.com/r/Fedora/comments/yjn1xd/lenovo_laptop_keyboard_keys_not_working_f36/ ↩
-
https://wiki.archlinux.org/title/Lenovo_Yoga_14s_2021#Keyboard_not_functioning_properly ↩ ↩2
-
https://bbs.archlinuxcn.org/viewtopic.php?pid=57412#p57412 ↩
-
https://askubuntu.com/questions/1352604/ubuntu-20-04-keyboard-not-working-on-lenovo-yoga-slim-7i-pro#comment2524117_1359483 ↩
-
https://discussion.fedoraproject.org/t/screen-and-keyboard-issues/76409 ↩
-
https://forums.fedoraforum.org/showthread.php?329036-Laptop-keyboard-is-not-working ↩
-
https://discussion.fedoraproject.org/t/issue-with-the-keyboard-not-working-on-touch-screen-laptop/71036 ↩