Bug 101101

Summary: Mark the internal keyboard as such and use it for Lid Switch reliability (Surface 3 infamous issues)
Product: Wayland Reporter: Benjamin Tissoires <benjamin.tissoires>
Component: libinputAssignee: Peter Hutterer <peter.hutterer>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: bugzilla, peter.hutterer
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Benjamin Tissoires 2017-05-19 12:30:37 UTC
On 2-in-1 laptops/tablets (laplets?), the cover/dock contains the internal keyboard. That is nice except the current heuristic for libinput is to match on the bus (because if you are running an external PS/2 keyboard, you are probably not using libinput).

Anyway, given that evdev-lid.c pairs the Lid Switch to the first non PS/2 keyboard, there is a chance an other keyboard gets paired.

How about a UDEV property LIBINPUT_IS_INTERNAL_DEVICE that we will add to the hwdb? Given that we already have to maintain the list of non-reliable Lid Switch, we can also register which keyboard should be paired.
Comment 1 Peter Hutterer 2017-05-22 04:46:47 UTC
Right, we can add LIBINPUT_ATTR_KEYBOARD_INTEGRATION, similar to the touchpad property we already have. Current values are 'internal' and 'external' but there may be a need for 'detachable' or something. Plus, it may be required to tag the Lid device itself with "wants the detachable keyboard" or something.
Comment 2 Peter Hutterer 2017-06-02 03:12:56 UTC
commit 1cfa1f64cfd610d97643be32e92c67c0ecee23c8
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon May 22 13:34:10 2017 +1000

    evdev: read LIBINPUT_ATTR_KEYBOARD_INTEGRATION property
Comment 3 Peter Hutterer 2017-11-06 05:33:10 UTC
*** Bug 103585 has been marked as a duplicate of this bug. ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.