Summary: | Also detect when the Lid Switch is wrong if there are no cover attached (Surface 3 infamous issues) | ||
---|---|---|---|
Product: | Wayland | Reporter: | Benjamin Tissoires <benjamin.tissoires> |
Component: | libinput | Assignee: | Peter Hutterer <peter.hutterer> |
Status: | RESOLVED WONTFIX | 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:25:39 UTC
hmm, the only way to do this 'reliably' would be to have a timer on init that calls back at some point in the future and checks if we have seen the keyboard yet. We can't rely on the device order or any sort of timing during startup but the timer doesn't fill me with confidence either. Is this a real problem? What is fixable is to force the state open whenever the paired keyboard is removed. I just realize we have a conflict here: - on boot, the LID switch state might be wrong if there are no cover attached (reported as closed) - when closing the LID, the keyboard gets detached, meaning if we send the open event, we might wake up the tablet hmm, we can't really detect 'boot' versus 'suspend', or at least not reliably enough. There is a libinput_resume() and libinput_suspend() but they're not really guarantees because we may create a new context instead. And e.g. the xorg driver doesn't use those at all. Well, right, we might not be able to detect this situation reliably. One thing to take into account is that the cover gets detached at the USB level when it's closed. In the same fashion, there is a signal within the kernel that notifies the touchscreen that the cover is closed. So that means that if we ever receive any event from any internal device (touchscreen, touchchpad or keyboard), then the lid is opened. I don't think we can get around this particular issue reliably, so let's close it and try to enhance the heuristic. (Note that the Surface 3 has a kernel module with a reliable LID switch, surface3-wmi, but this bug was to fix all the line of similar laptops that tend to have broken LID switch). We could add detection of touches, but I'm not 100% that works reliably either. We likely get ghost touches when the lid is closed (I guess). Either way, closing this for now, it's quite niche, can't be done reliably and there's a kernel module for at least the S3 already. That's good enough for me to move this bug off my todo list :) (In reply to Peter Hutterer from comment #5) > We could add detection of touches, but I'm not 100% that works reliably > either. We likely get ghost touches when the lid is closed (I guess). Actually, the idea was to prevent the kernel from emitting touches when the LID is closed (given it knows reliably this information in this particular state). Still, RESOLVED works for me :) oops, I accidentally pushed the commit as d35d122eb1 and the revert for it as 0c428d6b7. At least we have the source if we need it in the future |
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.