Skip to content
This repository has been archived by the owner on Dec 25, 2023. It is now read-only.
/ atkbd-nogetid Public archive

Fixes failed keyboard initialization on some Lenovo Yoga / XiaoXinPro / IdeaPad (14", Intel) laptops.

License

Notifications You must be signed in to change notification settings

yescallop/atkbd-nogetid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

atkbd-nogetid

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.

Presumably supported machines

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 14ITL512
  • 82D2: IdeaPad Slim 9 14ITL53456
  • 82FX: Yoga Slim 7 Pro 14ITL578
  • 82G2: Yoga 14sITL 2021910
  • 82GH: Lenovo XiaoXinPro 14ITL 20211112
  • 82NC: Yoga 14sIHU 20219 / Lenovo XiaoXinPro 14IHU 20211314 / Yoga Slim 7 Pro 14IHU515
  • 82NH: Yoga 14sIHU 2021 O / Yoga Slim 7 Pro 14IHU5 O16
  • 82QT: IdeaPad Slim 7 Pro 14IHU5171819
  • 82TK: Yoga Pro 14s IAH720 / Yoga Slim 7 ProX 14IAH7212223

Installation on Arch Linux

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.

Problem details

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

  1. https://wiki.archlinux.org/title/Lenovo_Yoga_Slim_9_(Intel)#Keyboard

  2. https://linux-hardware.org/?probe=be0654391c&log=dmesg

  3. https://www.reddit.com/r/Fedora/comments/yjn1xd/lenovo_laptop_keyboard_keys_not_working_f36/

  4. https://linux-hardware.org/?probe=92f4dfc282&log=dmesg

  5. https://linux-hardware.org/?probe=90e142cbe1&log=dmesg

  6. https://linux-hardware.org/?probe=a8d6ad51af&log=dmesg

  7. https://bbs.archlinux.org/viewtopic.php?id=273790

  8. http://linux-hardware.org/?probe=1b8f927465&log=dmesg

  9. https://wiki.archlinux.org/title/Lenovo_Yoga_14s_2021#Keyboard_not_functioning_properly 2

  10. https://bbs.archlinuxcn.org/viewtopic.php?pid=57412#p57412

  11. https://forum.suse.org.cn/t/topic/14779

  12. http://linux-hardware.org/?probe=bb63ba3801&log=dmesg

  13. https://zhuanlan.zhihu.com/p/428327818

  14. http://linux-hardware.org/?probe=bb63ba3801&log=dmesg

  15. https://askubuntu.com/questions/1352604/ubuntu-20-04-keyboard-not-working-on-lenovo-yoga-slim-7i-pro#comment2524117_1359483

  16. https://ubuntuforums.org/showthread.php?t=2481173

  17. https://discussion.fedoraproject.org/t/screen-and-keyboard-issues/76409

  18. https://linux-hardware.org/?probe=a6af7624cd&log=dmesg

  19. https://linux-hardware.org/?probe=572cb48d3c&log=dmesg

  20. https://zhuanlan.zhihu.com/p/583792789

  21. https://forums.fedoraforum.org/showthread.php?329036-Laptop-keyboard-is-not-working

  22. https://discussion.fedoraproject.org/t/issue-with-the-keyboard-not-working-on-touch-screen-laptop/71036

  23. https://bugzilla.kernel.org/show_bug.cgi?id=216994

About

Fixes failed keyboard initialization on some Lenovo Yoga / XiaoXinPro / IdeaPad (14", Intel) laptops.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published