Synaptics Multitouch Support Missing in Linux

Bug #633225 reported by Davide P.
62
This bug affects 12 people
Affects Status Importance Assigned to Milestone
Linux
Triaged
Medium
Unassigned
Open Input Framework
Triaged
Medium
Unassigned

Bug Description

I have some problems with the Synaptics touchpad on my HP tm2 laptop.

I'm trying to simply test the two finger scrolling on last Maverick on my HP tm2 2000 laptop but when I run
gesturetest 0x4c000be 0 0xfff
or the relative for root window got from (xwininfo -root | grep "Window id" | awk '{print $4}' )
gesturetest 0xaa 0 0xfff

I always can't get any output

Also if I'm running
synclient -m 100

I got this:
Can't access shared memory area. SHMConfig disabled?

Couldn't find synaptics properties. No synaptics driver loaded?

Can SHMConfig could be a problem?

Here is my complete environment:

I have the following:
HP tm2 1110eg
Ubuntu 10.10 Maverick
Installed utouch package at last release
Installed python-pymt package

This command, sudo lsinput, returns: "/dev/input/event0 protocol version mismatch (expected 65536, got 65537)".

I tried also
sudo gesturetest 0xaa 0 0xfff
But I have no output

If I run evtest, I have this kind of output

# evtest /dev/input/event9
Input driver version is 1.0.1
Input device ID: bus 0x11 vendor 0x2 product 0x1 version 0x0
Input device name: "PS/2 Synaptics TouchPad"
Supported events:
  Event type 0 (Sync)
  Event type 1 (Key)
    Event code 272 (LeftBtn)
    Event code 273 (RightBtn)
    Event code 274 (MiddleBtn)
  Event type 2 (Relative)
    Event code 0 (X)
    Event code 1 (Y)
Testing ... (interrupt to exit)
Event: time 1283796048.180071, type 2 (Relative), code 0 (X), value 2
Event: time 1283796048.180076, type 2 (Relative), code 1 (Y), value -2
Event: time 1283796048.180077, -------------- Report Sync ------------
Event: time 1283796048.224217, type 2 (Relative), code 0 (X), value 2
Event: time 1283796048.224225, type 2 (Relative), code 1 (Y), value -8
Event: time 1283796048.224227, -------------- Report Sync ------------
Event: time 1283796048.247815, type 2 (Relative), code 0 (X), value 2
Event: time 1283796048.247827, type 2 (Relative), code 1 (Y), value -12
....

On Windows 7 the Synaptics driver is able to recognize the multitouch feature of the touchpad, so it might be a driver problem... Is that possible?

Revision history for this message
Davide P. (scaltro) wrote :
Revision history for this message
Duncan McGreggor (oubiwann) wrote :

I think Henrik has made some progress here with his synaptic and wacom work. I'll let him pick this up once his load from beta-freeze lightens up.

Changed in utouch:
assignee: nobody → Henrik Rydberg (rydberg)
importance: Undecided → Medium
milestone: none → natty-alpha-1
Revision history for this message
Henrik Rydberg (rydberg) wrote :

Support for non-MT devices capable of reporting several fingers through the kernel (DOUBLETAP) has been committed, and will appear in maverick. However, the device reported here does not seem to support DOUBLETAP. The problem thus moves back to the kernel lacking support for the latest synaptics trackpads.

Changed in utouch:
status: New → Confirmed
Revision history for this message
Duncan McGreggor (oubiwann) wrote :

Chase, can you re-target this bug to the kernel?

Changed in utouch:
assignee: Henrik Rydberg (rydberg) → Chase Douglas (chasedouglas)
Revision history for this message
Chase Douglas (chasedouglas) wrote :

This will require extensive reverse engineering of the synaptics multitouch protocol, unfortunately. I'll retarget this against the linux kernel, but there's not much to do unless someone gets the time to step up to the plate and decode the protocol.

If anyone is interested, please find details on reverse engineering the protocol in this bug comment: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/550625/comments/133.

affects: utouch → linux
Changed in linux:
assignee: Chase Douglas (chasedouglas) → nobody
milestone: natty-alpha-1 → none
status: Confirmed → Triaged
summary: - [hp tm2 touchpad] Synaptics multifingers not recognized
+ Synaptics Multitouch Support Missing in Linux
Changed in utouch:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
tob (tobynbertram) wrote :

I reverse engineered the initialization sequence for my Synaptics 7.4 Clickpad a while ago. Details can be found at: https://bugzilla.kernel.org/show_bug.cgi?id=18062

Takashi Iwai from OpenSuse has done quite a bit of work for the Synaptics Clickpad including some experimental multitouch support, his repo is here: http://download.opensuse.org/repositories/home:/tiwai:/clickpad:/openSUSE_11.3/openSUSE_11.3/src/

I have played around with the synaptics.c code in the kernel to add multitouch events (ABS_MT_POSITION_X, ABS_MT_POSITION_Y, ABS_MT_PRESSURE) using Takashi's work as a model. I can see the multitouch event codes using evtest. However, nothing else works. What else needs to be modified so that utouch can use the synaptics multitouch events from the kernel?

This might be a duplicate of this bug: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-synaptics/+bug/308191

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

This sounds exciting. Would you like to share your kernel code?

Revision history for this message
tob (tobynbertram) wrote :

Here is the first pass that I put together using the Maverick source with Takashi Iwai's patches. There are a few things that I would like to play around with, but I would like to be able to see some results before I change too many things. Takashi has more patches for xorg-input-synaptics that enable multitouch to work on OpenSuse. However, I was hoping that I could use Maverick's uTouch instead of applying his patches to xorg.

Revision history for this message
Davide P. (scaltro) wrote :

Actually the lsinput command doesn't return any error message, so you can find it attached.

Also the synclient message is a bit different:

root@***:/home/davide# synclient -m 100
Can't access shared memory area. SHMConfig disabled?
Couldn't find synaptics properties. No synaptics driver loaded?

Let me know if I have to report other files or command's output.

Revision history for this message
Davide P. (scaltro) wrote :

Sorry, but I cannot understand why Synaptics declared in April this:
http://www.synaptics.com/about/press/press-releases/synaptics-gesture-suite%E2%84%A2-now-available-popular-linux-operating-systems

It seems that they said that now the synaptics driver should support multitouch in linux... But it seems to be not true if there's still an huge gap between the windows touchpad's driver compared to the one for linux.

Could that be related in a such way with this bug ? (... as well as the {very}-previously reported https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-synaptics/+bug/308191)

Revision history for this message
Chase Douglas (chasedouglas) wrote :

Davide,

This is excellent news! Thanks for coming forward with your synaptics code!

I'd like to address your last two comments. First, I believe that synclient is deprecated now. I believe it was used to modify synaptics support in the past, like two finger scrolling. If so, that functionality has migrated to the xinput utility.

As for Synaptics' press release about multitouch gestures, it seemed that what they proposed was closed-source proprietary software. Ubuntu does not ship proprietary software by default, so we haven't taken a look at it.

Thanks again!

Revision history for this message
tob (tobynbertram) wrote :

Can someone describe the steps that are necessary for a new multitouch kernel driver to be utilized by the uTouch framework? Should it just work right away as long as the multitouch events are properly triggered, or does xorg/uTouch need to be specifically modified to use the new multitouch driver somehow?

Revision history for this message
Chase Douglas (chasedouglas) wrote :

tob,

As long as the kernel sends multitouch events and the X evdev input module is used in Ubuntu 10.10, utouch should just work. The tricky part here is if your device is a trackpad. Trackpads are normally grabbed by the X synaptics input module instead of the X evdev input module. One can use InputClass sections in xorg.conf to switch between the two.

Revision history for this message
tob (tobynbertram) wrote :

@Chase

Thanks for pointing me in the right direction. I was able to use gesturetest to successfully see multitouch gestures from my Synaptics Clickpad! Very Cool! However, there is no movement on the screen from the touchpad at all, so there is still something that I'm missing.

Was uTouch intended to be used by touchpads as well as touchscreens? Do you think that I should continue to try to get uTouch to work with the Synaptics touchpad? or do you think it is a better idea to add multitouch support in xorg-input-synaptics? Thanks again for your help.

Revision history for this message
Chase Douglas (chasedouglas) wrote :

Hi tob,

uTouch is intended to be used for touchpads too. Your code just needs to send both ABS_MT_POSITION_{X,Y} and ABS_{X,Y} for one of the touches. I've taken your code and integrated it here:

http://kernel.ubuntu.com/git?p=cndougla/ubuntu-natty.git;a=shortlog;h=refs/heads/multitouch-synaptics

I'm still testing things out, but there's an issue with touchpads with integrated buttons that needs to be worked out. We'll be working with the community on this issue, mainly on the xorg-devel and linux-input mailing lists.

Feel free to comment on anything here as well.

Again, thanks a bunch for figuring out the MT protocol!

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

Nice going, Chase :-)

Revision history for this message
tob (tobynbertram) wrote :

I've been following the xorg-devel mailing list, but I don't know how to jump in on a particular thread. I don't see the same finger movement tracking behavior that Chase described in my clickpad. Here is the way that I see it: The finger that has the greatest Y value is always reported in the non-multitouch packet. This becomes a problem if the fingers move so that the finger with the greatest Y value drops below the other finger. The 2nd finger's Y coordinate is immediately switched from the multitouch packet to the non- multitouch packet. Interestingly, the X coordinates do not follow the Y coordinates, so you end up with each fingers X and Y coordinates split between the multitouch and non-multitouch packets.

Revision history for this message
Henrik Rydberg (rydberg) wrote : Re: [Bug 633225] Re: Synaptics Multitouch Support Missing in Linux

On 10/11/2010 10:16 AM, tob wrote:

> I've been following the xorg-devel mailing list, but I don't know how to
> jump in on a particular thread. I don't see the same finger movement
> tracking behavior that Chase described in my clickpad. Here is the way
> that I see it: The finger that has the greatest Y value is always
> reported in the non-multitouch packet. This becomes a problem if the
> fingers move so that the finger with the greatest Y value drops below
> the other finger. The 2nd finger's Y coordinate is immediately switched
> from the multitouch packet to the non- multitouch packet.
> Interestingly, the X coordinates do not follow the Y coordinates, so you
> end up with each fingers X and Y coordinates split between the
> multitouch and non-multitouch packets.
>

Do you mean like the coordinates of a rectangle, that the two points reported
are in fact the lower-left and upper-right corners of a rectangle? We have seen
this on other hardware as well, unfortunately.

Revision history for this message
tob (tobynbertram) wrote :

No, it's not strictly lower-left and upper-right or upper-left and lower-right corners. Both the X and Y coordinates of the finger with the greatest Y value is reported in the non-multitouch packet initially when two fingers are placed on the touchpad.

Revision history for this message
Matteo Rossi (teo-red90) wrote :

I think we could merge Bug #308191 with this one as they cover the same topic.

I have a Synaptic trackpad (v 7.2) on a Vaio laptop which lacks MT support on Ubuntu. I can help you to test the patches, but I need some instructions on how to compile the driver with the patches.

Revision history for this message
tob (tobynbertram) wrote :

@Chase
I haven't seen any Synaptics Multitouch activity on Xorg-devel in a while. Are you still working on it or has it stalled?

Revision history for this message
Chase Douglas (chasedouglas) wrote :

Hi tob,

I've been working more on X MT support recently. Because of this, I asked Chris Bagwell if he would take a look. He's been working on it, but it's not quite ready yet.

Revision history for this message
udit mahajan (mahajanudit) wrote :

I read the whole bug replies/concerns/request. So let me get it straight..
@Chase: Are you suggesting once this is done, notebook users with normal Synaptic touchpad would be able to use their Ubuntu desktop like MacOs? I mean pinching, rotating, sliding gestures?
That would be great... I have been craving such functionalities ever since I saw them on my friend's Mac book. Also on that topic, what makes Synaptic touchpad capable of MT different from a "multi touch" device that gesturetest and other utouch utilities recognize? I mean is there actually a functionality difference or just at kernel level?

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

The sensor mechanism in most laptop synaptics pads is limited, such that individual fingers cannot be perfectly tracked. Scrolling and zooming and such works nicely, but rotation is not 100% reliable.

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.