Bug 101099

Summary: Make sure LID_SWITCH_RELIABILITY=write_open is useful
Product: Wayland Reporter: Benjamin Tissoires <benjamin.tissoires>
Component: libinputAssignee: Peter Hutterer <peter.hutterer>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: peter.hutterer
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Benjamin Tissoires 2017-05-19 12:20:54 UTC
See the 3 top commits of https://github.com/bentiss/libinput
We were not able to trigger the required conditions to have the switch overwritten by libinput.

I haven't finished writing the tests, but:
- an assert is raised with the current code when
  * a keyboard gets paired with the lid switch
  * the lid switch node report closed while it is physically opened
  * a key gets pressed on the paired keyboard, which opens the lid switch
  * the keyboard gets unplugged (on the Surface 3, closing the cover removes the attached USB devices)

- we can't start observing keyboard events is the state is reported as opened by evdev-lid.c

- we need to start listening to the events when pairing the keyboard if the reported state is "closed"
Comment 1 Peter Hutterer 2017-06-02 03:11:19 UTC
Fixed with commit 28fcd2c6d41e972f606c60f56c6f0a94d73455ae
Comment 2 Peter Hutterer 2017-06-02 03:12:37 UTC
Oh, and commit 8fbdef3aadfaa09dfaec50b0f67ec43ad0b55e96

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.