Bug 18122 - touchpad left / right click buttons do not work lenovo s10-3t
Summary: touchpad left / right click buttons do not work lenovo s10-3t
Status: CLOSED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Input Devices (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Yan Li
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-08 21:18 UTC by paulatgm
Modified: 2011-01-24 12:48 UTC (History)
9 users (show)

See Also:
Kernel Version: 2.6.36
Tree: Mainline
Regression: Yes


Attachments
Xorg.0.log for git version of synaptics driver (27.84 KB, text/plain)
2010-09-09 02:49 UTC, paulatgm
Details

Description paulatgm 2010-09-08 21:18:36 UTC
This new type touchpad has a left click in the lower left corner and right click in the lower right. These worked on ubuntu lucid with kernel 2.6.32, but fail on ubuntu maverick with kernel 2.6.35.

They have also been tested with ubuntu daily kernel build of 2.6.36 from Sep 8, 2010.

Even though the left /right click worked on kernel 2.6.32, there was another problem on which occurred when attemption to select text. After pressing and activating the left click, any touch to the pad (to start selecting text) immediately would cause the mouse to jump off the nearest corner of the screen. Thus text selection is impossible in kernel 2.6.32.

I have no way to test this in current kernels, since the click capability is missing.

On both lucid and maverick, tapping the pad will result in a left click, and bottom edge horizontal scrolling and right edge vertical scrolling works.  In other words, other parts seem ok.

All operating and kernel log files are posted on ubuntu bugfile 621821 at: 

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/621821
Comment 1 Dmitry Torokhov 2010-09-08 23:18:14 UTC
I wonder if the box has the newer Synaptics "Clickpad" which requires updated xf86-input-synaptics driver. Can I see /proc/bus/input/devices?

Takashi, did you sumbit the changes for CLickpads to X guys?

Thanks.
Comment 2 paulatgm 2010-09-09 01:10:08 UTC
paul :~$ cat /proc/bus/input/devices 
I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button"
P: Phys=PNP0C0C/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/PNP0C0C:00/input/input0
U: Uniq=
H: Handlers=kbd event0 
B: EV=3
B: KEY=10000000000000 0

I: Bus=0019 Vendor=0000 Product=0005 Version=0000
N: Name="Lid Switch"
P: Phys=PNP0C0D/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input1
U: Uniq=
H: Handlers=event1 
B: EV=21
B: SW=1

I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button"
P: Phys=PNP0C0C/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:01/input/input2
U: Uniq=
H: Handlers=kbd event2 
B: EV=3
B: KEY=10000000000000 0

I: Bus=0019 Vendor=0000 Product=0003 Version=0000
N: Name="Sleep Button"
P: Phys=PNP0C0E/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input3
U: Uniq=
H: Handlers=kbd event3 
B: EV=3
B: KEY=4000 0 0

I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button"
P: Phys=LNXPWRBN/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXPWRBN:00/input/input4
U: Uniq=
H: Handlers=kbd event4 
B: EV=3
B: KEY=10000000000000 0

I: Bus=0011 Vendor=0001 Product=0001 Version=ab83
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/devices/platform/i8042/serio0/input/input5
U: Uniq=
H: Handlers=sysrq kbd event5 
B: EV=120013
B: KEY=402000000 3803078f800d001 feffffdfffefffff fffffffffffffffe
B: MSC=10
B: LED=7

I: Bus=0019 Vendor=0000 Product=0006 Version=0000
N: Name="Video Bus"
P: Phys=LNXVIDEO/video/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input6
U: Uniq=
H: Handlers=kbd event6 
B: EV=3
B: KEY=3e000b00000000 0 0 0

I: Bus=0003 Vendor=2087 Product=0a01 Version=0111
N: Name="Cando Corporation Cando 10.1 Multi Touch Panel with Controller"
P: Phys=usb-0000:00:1d.1-1/input0
S: Sysfs=/devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/input/input7
U: Uniq=20091003.001
H: Handlers=mouse0 event7 
B: EV=1b
B: KEY=400 0 0 0 0 0
B: ABS=260010000000003
B: MSC=10

I: Bus=0003 Vendor=5986 Product=0190 Version=1404
N: Name="Lenovo EasyCamera"
P: Phys=usb-0000:00:1d.7-8/button
S: Sysfs=/devices/pci0000:00/0000:00:1d.7/usb1/1-8/1-8:1.0/input/input8
U: Uniq=
H: Handlers=kbd event8 
B: EV=3
B: KEY=100000 0 0 0

I: Bus=0011 Vendor=0002 Product=0007 Version=01b1
N: Name="SynPS/2 Synaptics TouchPad"
P: Phys=isa0060/serio4/input0
S: Sysfs=/devices/platform/i8042/serio4/input/input9
U: Uniq=
H: Handlers=mouse1 event9 
B: EV=b
B: KEY=420 10000 0 0 0 0
B: ABS=11000003

My synaptics driver changelog claims this version:

commit a0d6e90b26044258473d8dae8a53c5adbe2681f1
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Mar 26 15:13:40 2010 +1000

    synaptics 1.2.2
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Comment 3 paulatgm 2010-09-09 02:35:59 UTC
I also tried upgrading to the git version of synaptics and still have the problem.
Comment 4 paulatgm 2010-09-09 02:49:19 UTC
Created attachment 29392 [details]
Xorg.0.log for git version of synaptics driver
Comment 5 paulatgm 2010-09-09 02:51:37 UTC
the attached Xorg.0.log shows these initialization errors, even though most functionality is created (i.e. synclient can be used successfully).

[ 5405.620] (EE) SynPS/2 Synaptics TouchPad no synaptics event device found
[  5405.620] (EE) xf86OpenSerial: No Device specified.
[  5405.620] (EE) Synaptics driver unable to open device
[  5405.620] (EE) PreInit returned NULL for "SynPS/2 Synaptics TouchPad"

Sorry, I don't know how to interpret this.
Comment 6 Takashi Iwai 2010-09-09 05:49:39 UTC
(In reply to comment #1)
> I wonder if the box has the newer Synaptics "Clickpad" which requires updated
> xf86-input-synaptics driver. Can I see /proc/bus/input/devices?
> 
> Takashi, did you sumbit the changes for CLickpads to X guys?

I already posted an old version months ago, and it should work with old xorg.  For new xorg, you'll need to adjust by yourself.

Actually, there are lots of pending patches (including multi-touch support), but I'm prohibited for sending them to upstream because of "potential patent-fringing".  For openSUSE, I can provide a help, but for other distros, I have no idea.

I'll try to sort out non-multi-touch part and resubmit once if I have time left.
Comment 7 gnu.castor 2010-09-09 16:45:02 UTC
I have a bug like this on my laptop with a Cando touchscreen. I have to touch the touchscreen once, then I can clic on other input.

The hid-cando module or xorg-input-evdev start with active clic event and not released, the "button" still "pressed".
Comment 8 Dmitry Torokhov 2010-09-09 17:11:44 UTC
(In reply to comment #7)
> I have a bug like this on my laptop with a Cando touchscreen. I have to touch
> the touchscreen once, then I can clic on other input.
> 
> The hid-cando module or xorg-input-evdev start with active clic event and not
> released, the "button" still "pressed".

Please do not hijack the bug with unrelated hardware. I'd recommend starting with filing bug for xorg-input-evdev and, if they determine it is a kernel issue, filing a separate bug here. Thanks.
Comment 9 gnu.castor 2010-09-09 17:52:40 UTC
> Please do not hijack the bug with unrelated hardware. I'd recommend starting
> with filing bug for xorg-input-evdev and, if they determine it is a kernel
> issue, filing a separate bug here. Thanks.

I just want to say that this bug may be in fact that of the module cando, which prevents the synaptics device to function normally. I know I need to open a ticket for HID-cando, I have not yet had time, but I thought that this bug could come from it. Or not.
Comment 10 gnu.castor 2010-09-09 17:55:03 UTC
PS : he say this bug come with 3.6.35, the first version of kernel with hid-cando, I just make the correlation. (he have a cando device...)
Comment 11 paulatgm 2010-09-09 19:36:02 UTC
(In reply to comment #10)
> PS : he say this bug come with 3.6.35, the first version of kernel with
> hid-cando, I just make the correlation. (he have a cando device...)

Actually, I've been using a backported version of the cando driver on kernel 2.6.32 and the touchpad works ok.  The only problem is a jumpy mouse when I try to select text.  Maybe using the synclient settings can fix that.

I have not observed what you say about having the right / left click starting working after using the touch screen at all.
Comment 12 tob 2010-09-10 07:02:00 UTC
@Takashi
Can you elaborate a little more about the future of multi-touch on the Synaptics Clickpads?  Is the multi-touch protocol itself covered under a patent?  I don't see how the other multi-touch drivers in the kernel are more free of patent problems than a multi-touch Synaptics driver.  Thanks.
Comment 13 Takashi Iwai 2010-09-10 07:13:14 UTC
I can give no comments about patents from my side because I have no clue (intentionally).  It's not me but my employer who forbids the patch submission because the case isn't clear, accordingly.
Comment 14 tob 2010-09-13 23:23:09 UTC
I just tried out 2.6.35 while using Ubuntu 10.10 beta.  I have the same problem and I don't have a touchscreen so I think we can rule out cando.  It doesn't look like the Clickpad is recognized properly using the CAP bytes.  Here is the touchpad identity line from my dmesg:

Synaptics Touchpad, model: 1, fw: 7.4, id: 0x1e0b1, caps: 0xd04771/0xe40000/0x5a0400
Comment 15 tob 2010-09-16 17:59:50 UTC
It looks like this is an Ubuntu specific bug.  I posted a patch and more info at:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/582809
Comment 16 Yan Li 2010-11-24 07:54:00 UTC
I'm seeing this same issue on a Lenovo S10-3t too, however, my device caps is different from yours:
Synaptics Touchpad, model: 1, fw: 7.4, id: 0x1e0b1, caps: 0xd04771/0xa40000/0x4a0500

With this specific model, kernel 2.6.35.3 and xorg-x11-drv-synaptics-1.2.1 with Takashi's old patch, X can corrected recognize it as a Clickpad. However, I can confirm that the kernel doesn't send out any BTN_* event when I click on anywhere on the clickpad, the only Key event I get from kernel is this:
type 1 (Key), code 325 (ToolFinger), value 0

Therefore I think the kernel driver can't correctly interpret the packets from this version of Clickpad. Is there any way I can dump the packets from this device and post it here?
Comment 17 Yan Li 2010-11-27 05:06:28 UTC
This patch fixed this bug in my testing:
https://patchwork.kernel.org/patch/360282/

Current code detects Clickpad by checking the 8 and 20 bits of 0x0c cap. However, the code returns true if either of those bits is 1, while it should only return true when both are 1. This has lead to the touchpad on Lenovo S10-3t be mistakenly recognized as Clickpad and its BTN_LEFT and BTN_RIGHT blocked.

So far we've found that the S10-3ts are shipped with two slightly different models of touchpads, of which the 0x0c cap is either 0x5a0400 or 0x4a0500. They are not Clickpad and return BTN_LEFT and BTN_RIGHT normally.

This patch fixed this issue by checking both sign bits are 1. Tested on my S10-3t and worked well. It is small and shouldn't break anything else (but definitely needs testing on other S10-3t and machines using ClickPad).
Comment 18 paulatgm 2010-11-27 18:47:46 UTC
Yi thanks for the patch.  I can confirm that it works on my S10-3t touchpad too.  I still need to use:

synclient HorizEdgeScroll=1   to enable horiz scrolling
synclient JumpyCursorThreshold=250    to be able to select and copy text

Great job.

Can we get this ported to current and previous kernels?
Comment 19 Dmitry Torokhov 2010-11-28 00:37:18 UTC
No, the patch is invalid (it effectively disables clickpad mode for _all_ touchpads).
Comment 20 Dmitry Torokhov 2010-11-28 00:46:18 UTC
Looking at the pictures on Lenovo site the touchpad on S10-3 does not have any physical buttons so it should be a clickpad...
Comment 21 Yan Li 2010-11-29 08:38:01 UTC
(In reply to comment #20)
> Looking at the pictures on Lenovo site the touchpad on S10-3 does not have
> any
> physical buttons so it should be a clickpad...

S10-3t please, not S10-3. They are different machines.

Dmitry is right, my patch was invalid. I'm testing a new one (and I've managed to find an HP mini 210 to test).
Comment 22 Yan Li 2010-11-29 08:41:19 UTC
And it seems that you can't tell whether it's a ClickPad or not by merely looking at it. The touchpad used on S10-3t has no stand-alone physical buttons so it definitely looks like a ClickPad, but when you click the lower-left corner it sends out BTN_LEFT and when you click the lower-right corner it sends out BTN_RIGHT just as normal physical buttons, while as to my understanding a real ClickPad always emits BTN_MIDDLE.
Comment 23 Florian Mickler 2011-01-24 12:47:55 UTC
a fix for this has been merged in .37-rc6: 
commit 3bfa321e662edf90fb8123a02c987c2965fa50bb
Author: Yan Li <yan.i.li@intel.com>
Date:   Tue Nov 30 23:51:03 2010 -0800

    Input: synaptics - fix handling of 2-button ClickPads

Note You need to log in before you can comment on or make changes to this bug.