Bug 19819 - USB touchscreen is disabled when switching virtual console back to X
Summary: USB touchscreen is disabled when switching virtual console back to X
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Input/evdev (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium normal
Assignee: Peter Hutterer
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2009-01-29 14:43 UTC by Julien Plissonneau Duquene
Modified: 2009-02-02 13:43 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
patch evdev.c (798 bytes, patch)
2009-01-29 14:43 UTC, Julien Plissonneau Duquene
no flags Details | Splinter Review
patch evdev.c (git diff) (463 bytes, patch)
2009-01-30 07:45 UTC, Julien Plissonneau Duquene
no flags Details | Splinter Review
patch evdev.c (git format-patch) (1.09 KB, patch)
2009-02-02 05:56 UTC, Julien Plissonneau Duquene
no flags Details | Splinter Review
patch evdev.c (git format-patch again) (1.16 KB, patch)
2009-02-02 08:01 UTC, Julien Plissonneau Duquene
no flags Details | Splinter Review

Description Julien Plissonneau Duquene 2009-01-29 14:43:47 UTC
Created attachment 22372 [details] [review]
patch evdev.c

Problem located in evdev.c / EvdevCacheCompare()

Symptom: USB touchscreen no longer works when switching from X to another virtual console and then back to X. Sample log message:
(EE) Elo TouchSystems, Inc. Elo TouchSystems 2700 IntelliTouch(r) USB Touchmonitor Interface: Device has changed - disabling.
(WW) Elo TouchSystems, Inc. Elo TouchSystems 2700 IntelliTouch(r) USB Touchmonitor Interface: Release failed (Invalid argument)

Cause: EvdevCacheCompare fails because it also compares all values of input_absinfo structure, which include the last tapped position of the touchscreen (.value field). This is never updated in the cache, and anyway it could change anytime if the screen is touched while away from the X virtual console.

Solution: Exclude .value from comparison. One-liner patch attached.
Comment 1 Peter Hutterer 2009-01-29 17:21:46 UTC
ACK, please add a comment describing why this line is needed (in the source code) and resubmit as git-formatted patch.
Comment 2 Julien Plissonneau Duquene 2009-01-30 07:45:26 UTC
Created attachment 22380 [details] [review]
patch evdev.c (git diff)

New patch attached as requested.
Comment 3 Peter Hutterer 2009-01-30 19:19:18 UTC
Sorry, I wasn't clear enough. I'd like to see a patch produced with
git format-patch. This way the authorship and commit message is already there.

In the commit message, please include a reference to this bug and as much
information as you deem necessary to understand the reason for the change
(e.g. the content of your original comment).

ACK to the patch itself.
Comment 4 Julien Plissonneau Duquene 2009-02-02 05:56:07 UTC
Created attachment 22466 [details] [review]
patch evdev.c (git format-patch)
Comment 5 Julien Cristau 2009-02-02 07:34:38 UTC
> --- Comment #4 from Julien Plissonneau Duquene <julien.plissonneau.duquene@savoirfairelinux.com>  2009-02-02 05:56:07 PST ---
> Created an attachment (id=22466)
>  --> (http://bugs.freedesktop.org/attachment.cgi?id=22466)
> patch evdev.c (git format-patch)
> 
getting there :)
The first line in the commit message should be a short description of
the change (something like "EvdevCacheCompare: ignore current position",
I guess) which is more meaningful than a simple bug number.  The
reference to this bug can go at the end of the message.
Thanks!
Comment 6 Julien Plissonneau Duquene 2009-02-02 08:01:50 UTC
Created attachment 22478 [details] [review]
patch evdev.c (git format-patch again)

It would probably help to be a wee bit more specific about the expected patch format in http://www.x.org/wiki/DeveloperStart ...
Comment 7 Julien Cristau 2009-02-02 09:21:33 UTC
> --- Comment #6 from Julien Plissonneau Duquene <julien.plissonneau.duquene@savoirfairelinux.com>  2009-02-02 08:01:50 PST ---
> Created an attachment (id=22478)
>  --> (http://bugs.freedesktop.org/attachment.cgi?id=22478)
> patch evdev.c (git format-patch again)
> 
Signed-off-by: Julien Cristau <jcristau@debian.org>

I'll let Peter push this if he's happy with it too :)

> It would probably help to be a wee bit more specific about the expected patch
> format in http://www.x.org/wiki/DeveloperStart ...
> 
agreed.  thanks for your perseverance :)
Comment 8 Peter Hutterer 2009-02-02 13:43:02 UTC
Pushed as 0dbb88c52b057cfdff6116060060841e4fc4abb5. Thanks for the patch (and
the patience).


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.