[Bug 285745] First keypress is ignored on Lenovo laptop

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 29 Mar 2025 15:15:26 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285745

            Bug ID: 285745
           Summary: First keypress is ignored on Lenovo laptop
           Product: Base System
           Version: 14.2-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: tembun@bk.ru

Created attachment 259149
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=259149&action=edit
The interaction between driver and keyboard

On Lenovo ThinkPad Edge 11 there is a small problem with integrated keyboard:
the very first keypress is ignored - it doesn't take effect, like no keypress
was done.  But after this first not-registered keypress keyboard starts working
fine: all keypresses are registered.  There are no issues with external USB
keyboard.

The issue was first discovered in 13.4-RELEASE with GENERIC kernel.  I also
tested with 14.2-RELEASE install image and the problem can be observed there
too.

It turned out, that there is a quirk for atkbdc(4) driver that solves the
problem: `LENOVO_SPECIAL', that has a value of 0x12.  Though one should
manually change the source code to set this quirk and then recompile the
kernel, currently there is no autodetection.

One fellow helped me and wrote a set of patches for the kernel for it to log
the interaction between driver and the keyboard.  With this, I booted, pressed
"qwerty12345" sequence (with letter "q" not printed on the screen) and then
dumped the output via ktrdump(8).  The result of it is attached as
ktrdump.log.xz file.

Here the values of some kenv(1) variables:
    smbios.bios.vendor -> LENOVO
    smbios.system.maker -> LENOVO
    smbios.system.product -> 0328RT1
    smbios.bios.version -> 86ET33WW (1.17 )

I guess, these can help to do a proper autodetection and applying the quirk.

Thank you,
Artem

-- 
You are receiving this mail because:
You are the assignee for the bug.