Coder Social home page Coder Social logo

atkbd-nogetid's Introduction

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

atkbd-nogetid's People

Contributors

yescallop avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

wulanalashi

atkbd-nogetid's Issues

Add DMI quirks or a kernel parameter in `atkbd`?

If we're ever going to submit this patch upstream, we'll have to choose whether to add DMI quirks, add a kernel parameter, or maybe add both in atkbd. I'm not at all familiar with kernel development, so I'm leaving this as an open question for now.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.