Summary: | USB HID touchscreen not working properly with evdev | ||
---|---|---|---|
Product: | xorg | Reporter: | Anisse Astier <anisse> |
Component: | Input/evdev | Assignee: | Peter Hutterer <peter.hutterer> |
Status: | RESOLVED FIXED | QA Contact: | Xorg Project Team <xorg-team> |
Severity: | major | ||
Priority: | medium | CC: | anisse |
Version: | unspecified | ||
Hardware: | x86 (IA32) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Description
Anisse Astier
2010-08-18 07:19:47 UTC
Created attachment 37949 [details] [review] Fix Touchscreen detection Another problem we have here is that touchscreen is not detected properly, since Evdev has no way to tell what type a device is. It's detected as a tablet. Fix device type detection so that this kind of device will be reported as a touchscreen in the future. Please note that this patch and the previous one are based on git HEAD, so they need commit 899218e18120918138f6d7420465763422d5b3b7 "Don't count BTN_TOUCH as tool. (#29428)" to work, if someone ever wanted to backport them to evdev-2.3 branch. Created attachment 37950 [details] [review] Rewriting of first patch based on more correct touchscreen detection If we have correct device type detection (previous attachment), we can rewrite the first patch (attachment 37948 [details] [review]: Don't treat Pen…) to be less intrusive and more generic to touchscreens. This patch depends on attachment 37949 [details] [review]: Fix Touchscreen detection Created attachment 37953 [details] [review] Another approach: narrow special treatment to tablets Another approach, if we have correct device type detection (attachment 37949 [details] [review]: Fix Touchscreen detection), is to narrow the special treatment of tool to tablets. I can't say which approach is the best. I don't have any tablet to test if it will cause a regression. Maybe I should add Adam Jackson in Cc; he added the special treatment for Wacom tablets in commit 6271494f. Review of attachment 37948 [details] [review]: this patch is too generic. all tablets I've seen so far that have BTN_TOOL_PEN also have BTN_TOOL_TOUCH so you essentially just disable the tool setting for those. just to let you know, the review isn't my only comment here. I'm still trying to figure out how to integrate this without breaking other devices. (In reply to comment #4) > Review of attachment 37948 [details] [review]: > > this patch is too generic. all tablets I've seen so far that have BTN_TOOL_PEN > also have BTN_TOOL_TOUCH so you essentially just disable the tool setting for > those. Well, then I guess this applies to attachment 37949 [details] [review] too, because it uses the same test to differentiate touchscreens from tablets (has TOOL_PEN and does not have TOOL_TOUCH). (In reply to comment #5) > just to let you know, the review isn't my only comment here. I'm still trying > to figure out how to integrate this without breaking other devices. Me too, and that's why I tried to provide three different patchsets : - attachment 37948 [details] [review] - attachment 37949 [details] [review] and attachment 37950 [details] [review] - attachment 37949 [details] [review] and attachment 37953 [details] [review] Unfortunately, at least for device type detection this won't be enough. I didn't find another way to rework the code flow when I looked at it; maybe we'll have to resort to quirk lists for "bad" devices that don't report proper HID information. http://cgit.freedesktop.org/~whot/xf86-input-evdev/log/?h=proximity I think something like this may make sense, though I'm still fighting with some unrelated bug when it comes to wacom handling. Another approach: add an Option to allow user to force device type. This is a touchscreen, so I'll have to create an InputClass file in /etc/X11/xorg.conf.d anyway to add touchscreen calibration value. One could create a new option to force device type for a matching device, e.g: Option "DeviceType" "touchscreen" These would match evdev flags and/or XInput types "touchscreen", "touchpad", "tablet", "keyboard", "mouse"… Ideally, this would be added at XInput level, but right now evdev level is enough since it's the only driver relying on type detection to have different behavior per device. should be fixed by the commit below, can you confirm this please? commit b48f4c41c0d3386bba3e9d8fa3da91f18aae190b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Oct 11 09:33:28 2010 +1000 Add proximity support. (In reply to comment #9) > should be fixed by the commit below, can you confirm this please? > > commit b48f4c41c0d3386bba3e9d8fa3da91f18aae190b > Author: Peter Hutterer <peter.hutterer@who-t.net> > Date: Mon Oct 11 09:33:28 2010 +1000 > > Add proximity support. I compiled git master today, and the problem is indeed fixed. Thank you. |
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.