Subject: Debugging touch input problem

From: Neal Peacock <[email-masked]>
Date: Thu, 26 Sep 2013 01:52:47 -0400

I'm running down a touch screen input problem and I'm trying to figure 
out the right place to look.  I am porting ubuntu touch and the using 
mir.  My last issue is the touch screen input.  I was getting some very 
erratic results and I'm trying to figure out where it breaks.  The 
screen will react a little to touches but not accurately and most of the 
gestures do not work, the few that will are sporadic.  I have dumped out 
the touch results from the kernel and all the x,y and id values looks 
correct as far as I can tell. This driver works under LXDE and Android.  
lsof  seems to show unity is the only process watching these events and 
it looks like the mir library might be what actually handles input.

Is the mir server what handles touch input?

I've been checking through the source and I see a references to the 
Android touch input code.  I tried to enable the input report log but I 
don't seem to see any output with the upstart logs or in logcat.  Where 
does that report go?

Does the Android container need to have some touch input service running 
for it to work?  I can't see a service an obvious name.

Any help or thoughts appreciated, thank you.

-- 
Neal Peacock
PengPod

---

From: Daniel d'Andrada <[email-masked]>
Date: Thu, 26 Sep 2013 10:32:25 -0300

On 26/09/13 02:52, Neal Peacock wrote:
> mir.  My last issue is the touch screen input.  I was getting some 
> very erratic results and I'm trying to figure out where it breaks.  
> The screen will react a little to touches but not accurately and most 
> of the gestures do not work, the few that will are sporadic.  I have 
> dumped out the touch results from the kernel and all the x,y and id 
> values looks correct as far as I can tell. This driver works under 
> LXDE and Android.  lsof  seems to show unity is the only process 
> watching these events and it looks like the mir library might be what 
> actually handles input.
>

Yes, it has android-input inside it.

> Android touch input code.  I tried to enable the input report log but 
> I don't seem to see any output with the upstart logs or in logcat.  
> Where does that report go?
>
> Does the Android container need to have some touch input service 
> running for it to work?  I can't see a service an obvious name.
>

So, if I understood you correctly you're trying it out on a new device? 
If that's the case it might be that you didn't provide a .idc file for 
your touchscreen (I guess idc stands for "input device configuration"). 
Take a look at InputDevice.cpp and its log messages.

Running mir_demo_standalone_inputfilter as root is the best way to 
diagnose input issues. If you're using the latest mir (from bzr repo), 
to get log messages from android-input you will also have to set a 
ANDROID_LOG_TAGS environment variable appropriately. Set it to "*:v" to 
get the most verbose log.

---

From: Daniel d'Andrada <[email-masked]>
Date: Thu, 26 Sep 2013 10:45:48 -0300

On 26/09/13 10:32, Daniel d'Andrada wrote:
> ANDROID_LOG_TAGS environment variable appropriately. Set it to "*:v" 
> to get the most verbose log. 

Forgot to say that in its current state mir_demo_standalone_inputfilter 
does not print any log messages from android-input. To make it more 
useful you will have to change it like that http://paste.ubuntu.com/6158757/

---

From: Neal Peacock <[email-masked]>
Date: Thu, 26 Sep 2013 13:29:22 -0400

On 09/26/2013 09:32 AM, Daniel d'Andrada wrote:
>> I'm running down a touch screen input problem and I'm trying to 
>> figure out the right place to look.  I am porting ubuntu touch and 
>> the using mir.  My last issue is the touch screen input.  I was 
>> getting some very erratic results and I'm trying to figure out where 
>> it breaks.  The screen will react a little to touches but not 
>> accurately and most of the gestures do not work, the few that will 
>> are sporadic.  I have dumped out the touch results from the kernel 
>> and all the x,y and id values looks correct as far as I can tell. 
>> This driver works under LXDE and Android.  lsof  seems to show unity 
>> is the only process watching these events and it looks like the mir 
>> library might be what actually handles input.
>>
> So, if I understood you correctly you're trying it out on a new 
> device? If that's the case it might be that you didn't provide a .idc 
> file for your touchscreen (I guess idc stands for "input device 
> configuration"). Take a look at InputDevice.cpp and its log messages.
This was exactly the problem.  Thank you, I had spent a day and a half 
at this and you gave me a 2 minute fix.  I wasn't anywhere near figuring 
that out.

I started by making a port for an eval board with a serial debug port, 
the same processor but no touch screen.  Once I had resolved all the 
boot up issues I moved this to a new port for the actual tablet. The 
touch screen config never got brought back from the original android 
build but as soon as you mentioned it, there it was.

Touch is working perfectly now.

-- 
Neal Peacock
PengPod