Bug 48161

Summary: Elantech Touchpad lost sync and becomes unusable
Product: Drivers Reporter: Nikolay (figasebe)
Component: Input DevicesAssignee: drivers_input-devices
Status: REOPENED ---    
Severity: normal CC: alan, antoinejeandet, ceolin, evfool, github, gmoutso, lawsonk, lbt, russianneuromancer, Stefan.G.Zink+korg, stefan, ulrik_opensource-kernel
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.12 Subsystem:
Regression: No Bisected commit-id:
Attachments: elantech_v2.patch

Description Nikolay 2012-10-02 07:30:28 UTC
I have trouble with Touchpad. (Notebook Samsung 350u2b).
OS: Archlinux.

Sometimes touchpad not workinkg.

That happens when one finger in the lower left corner, and the other finger on
the center of the touchpad.

$ xinput list | grep Touchpad
⎜   ↳ ETPS/2 Elantech Touchpad                  id=12   [slave  pointer  (2)]

$dmesg
[ 5886.135442] psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
[ 5886.147474] psmouse serio1: Touchpad at isa0060/serio1/input0 - driver resynced.
[ 5973.254436] psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
[ 5973.271490] psmouse serio1: Touchpad at isa0060/serio1/input0 - driver resynced.
[ 6008.335635] psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
[ 6008.356095] psmouse serio1: Touchpad at isa0060/serio1/input0 - driver resynced.
[ 6172.043921] psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
[ 6172.079316] psmouse serio1: Touchpad at isa0060/serio1/input0 - driver resynced.
[ 7084.386385] psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
[ 7084.411297] psmouse serio1: Touchpad at isa0060/serio1/input0 - driver resynced.
[ 7299.066706] psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
[ 7299.086690] psmouse serio1: Touchpad at isa0060/serio1/input0 - driver resynced.

Solution, Just reload psmouse module.
$rmmod psmouse
$modprobe psmouse

Kernel:
$uname -a
Linux samsung 3.5.4-1-ARCH #1 SMP PREEMPT Sat Sep 15 08:12:04 CEST 2012 x86_64
GNU/Linux
Comment 1 Keith Lawson 2012-10-24 01:12:39 UTC
I'm having issues with the touchpad on a Lenovo L430 that I think may be related to this bug. 

OS: Debian 6.0.6

Kernel built from source: 
$ uname -a
Linux l430kl 3.6.3 #1 SMP Mon Oct 22 00:23:26 WET 2012 i686 GNU/Linu

modprobe psmouse shows an elantech touchpad: 

[  246.143243] psmouse serio1: elantech: assuming hardware version 3 (with firmware version 0x350f02)
[  246.156668] psmouse serio1: elantech: Synaptics capabilities query result 0xb9, 0x15, 0x0c.
[  246.225833] input: ETPS/2 Elantech Touchpad as /devices/platform/i8042/serio1/input/input14

As does /proc/bus/input/devices: 

I: Bus=0011 Vendor=0002 Product=000e Version=0000
N: Name="ETPS/2 Elantech Touchpad"
P: Phys=isa0060/serio1/input0
S: Sysfs=/devices/platform/i8042/serio1/input/input14
U: Uniq=
H: Handlers=mouse0 event6 
B: PROP=1
B: EV=b
B: KEY=6420 0 30000 0 0 0 0 0 0 0 0
B: ABS=2608000 11000003

However X11 is seeing a Synaptics touchpad: 

$ xinput list
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad              	id=10	[slave  pointer  (2)]
⎜   ↳ PS/2 Generic Mouse                      	id=11	[slave  pointer  (2)]
⎜   ↳ Macintosh mouse button emulation        	id=12	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Power Button                            	id=6	[slave  keyboard (3)]
    ↳ Video Bus                               	id=7	[slave  keyboard (3)]
    ↳ Sleep Button                            	id=8	[slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard            	id=9	[slave  keyboard (3)]
    ↳ ACPI Virtual Keyboard Device            	id=13	[slave  keyboard (3)]


On my laptop the trackpad and two buttons below it work but using the "eraser head" produces the lost sync errors and it doesn't function at all: 

Oct 24 01:07:54 l430kl kernel: [  522.465744] psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Oct 24 01:07:54 l430kl kernel: [  522.480254] psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Oct 24 01:07:54 l430kl kernel: [  522.494767] psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Oct 24 01:07:54 l430kl kernel: [  522.509280] psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Oct 24 01:07:54 l430kl kernel: [  522.552569] psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Oct 24 01:07:54 l430kl kernel: [  522.552578] psmouse serio1: issuing reconnect request

I'm running Debian 6.0.6 with a mainline kernel built from source: 


Reloading the psmouse module does not fix the problem for me.
Comment 2 Keith Lawson 2012-11-03 21:07:59 UTC
Sorry that "xinput list" isn't accurate as I was running it remotely (duh). 

Here's the proper output: 

$ xinput list
⎡ Virtual core pointer                          id=2    [master pointer (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer (2)]
⎜   ↳ ETPS/2 Elantech Touchpad                  id=10   [slave  pointer (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Sleep Button                              id=8    [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=9    [slave  keyboard (3)]
    ↳ ThinkPad Extra Buttons                    id=11   [slave  keyboard (3)]
$

So X does see it as an Elantech touchpad. However the touchpoint (or eraser head) and top 3 mouse buttons on the trackpad do not work.
Comment 3 Keith Lawson 2012-11-03 21:08:48 UTC
p.s. I've tried this with 3.0.4, 3.6.3 and now 3.6.5.
Comment 4 Ulrik De Bie 2013-08-14 09:57:28 UTC
I have a L530 and was struggling with the same problem as Keith Lawson.

I found a solution, but the patch needs some polishing still: http://www.spinics.net/lists/linux-input/msg26869.html

Can you give me feedback on:
1) Does the patch solve it on your hardware ?
2) what is the result on your hardware of dmesg | grep elantech
Comment 5 Keith Lawson 2013-11-20 00:09:05 UTC
What additional data is required? This bug still exists the last time I tested in 3.10.x. Ulrik sent his patch to the mailing list and didn't receive any response the last time I checked.
Comment 6 Keith Lawson 2013-11-20 00:11:02 UTC
There also appears to be reports about missing support for this device as recently as Oct 2/2013: 

http://www.spinics.net/lists/linux-input/msg27710.html
Comment 7 Alan 2013-11-20 11:53:48 UTC
Best thing is probably to chase Dmitry up - patches get missed, people get busy - don't assume no response is a no, it may simply be nobody had time to look at it.
Comment 8 Keith Lawson 2013-11-20 23:36:29 UTC
(In reply to Alan from comment #7)
> Best thing is probably to chase Dmitry up - patches get missed, people get
> busy - don't assume no response is a no, it may simply be nobody had time to
> look at it.

Will do. Thanks for the advice.
Comment 9 github 2013-11-23 12:26:58 UTC
The Patch from the mailing list posted by Ulrik De Bie tries to fix this issue by creating another device inside the elantech driver.

But when comparing the output of the following command on an X220t:
ls -lah /sys/bus/serio/devices
total 0
drwxr-xr-x 2 root root 0 Nov 23  2013 .
drwxr-xr-x 4 root root 0 Nov 23  2013 ..
lrwxrwxrwx 1 root root 0 Nov 23  2013 serio0 -> ../../../devices/platform/i8042/serio0
lrwxrwxrwx 1 root root 0 Nov 23  2013 serio1 -> ../../../devices/platform/i8042/serio1
lrwxrwxrwx 1 root root 0 Nov 23 13:14 serio2 -> ../../../devices/platform/i8042/serio1/serio2


With that on my L530:
ls -lah /sys/bus/serio/devices 
total 0
drwxr-xr-x 2 root root 0 Nov 23 13:03 ./
drwxr-xr-x 4 root root 0 Nov 23 12:59 ../
lrwxrwxrwx 1 root root 0 Nov 23 13:10 serio0 -> ../../../devices/platform/i8042/serio0/
lrwxrwxrwx 1 root root 0 Nov 23 13:03 serio1 -> ../../../devices/platform/i8042/serio1/

To me it seems like a muxing-related problem within the i8042 driver. I will have a look at it later.

Regards, Socke
Comment 10 Ulrik De Bie 2014-03-20 19:58:04 UTC
Patch was resubmitted from a proper git a month ago:

http://www.spinics.net/lists/linux-input/msg29806.html

I'll send a reminder to Dmitry.
Comment 11 Stefan Valouch 2014-04-04 00:18:09 UTC
With CONFIG_MOUSE_PS2_ELANTECH enabled, my touchpad in a Fujitsu H730 does not work at all but reports the above errors (and does not do much without that option, but better than nothing). Applying the above patch does not change anything when CONFIG_MOUSE_PS2_ELANTECH=y). It claims to be hardware version 4 though. I did not reboot yet, though, but simply reloaded the psmouse driver.

[38034.524891] psmouse serio4: elantech: assuming hardware version 4 (with firmware version 0x570f00)
[38034.538399] psmouse serio4: elantech: Synaptics capabilities query result 0xc0, 0x14, 0x0c.
[38034.628480] input: ETPS/2 Elantech Touchpad as /devices/platform/i8042/serio4/input/input98
...
[39392.108664] psmouse serio4: Touchpad at isa0060/serio4/input0 lost sync at byte 6
[39392.144599] psmouse serio4: issuing reconnect request
Comment 12 Ulrik De Bie 2014-04-05 16:48:57 UTC
(In reply to nukleus from comment #11)


I got in contact with nukleus, and with some other fixes on top of my patch we were able to get the Fujitsu H730 working. I'm verifying a few things still, and then I'll prepare a proper updated patchset to the linux-input mailinglist and Dmitry.
Comment 13 Thales Ceolin 2014-05-23 16:53:40 UTC
Meanwhile this bug is being fixed, to stop the errors/messages on dmesg, do a rmmod psmouse ; modprobe psmouse proto=bare
Comment 14 Ulrik De Bie 2014-06-12 19:08:21 UTC
Updated patch has been posted to linux-input based on reviewing comments from Hans de Goede.
http://www.spinics.net/lists/linux-input/msg31822.html
Comment 15 Tom Hiller 2014-06-17 21:46:54 UTC
Created attachment 140171 [details]
elantech_v2.patch

This has been an annoying issue I have eagerly been waiting to see solved for months.  For anyone who has an Lenovo L530, this patch works.  I patched Gentoo-sources-3.15.0 but the patched files should be identical to the vanilla kernel.

$ uname -a
Linux localhost 3.15.0-gentoo #6 SMP Mon Jun 16 18:45:55 EDT 2014 x86_64 Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz GenuineIntel GNU/Linux


$ dmesg | grep -i mouse
[    1.437205] mousedev: PS/2 mouse device common for all mice
[    2.075761] psmouse serio1: elantech: assuming hardware version 3 (with firmware version 0x350f02)
[    2.090085] psmouse serio1: elantech: Synaptics capabilities query result 0xb9, 0x15, 0x0c.
Comment 16 Stefan Valouch 2014-06-19 23:21:03 UTC
Both patches above lack v4 support, but replicating the stuff done in _v3-functions to the _v4-functions looks easy. I'd be more than happy to test the final patch with my v4 hardware. In the meantime, I'm using Ulriks patches.
Comment 17 Ulrik De Bie 2014-08-28 18:20:32 UTC
An updated patch has now been approved by Dmitry (see http://www.spinics.net/lists/linux-input/msg33231.html).
Comment 18 Ulrik De Bie 2014-09-04 18:45:48 UTC
A patch set for the Fujitsu H730 was proposed on linux-input: http://www.spinics.net/lists/linux-input/msg33275.html
Comment 19 George 2015-03-10 18:27:35 UTC
possible duplicate https://bugzilla.kernel.org/show_bug.cgi?id=84491
bug #84491 has similarities: elantech touchpad and lost sync at byte 6