Bug 33292 - [psmouse] Trackpoint takes long time to get detected
[psmouse] Trackpoint takes long time to get detected
Status: REOPENED
Product: Drivers
Classification: Unclassified
Component: Input Devices
All Linux
: P1 normal
Assigned To: drivers_input-devices
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-14 23:20 UTC by Matthew Gyurgyik
Modified: 2016-04-13 11:52 UTC (History)
16 users (show)

See Also:
Kernel Version: 3.7
Tree: Mainline
Regression: No


Attachments
ls -l /dev/input (3.52 KB, text/plain)
2011-04-14 23:20 UTC, Matthew Gyurgyik
Details
dmesg - trackpoint works (39.86 KB, text/plain)
2011-04-14 23:21 UTC, Matthew Gyurgyik
Details
dmesg - no trackpoint (36.72 KB, text/plain)
2011-04-14 23:22 UTC, Matthew Gyurgyik
Details
kernel.log (172.59 KB, text/x-log)
2011-04-18 11:05 UTC, Matthew Gyurgyik
Details
i8042.debug output from modprobing psmouse until i8042 settles (43.82 KB, text/plain)
2012-11-07 09:00 UTC, Chow Loong Jin
Details
i8042.debug output between attempting to move the undetected trackpoint and i8042 settling again (394.07 KB, text/plain)
2012-11-07 09:01 UTC, Chow Loong Jin
Details

Description Matthew Gyurgyik 2011-04-14 23:20:20 UTC
Created attachment 54402 [details]
ls -l /dev/input

Hello.

I got a new Thinkpad E420s the otherday and have come across a odd problem. 

This laptop has a touchpad and a trackpoint. Sometimes the trackpoint will be detected and sometimes it will not.

Distro: Arch Linux

When the trackpoint is detected:
*rmmod psmouse results in mouse0 and mouse2 disappearing (ls /dev/input). mouse1 = usb logitech mouse
*modprobe psmouse results in mouse0 (the trackpoint) being detected and created right away. However, it takes about 20 seconds for the trackpoint (mouse2) to be created.

When the trackpoint is NOT detected I simply have mouse0 (touchpad) and mouse1 (usb logitech mouse)

Work / Solution
*Reboot into Windows 7. Insure trackpoint works (always does). Reboot into Linux device is detected. In my tests it seems that the device stops getting detected after 6-8 reboots. However, I did also have the problem after resuming from suspend-to-ram.

Let me know what information I need to provide and any way that I can help.
Comment 1 Matthew Gyurgyik 2011-04-14 23:21:51 UTC
Created attachment 54412 [details]
dmesg - trackpoint works
Comment 2 Matthew Gyurgyik 2011-04-14 23:22:19 UTC
Created attachment 54422 [details]
dmesg - no trackpoint
Comment 3 Matthew Gyurgyik 2011-04-16 20:32:37 UTC
It seems that the trackpoint will get detected after a while. I noticed that the trackpoint was detected and started to work after 40 minutes uptime.
Comment 4 Matthew Gyurgyik 2011-04-18 11:03:31 UTC
Apr 18 06:39:40 skynet kernel: [    7.220899] input: SynPS/2 Synaptics TouchPad as /devices/platform/i8042/serio1/input/input6
Apr 18 06:39:40 skynet kernel: [    7.768977] input: Logitech USB-PS/2 Optical Mouse as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/input/input7
Apr 18 06:39:40 skynet kernel: [    7.769205] generic-usb 0003:046D:C03D.0001: input,hidraw0: USB HID v1.10 Mouse [Logitech USB-PS/2 Optical Mouse] on usb-0000:00:1d.0-1.2/input0
Apr 18 06:39:40 skynet kernel: [    7.801948] input: Integrated Camera as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.0/input/input8
Apr 18 06:59:27 skynet kernel: [ 1197.429868] input: PS/2 Generic Mouse as /devices/platform/i8042/serio1/serio2/input/input9

As you can see it took about 20 minutes to detect the trackpoint ("PS/2 generic Mouse")

I will attach the kernel.log file.

Running: 2.6.38.3
Comment 5 Matthew Gyurgyik 2011-04-18 11:05:23 UTC
Created attachment 54592 [details]
kernel.log

As you can see, the trackpoint was detected about 20 minutes after the touchpad.
Comment 6 Manoj Iyer 2011-04-18 15:45:46 UTC
I have a similar problem with the X220, from what I found was, if you disable the touchpad in the bios, the trackpoint will work flawlessly. It will be recognized as a IBM Trackpoint device. If you enable the touchpad, the trackpoint is setup as a pass-through device and psmouse_probe() fails to get a valid ID from the controller. Digging deeper it seems like the controller is NAKing ID requests. Could this be a firmware/bios issue?
Comment 7 Keng-Yü Lin 2011-04-20 14:33:33 UTC
It is found that limiting the ps/2 protocol use to bare (modprobe psmouse proto=bare) makes both the trackpoint and touchpad work on X220. Does this also fix Thinkpad E420s, too?
Comment 8 Matthew Gyurgyik 2011-04-21 14:24:12 UTC
As far as I can tell this seems to fix the problem! However, it is still listed as a "PS/2 Generic Mouse" which isn't a big issue.

Is it possible to have psmouse load with proto=bare for this mouse/touchpad? How would something like this be done in the kernel/module (curious)?
Comment 9 Matthew Gyurgyik 2011-04-21 14:36:53 UTC
Just discovered it works, BUT I lose the ability to scroll and do the two finger tap, middle click using the clickpad/touchpad.
Comment 10 Allan Sandfeld 2011-05-02 10:09:23 UTC
The trackpoint is detected when the psmouse.c driver realizes it has lost synchronization. So it is probably misdetecting and trying to parse a different protocol. Which also explains why parsing proto=bare works.

The question is now: Why is there a difference in functionality when proto=bare is used and when psmouse degrades the protocol by itself.
Comment 11 Casey Harkins 2011-05-19 00:56:15 UTC
What information is needed from us experiencing the bug to try and address this? Do we need i8042.debug from the time we boot until the time the trackpoint is detected?
Comment 12 Chow Loong Jin 2011-06-23 13:37:02 UTC
When using proto=bare, only one input device appears to be detected by psmouse, and both trackpoint and touchpad operate through that device. On the other hand, this device isn't detected to be a touchpad, so the evdev Xorg driver is used instead of the synaptics driver. That's why tapping, and every other touchpad-specific feature does not work.
Comment 13 Alan 2012-08-20 15:48:53 UTC
If this is still seen please re-open/update the bug and also post a summary to linux-input@vger.kernel.org - thanks
Comment 14 Jonas Jensen 2012-10-21 07:25:34 UTC
This bug is still present in kernel 3.6.2 on my Thinkpad L430.
Comment 15 Søren Nørgaard 2012-10-22 19:13:42 UTC
Likewise, still a problem in kernel 3.6.2-1 on Lenovo Thinkpad L530. Using `psmouse proto=impr` makes the trackpoint usable, but disables multitouch functionality.
Comment 16 Chris Tolliday 2012-11-06 23:33:07 UTC
Still having this problem too, kernel 3.6.2 on Thinkpad E420s
Comment 17 Chow Loong Jin 2012-11-07 08:58:52 UTC
I posted this on linux-input sometime back, but either forgot to attach the log files, or they got stripped: http://thread.gmane.org/gmane.linux.kernel.input/21804

I'll attach the log files here instead.
Comment 18 Chow Loong Jin 2012-11-07 09:00:09 UTC
Created attachment 85741 [details]
i8042.debug output from modprobing psmouse until i8042 settles
Comment 19 Chow Loong Jin 2012-11-07 09:01:56 UTC
Created attachment 85751 [details]
i8042.debug output between attempting to move the undetected trackpoint and i8042 settling again
Comment 20 Keith Lawson 2012-11-07 20:57:12 UTC
I'm also having this problem on a Lenovo L430 but logged it against bug #48161.
Comment 21 Jukka Helinko 2012-11-08 11:01:25 UTC
At least the case with the Lenovo L430 touchpad & trackpoint is that when the device is detected as ETPS/2 Elantech Touchpad touching the trackpoint sends a series of bytes which confuses the elantech driver. And leads to lost sync at byte 6 / driver resynced messages.

If imps protocol is forced, both trackpoint and touchpad work fine, but advanced configuration possibilities are lost. 

What I've figured out so far is that in the Elantech/synaptics mode the trackpoint sends 6 byte PS/2ish data:
0x30 0x00 0x00 0x06 0xf5 0xfc
0x30 0x00 0x00 0x06 0xfa 0xfd
0x30 0x00 0x00 0x06 0xfb 0xfe
0x30 0x00 0x00 0x06 0xfb 0xfd
0x30 0x00 0x00 0x06 0xfb 0xfe
0x30 0x00 0x00 0x06 0xf5 0xfb
0x30 0x00 0x00 0x06 0xf9 0xfe
0x30 0x00 0x00 0x06 0xf5 0xfb
0x30 0x00 0x00 0x06 0xfa 0xfd
0x30 0x00 0x00 0x06 0xf5 0xfb
0x30 0x00 0x00 0x06 0xfa 0xfd

Which should be parsed separately by the Elantech driver or some other driver? 
Any way the format seems to be something like this
1st byte: [possibly Y overflow?, possibly X overflow?, Y sign, X sign, ??, Middle Btn, Right Btn, Left Btn]
2nd byte: No idea, most of the time either 0x00 or 0x80
3rd byte: No idea, most of the time either 0x00 or 0x80
4th byte: No idea about the 1st half, lower half is 0x6 for trackpoint events
5th byte: Rest of the X movement
6th byte: Rest of the Y movement

With this I at least was able to hack the elantech driver so that the trackpoint and touchpad are usable, however the problem (besides the unknown data) is that I have no idea how to detect if the device has a trackpoint, so can't really create a patch that would be suitable for other configurations.
Comment 22 Chung-yih Wang 2012-11-08 14:22:32 UTC
I have no idea about the elantech+synaptics combination. However, I had a patch(https://lkml.org/lkml/2012/10/31/211) which was to solve the detection of synaptics trackpoint issue mentioned above. Please give it a try and any feedback will be appreciated.
Comment 23 Keith Lawson 2012-11-09 00:01:56 UTC
(In reply to comment #22)
> I have no idea about the elantech+synaptics combination. However, I had a
> patch(https://lkml.org/lkml/2012/10/31/211) which was to solve the detection of
> synaptics trackpoint issue mentioned above. Please give it a try and any
> feedback will be appreciated.

This patch didn't change the behavior on an L430 for me but it's an Elantech trackpad. Still see the following in my message log: 


Nov  8 23:55:52 l430kl kernel: [  950.573824] psmouse serio1: elantech: assuming hardware version 3 (with firmware version 0x350f02)
Nov  8 23:55:52 l430kl kernel: [  950.587737] psmouse serio1: elantech: Synaptics capabilities query result 0xb9, 0x15, 0x0c.
Nov  8 23:55:53 l430kl kernel: [  950.657384] input: ETPS/2 Elantech Touchpad as /devices/platform/i8042/serio1/input/input14
Nov  8 23:56:01 l430kl kernel: [  959.193698] psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Nov  8 23:56:01 l430kl kernel: [  959.279526] psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Nov  8 23:56:01 l430kl kernel: [  959.294517] psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Nov  8 23:56:01 l430kl kernel: [  959.309014] psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Nov  8 23:56:01 l430kl kernel: [  959.323015] psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Nov  8 23:56:01 l430kl kernel: [  959.323024] psmouse serio1: issuing reconnect request

The timeouts are generated as soon as I touch the trackpoint which doesn't function.
Comment 24 Chris Tolliday 2013-02-10 09:17:35 UTC
Still seeing this problem on my thinkpad e420s, the exact behaviour for me is this:
after sleep/wake or start up the touchpad takes a few seconds to be detected, after that I click a trackpoint button, the touchpad stops working for a few seconds, when it starts working again one of two things happens:
1. the trackpoint and buttons start working again, along with the touchpad
2. the touchpad is working but continuing to press the buttons or trackpoint does nothing

it seems completely random which of the above happens, if 2 happens I have to call rmmod psmouse && modprobe psmouse to restart the above, has same effect as sleep/wake. The amount of time it waits varies as well.

this is the output from scenario 1, good:
[57553.675253] psmouse serio1: synaptics: serio: Synaptics pass-through port at isa0060/serio1/input0
[57553.759237] input: SynPS/2 Synaptics TouchPad as /devices/platform/i8042/serio1/input/input19
[57563.997514] psmouse serio6: (null) at synaptics-pt/serio0/input0 lost synchronization, throwing 1 bytes away.
[57565.808609] input: PS/2 Generic Mouse as /devices/platform/i8042/serio1/serio6/input/input20

and 2, bad:
[57533.017205] psmouse serio1: synaptics: serio: Synaptics pass-through port at isa0060/serio1/input0
[57533.105277] input: SynPS/2 Synaptics TouchPad as /devices/platform/i8042/serio1/input/input18
[57553.675233] psmouse serio1: synaptics: Touchpad model: 1, fw: 8.0, id: 0x1e2b1, caps: 0xd001a3/0x940300/0x120c00, board id: 1719, fw id: 727581

This is on 3.7.6
Comment 25 Arnaud Vandyck 2016-04-13 11:52:02 UTC
Fujitsu Lifebook E754, Debian testing, Linux 4.4.6-1 (2016-03-17) x86_64 GNU/Linux

...
[   11.040041] psmouse serio5: (null) at synaptics-pt/serio0/input0 lost synchronization, throwing 2 bytes away.
[   12.633371] input: PS/2 Generic Mouse as /devices/platform/i8042/serio2/serio5/input/input9
[   12.782945] psmouse serio2: TouchPad at isa0060/serio2/input0 lost sync at byte 1
[   12.783532] psmouse serio2: TouchPad at isa0060/serio2/input0 lost sync at byte 1
[   12.784136] psmouse serio2: TouchPad at isa0060/serio2/input0 lost sync at byte 1
[   12.784761] psmouse serio2: TouchPad at isa0060/serio2/input0 lost sync at byte 1
[   12.785281] psmouse serio2: TouchPad at isa0060/serio2/input0 lost sync at byte 1
[   12.785285] psmouse serio2: issuing reconnect request
...

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