utouch: make htcleo (HTC HD2) touchscreen work

Bug #627629 reported by Most People Use Their Full Name here
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Open Input Framework
Fix Released
Wishlist
Henrik Rydberg
smartphone
In Progress
Medium
Most People Use Their Full Name here

Bug Description

I am running ubuntu maverick on the htcleo machine (HTC HD2).
It has a 4,3" capacitive touchscreen on a wvga display. It is designed for gestures etc.

Currently I am using this exact driver: http://git.linuxtogo.org/?p=groups/mobile-linux/kernel.git;a=blob_plain;f=arch/arm/mach-msm/board-htcleo-ts.c;h=02656bfec750eb1f8be9a3b4c092a554bba27daa;hb=refs/heads/htc-msm-2.6.32
I installed the utouch meta package to see if it works ootb.
One of the test programs wouldn't show any gestures, the other one claimed /dev/input/event0 (ts device node) would not be a valid device.

Unfortunately I don't have a good understanding of how this whole TS stuff works. I know we have a kernel config switch to enable or disable multitouch.
In karmic I had to install tslib to get TS working in xorg. It would then work with either config (mutlitouch on or off in the driver).

Now in maverick somehow the TS works out of the box (evtouch ??) - without installing xf86-input-tslib and putting any xorg.conf. In that situation (unmodified drivers and no xorg.conf) it will only work with the multitouch config disabled. With multitouch enabled there will be a strange curosr offset and it's impossible to click.

This driver works perfeclts with the according touchscreen API found in Google Android 2.2 . I am looking for the source code and will reference it here hoping it might help to get a better understanding fo the driver.

Regards

Revision history for this message
Most People Use Their Full Name here (fullname1) wrote :

For interested people that is the driver IC :
http://img694.imageshack.us/img694/4182/dscf4362y.jpg

I am wondering what dependencies utouch makes on the driver level.

Revision history for this message
Chase Douglas (chasedouglas) wrote : Re: [Bug 627629] Re: utouch: make htcleo (HTC HD2) touchscreen work

Hi Lukas-David,

We can only support multitouch gestures in Ubuntu on platforms that are
running the complete Ubuntu distribution from the kernel to X to the
window manager.

The HTC HD2 has not been ported to run Ubuntu natively. I'm not aware of
any phone that has been, although I've seen attempts to run the Ubuntu
userspace on top of an Android base.

Until such a day comes, we don't have any way to fulfill this request.

Thanks

Changed in utouch:
status: New → Won't Fix
status: Won't Fix → New
Revision history for this message
Chase Douglas (chasedouglas) wrote :

Actually, I only saw the first comment, not the original bug report. I didn't realize someone had gotten as far as you have on getting Ubuntu to run on an HTC HD2. Please disregard my comment :).

Revision history for this message
Most People Use Their Full Name here (fullname1) wrote : AW: [Bug 627629] Re: utouch: make htcleo (HTC HD2) touchscreen work

Don't worry it's the real deal. I use the maverick netbook daily rootfs preinstalled rootfilesystems.
I only apply minor workarounds required because I am not using the jasper initrd. Else it as a complete stuck ubuntu. No chroot hacks or whatever.
Btw the device is not shipped with google android but with WinCE so we had to port Linux on our own.
Still our kernel has some 'androidisms'. But I don't think this will be a problem for utouch. As mentioned evdev and tslib can be used w/o patching.

Sorry I should have clarified that earlier ;)

----- Ursprüngliche Nachricht -----
Von: Chase Douglas <email address hidden>
Gesendet: Dienstag, 31. August 2010 23:07
An: <email address hidden>
Betreff: [Bug 627629] Re: utouch: make htcleo (HTC HD2) touchscreen work

Actually, I only saw the first comment, not the original bug report. I
didn't realize someone had gotten as far as you have on getting Ubuntu
to run on an HTC HD2. Please disregard my comment :).

--
utouch: make htcleo (HTC HD2) touchscreen work
https://bugs.launchpad.net/bugs/627629
You received this bug notification because you are a direct subscriber
of the bug.

Status in uTouch: New

Bug description:
I am running ubuntu maverick on the htcleo machine (HTC HD2).
It has a 4,3" capacitive touchscreen on a wvga display. It is designed for gestures etc.

Currently I am using this exact driver: http://git.linuxtogo.org/?p=groups/mobile-linux/kernel.git;a=blob_plain;f=arch/arm/mach-msm/board-htcleo-ts.c;h=02656bfec750eb1f8be9a3b4c092a554bba27daa;hb=refs/heads/htc-msm-2.6.32
I installed the utouch meta package to see if it works ootb.
One of the test programs wouldn't show any gestures, the other one claimed /dev/input/event0 (ts device node) would not be a valid device.

Unfortunately I don't have a good understanding of how this whole TS stuff works. I know we have a kernel config switch to enable or disable multitouch.
In karmic I had to install tslib to get TS working in xorg. It would then work with either config (mutlitouch on or off in the driver).

Now in maverick somehow the TS works out of the box (evtouch ??) - without installing xf86-input-tslib and putting any xorg.conf. In that situation (unmodified drivers and no xorg.conf) it will only work with the multitouch config disabled. With multitouch enabled there will be a strange curosr offset and it's impossible to click.

This driver works perfeclts with the according touchscreen API found in Google Android 2.2 . I am looking for the source code and will reference it here hoping it might help to get a better understanding fo the driver.

Regards

To unsubscribe from this bug, go to:
https://bugs.launchpad.net/utouch/+bug/627629/+subscribe

Revision history for this message
Duncan McGreggor (oubiwann) wrote :

Thanks for the follow-up comment, Chase :-)

Lukas-David, this is fantastic stuff. I was very excited to see this bug report and hope there's something that we can help with. Maybe we can get one of the team members a HTC HD2...

Good grief man -- just read your latest comment that came in while I was typing. You guys are doing AMAZING stuff!!

Please, please feel free to join the multi-touch-dev team :-) You can find it here:
  http://launchpad.net/~multi-touch-dev

Then you can send stuff to <email address hidden> -- and it would be wonderful if you sent a message to the list letting folks there know what you're working on!

If you update your lp email prefs, you can receive emails from the list:
  https://launchpad.net/people/+me/+editemails

Things have picked up on the list lately, so we're probably solidly a medium-volume list now.

Thanks again for this bug report, Lukas-David :-)

Revision history for this message
Henrik Rydberg (rydberg) wrote :

Seconded, this is really cool stuff. :-) Thanks for the driver, I see it does two-finger MT type A protocol. If you suspect problems with driver or low-level stuff, please send more information. Showing /proc/bus/input/devices, running evtest, mtdev-test, grail-touch, etc are all useful when debugging.

Revision history for this message
Most People Use Their Full Name here (fullname1) wrote :

Awesome!

I'm excited about your interest. To be honest, I would have expected the bug to gain dust quickly because I assumed you guys are busy enough with present machines :)
I will provide in depth information about the htcleo touchscreen device ASAP. I can obtain that data no problem. Any further reading suggestions on utouch debugging ?

Regards,

Luke

Revision history for this message
Most People Use Their Full Name here (fullname1) wrote :

Hi. Just a quick update: Unfortunately I don't have debug data yet but I hope I can put this before I go on a short vacation from Monday.

Meanwhile I have the following video. You can see how well the TS works with the stock configuration. I did not modify anything. No calibration, no xorg.conf , no driver patches. It is the exact driver as seen above.
http://git.linuxtogo.org/?p=groups/mobile-linux/kernel.git;a=blob_plain;f=arch/arm/mach-msm/board-htcleo-ts.c;h=02656bfec750eb1f8be9a3b4c092a554bba27daa;hb=refs/heads/htc-msm-2.6.32
Be aware that I set
# CONFIG_HTCLEO_ENABLE_MULTI_TOUCH is not set
I.e. only the single pointer matrix is passed.
As mentioned above, with that config enabled, the pointer behavior is weird in X ( no click event, and position distortion)

http://vimeo.com/14630263

Regards

Revision history for this message
Most People Use Their Full Name here (fullname1) wrote :
Download full text (19.8 KiB)

'evtest /dev/input/event0' with
# CONFIG_HTCLEO_ENABLE_MULTI_TOUCH is not set

Input driver version is 1.0.0
Input device ID: bus 0x0 vendor 0x0 product 0x0 version 0x0
Input device name: "leo-touchscreen"
Supported events:
  Event type 0 (Sync)
  Event type 1 (Key)
    Event code 330 (Touch)
  Event type 3 (Absolute)
    Event code 0 (X)
      Value 0
      Min 6
      Max 576
      Fuzz 5
    Event code 1 (Y)
      Value 0
      Min 6
      Max 952
      Fuzz 5
    Event code 24 (Pressure)
      Value 0
      Min 0
      Max 255
    Event code 28 (Tool Width)
      Value 0
      Min 0
      Max 5
Testing ... (interrupt to exit)
Event: time 278.978131, type 3 (Absolute), code 0 (X), value 118
Event: time 278.978210, type 3 (Absolute), code 1 (Y), value 139
Event: time 278.978225, type 3 (Absolute), code 24 (Pressure), value 100
Event: time 278.978239, type 3 (Absolute), code 28 (Tool Width), value 1
Event: time 278.978251, type 1 (Key), code 330 (Touch), value 1
Event: time 278.978265, -------------- Report Sync ------------
Event: time 279.046702, type 3 (Absolute), code 0 (X), value 0
Event: time 279.046775, type 3 (Absolute), code 1 (Y), value 0
Event: time 279.046787, type 3 (Absolute), code 24 (Pressure), value 0
Event: time 279.046799, type 3 (Absolute), code 28 (Tool Width), value 0
Event: time 279.046810, type 1 (Key), code 330 (Touch), value 0
Event: time 279.046821, -------------- Report Sync ------------
Event: time 280.622426, type 3 (Absolute), code 0 (X), value 472
Event: time 280.622504, type 3 (Absolute), code 1 (Y), value 152
Event: time 280.622519, type 3 (Absolute), code 24 (Pressure), value 100
Event: time 280.622533, type 3 (Absolute), code 28 (Tool Width), value 1
Event: time 280.622545, type 1 (Key), code 330 (Touch), value 1
Event: time 280.622559, -------------- Report Sync ------------
Event: time 280.756669, type 3 (Absolute), code 0 (X), value 0
Event: time 280.759181, type 3 (Absolute), code 1 (Y), value 0
Event: time 280.760185, type 3 (Absolute), code 24 (Pressure), value 0
Event: time 280.760842, type 3 (Absolute), code 28 (Tool Width), value 0
Event: time 280.761442, type 1 (Key), code 330 (Touch), value 0
Event: time 280.761473, -------------- Report Sync ------------
Event: time 283.466041, type 3 (Absolute), code 0 (X), value 117
Event: time 283.466120, type 3 (Absolute), code 1 (Y), value 843
Event: time 283.466135, type 3 (Absolute), code 24 (Pressure), value 100
Event: time 283.466149, type 3 (Absolute), code 28 (Tool Width), value 1
Event: time 283.466161, type 1 (Key), code 330 (Touch), value 1
Event: time 283.466175, -------------- Report Sync ------------
Event: time 283.636081, type 3 (Absolute), code 0 (X), value 116
Event: time 283.636158, type 3 (Absolute), code 1 (Y), value 842
Event: time 283.636181, -------------- Report Sync ------------
Event: time 283.647956, type 3 (Absolute), code 0 (X), value 0
Event: time 283.648058, type 3 (Absolute), code 1 (Y), value 0
Event: time 283.648071, type 3 (Absolute), code 24 (Pressure), value 0
Event: time 283.648082, type 3 (Absolute), code 28 (Tool Width), value 0
Event: ...

Revision history for this message
Most People Use Their Full Name here (fullname1) wrote :

Sorry for the pasted output pasted. I will use the attachment function from now on.

root@ubuntu-laptop:~# zcat /proc/config.gz | grep MULTI_TOUCH
CONFIG_HTCLEO_ENABLE_MULTI_TOUCH=y
root@ubuntu-laptop:~# evtest /dev/input/event0 > evtest-01.txt

Revision history for this message
Most People Use Their Full Name here (fullname1) wrote :

# zcat /proc/config.gz | grep MULTI_TOUCH
CONFIG_HTCLEO_ENABLE_MULTI_TOUCH=y
# cat /proc/bus/input/devices > leo-input-procfs.txt

attached:
leo-input-procfs.txt

If you are wondering about the usb input devices:
This device has support for ehci_hcd . I use desktop like setup for debugging. I am pulling all the debug information that way.

Revision history for this message
Most People Use Their Full Name here (fullname1) wrote :

root@ubuntu-laptop:~# zcat /proc/config.gz | grep MULTI_TOUCH
CONFIG_HTCLEO_ENABLE_MULTI_TOUCH=y
root@ubuntu-laptop:~# mtdev-test /dev/input/event0 &>leo-mtdev-test00.txt

I performed the following operation:

*Tap
top left
top right
bottom left
bottom right
corners.

*slide from the bottom left to the top right corner.

leo-mtdev-test00.txt attached

Revision history for this message
Most People Use Their Full Name here (fullname1) wrote :

Exact same procedure as above with

grail-touch /dev/input/event0

output attached

Revision history for this message
Most People Use Their Full Name here (fullname1) wrote :

Ok that's it.
Everything Henrik recommended. How to proceed? :)

Revision history for this message
Duncan McGreggor (oubiwann) wrote :

Thanks, Lukas. Henrik is in the middle of the beta-freeze work, so after a couple days, I'm guessing he might be able to get to this. Thanks for all the data!

Changed in utouch:
assignee: nobody → Henrik Rydberg (rydberg)
importance: Undecided → Wishlist
Revision history for this message
Most People Use Their Full Name here (fullname1) wrote : Re: [Bug 627629] Re: utouch: make htcleo (HTC HD2) touchscreen work

Hello,

On 9/10/10, Duncan McGreggor <email address hidden> wrote:
> Thanks, Lukas. Henrik is in the middle of the beta-freeze work, so after
> a couple days, I'm guessing he might be able to get to this. Thanks for
> all the data!
>

I'm back from my vacation so I will have enough time to run further
tests in case anything is needed. Just let me know.
I am also subscribed to the utouch mailing list. Maybe it will be best
to move further discussion there and refer to the bug for debug data
etc.

Best regards

Revision history for this message
Most People Use Their Full Name here (fullname1) wrote :

On proposal of Henrik I compiled and ran mtview. With the multitouch option enabled device's touchscreen driver it works:
I can paint with two fingers simultaneously. A screenshot with stuff I scribbled with pointing and middle finger simultaneously is attached.

Now I see two problems:
1) I am wondering if this is precise enough for gesture abstraction to process correctly.
How to proceed testing this?

2) With the mt option in the driver enabled my pointer rotation script for Xorg does not work:

/etc/X11/Xsession.d/53rotate-touchscreen:
"xinput set-prop leo-touchscreen "Evdev Axis Calibration" 972 4 569 15
xinput set-prop leo-touchscreen "Evdev Axis Inversion" 1, 0
xinput set-prop leo-touchscreen "Evdev Axes Swap" 1"

leo-touchscreen device ID remained the same so that can't be the problem.
This is for use with landscape rotated X display. Without the display rotation touchscreen / mt work well !

Regards

Revision history for this message
Most People Use Their Full Name here (fullname1) wrote :

further testing:
I compiled ginn 0.2.0 to test the HTC HD2 touchscreen hardware and driver for the capability of producing gestures that are suitable to be parsed and processed.

evince: scrolling up and down and pinch to zoom work perfectly well.
inkscape: very good scrolling navigation with gestures
fennec: no two finger scrolling or pinching to zoom. some gestures will emit a 3 line or so scroll. seems random.

Revision history for this message
Mohamed IKBEL Boulabiar (boulabiar) wrote :

problems with fennec seems coming from not having associated application wishes.

Try modifying the bottom of wishes.xml file adding it to the list with it's application name (it is shown in the terminal when performing a gesture on fennec activated)

The name of the app is shown like this after running ginn:
--ActiveApp openoffice.org-writer
it should be put in its corresponding xml entry
   <application name="openoffice.org-writer">

Names of applications can be found here:
/usr/local/share/applications/

otherwise, if you don't get an application name, you can define them as global wishes (but they will work also with other apps)

Revision history for this message
Henrik Rydberg (rydberg) wrote :

Hi Lukas, thanks for the image! Is it your opinion that dragging two fingers simultaneously on the surface produces two nice lines in mtview? In that case, I suppose your driver works well, which is great. Thanks!

Changed in smartphone:
status: New → Incomplete
status: Incomplete → In Progress
importance: Undecided → Medium
Changed in utouch:
status: New → In Progress
Changed in smartphone:
assignee: nobody → Lukas-David Gorris (lgorris)
Revision history for this message
Chase Douglas (chasedouglas) wrote :

I don't see any tasks left for utouch. I'm marking it as fix released.

Changed in utouch:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.