Bug 40870

Summary: Touch not working regardless of module loading.
Product: xorg Reporter: Josh Nijenhuis <josh>
Component: Input/elographicsAssignee: Peter Hutterer <peter.hutterer>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: major    
Priority: medium CC: marc, peter.hutterer
Version: 7.6 (2010.12)   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard: 2011BRB_Reviewed
i915 platform: i915 features:
Attachments:
Description Flags
Xorg configuration file
none
Xorg 1.10 Log File
none
Xorg 1.11 Log File
none
Kernel Config
none
xorg.conf Debug 99, Single Touch
none
xinput --list --long
none
other one had to outputs it none

Description Josh Nijenhuis 2011-09-14 04:37:47 UTC
Created attachment 51191 [details]
Xorg configuration file

See attachments for configuration setup, the xorg.conf is currently working with 1.7 so I know it works on that. I have tested it with 1.10 and 1.11, see both Xorg.0.log files in the attachments.

I have verified that the touchscreen is working, cat /dev/ttyS1 produces output when touchscreen is pressed.
Comment 1 Josh Nijenhuis 2011-09-14 04:38:19 UTC
Created attachment 51192 [details]
Xorg 1.10 Log File
Comment 2 Josh Nijenhuis 2011-09-14 04:38:45 UTC
Created attachment 51193 [details]
Xorg 1.11 Log File
Comment 3 Josh Nijenhuis 2011-09-14 04:48:11 UTC
Created attachment 51194 [details]
Kernel Config
Comment 4 Peter Hutterer 2011-09-14 07:41:43 UTC
The log looks fine as far as I can tell but it seems that the events are dropped. Now, the problem is I don't actually have a device to test so I'm not sure where the events are being dropped. 

Try setting option DebugLevel in the log to something high. That should give you more hints as to where the data is disappearing. If that's not enough, add some 
more DBG statements. Ideally on the the source from git (there are a few more commits after the last version)
Comment 5 Josh Nijenhuis 2011-09-14 09:58:47 UTC
Created attachment 51206 [details]
xorg.conf Debug 99, Single Touch
Comment 6 Josh Nijenhuis 2011-09-14 10:01:22 UTC
(In reply to comment #4)
> The log looks fine as far as I can tell but it seems that the events are
> dropped. Now, the problem is I don't actually have a device to test so I'm not
> sure where the events are being dropped. 
> 
> Try setting option DebugLevel in the log to something high. That should give
> you more hints as to where the data is disappearing. If that's not enough, add
> some 
> more DBG statements. Ideally on the the source from git (there are a few more
> commits after the last version)

Okay xorg.conf Debug set to 99 and touch is working, the latest attachment is a single touch output. Seems to be the driver is working, I have no clue how it passes this info off to the input system or where to go next.
Comment 7 Peter Hutterer 2011-09-14 10:10:49 UTC
weird. what's the output of xinput --list --long?
Comment 8 Josh Nijenhuis 2011-09-14 10:30:53 UTC
Created attachment 51207 [details]
xinput --list --long
Comment 9 Josh Nijenhuis 2011-09-14 10:32:59 UTC
Created attachment 51208 [details]
other one had to outputs it
Comment 10 Josh Nijenhuis 2011-09-19 13:12:48 UTC
Okay this is wierd, I have the server configured to go to sleep after 10 minutes and it does. But when I hit the touchscreen it wakes up, but no cursor movement or button presses going on in the actual GUI.
Comment 11 Peter Hutterer 2011-09-19 20:13:46 UTC
for some reason the device ends up as floating slave device. not sure why though, you can reattach it with xinput (see xinput man page) and test that it then moves the cursor. while it is floating, it won't move the cursor though.

Not sure why though. You've got the right options in the config file (don't need them though, they're default anyway). I suspect there's some bug in the driver/server that you're triggering that cause the device to be floated.

Way out of it is to gdb the driver startup and see if and where AttachDevice() in the server is called for this device and with which values.
Comment 12 Josh Nijenhuis 2011-09-20 06:41:55 UTC
Okay, I reattach it with "xinput reattach 'TOUCHSCREEN' 'Virtual core pointer' and it kinda works, it moves the cursor now but the min and max coordinates are way off all the cursor does is hug the right side and go up and down with touch movement up and down, no side to side, but I am sure that has to do with reattaching and losing the min and max values for x and y.

So you say gdb, well I have never used it put I guess I can give it a shot.

is it as easy as gdb startx? i doubt it.

Josh
Comment 13 Peter Hutterer 2011-09-20 15:59:16 UTC
Note quite, a little more difficult:
http://wiki.x.org/wiki/Development/Documentation/ServerDebugging

Cursor stuck on the left: try changing min/max X to not have the device as reverse, does that change anything?
Comment 14 Josh Nijenhuis 2011-09-22 05:15:04 UTC
Okay here is some more outputs from xinput

xinput --query-state 6
2 classes :
ButtonClass
        button[1]=up
ValuatorClass Mode=Absolute Proximity=In
        valuator[0]=1190
        valuator[1]=2798


xinput list-props 6
Device 'TOUCHSCREEN':
        Device Enabled (132):  1
        Coordinate Transformation Matrix (134): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        Device Accel Profile (250):   0
        Device Accel Constant Deceleration (251):    1.000000
        Device Accel Adaptive Deceleration (252):    1.000000
        Device Accel Velocity Scaling (253):    10.000000

xinput --get-feedbacks 6
1 feedback class
PtrFeedbackClass id=0
        accelNum is 2
        accelDenom is 1
        threshold is 4

Thats all I could get for now.
Comment 15 Josh Nijenhuis 2011-10-04 10:37:35 UTC
hey about getting to the 21st century, plug in the USB cable throw out the serial cable,

update xorg.conf and take out touch screen input definition and create this file /etc/X11/xorg.conf.d/99-calibration.conf
MatchProduct should be the output listed in xinput --list

Section "InputClass" 
    Identifier    "calibration" 
    MatchProduct    "Elo TouchSystems, Inc. Elo TouchSystems 2700 IntelliTouch(r) USB Touchmonitor Interface" 
    Option    "Calibration"    "4050 30 4050 30" 
EndSection

And what do you have? A working touchscreen!

in gentoo you don't even need to use the elographics use flag
Comment 16 Peter Hutterer 2012-08-16 01:09:37 UTC
http://patchwork.freedesktop.org/patch/11714/
Comment 17 Peter Hutterer 2012-08-20 01:13:15 UTC
commit 948e472fb1eaa7ed0d733f93d9616ec5b199cd93
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Aug 16 10:23:15 2012 +1000

    Don't force pInfo->flags to 0 (#40870)

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.