Bug 101099 - Make sure LID_SWITCH_RELIABILITY=write_open is useful
Summary: Make sure LID_SWITCH_RELIABILITY=write_open is useful
Status: RESOLVED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: libinput (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Peter Hutterer
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-19 12:20 UTC by Benjamin Tissoires
Modified: 2017-06-02 03:12 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

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.