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"
Fixed with commit 28fcd2c6d41e972f606c60f56c6f0a94d73455ae
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.