Bug 209167 - Elantech TrackPoint loses sync and jumps to edge/corner on Thinkpad X13/T14s occasionally
Summary: Elantech TrackPoint loses sync and jumps to edge/corner on Thinkpad X13/T14s ...
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Input Devices (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_input-devices
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-06 11:42 UTC by Alexander Hahn
Modified: 2022-10-31 16:35 UTC (History)
17 users (show)

See Also:
Kernel Version: 5.9.8
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Contents of /proc/bus/input/devices (4.25 KB, text/plain)
2020-09-06 11:42 UTC, Alexander Hahn
Details
Fix jumpy trackpoint on T14s (832 bytes, patch)
2021-03-08 15:17 UTC, Oleg Trifonov
Details | Diff
Video of cursor jumping 18 times in under 9 minutes (2.09 MB, video/x-matroska)
2021-09-09 06:40 UTC, runrin
Details

Description Alexander Hahn 2020-09-06 11:42:10 UTC
Created attachment 292373 [details]
Contents of /proc/bus/input/devices

Sometimes when using the TrackPoint on a Thinkpad X13 (AMD) the mouse cursor jumps to a corner or edge, as if the speed has been increased to infinite for a fraction of a second.
After that, it is usable like it was before.
This happens around three times in five minutes, without any noticable pattern, but consistently.

When this happens (often but not always) the following output is printed to dmesg:
```
[16425.083792] psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
[16425.090651] psmouse serio1: Touchpad at isa0060/serio1/input0 - driver resynced.
```

If only the Touchpad is used, the above message does not appear at all, the Touchpad is working fine as expected. Therefore I assume, that the TrackPoint only loses sync if it is actively used.
Oddly the physical address `isa0060/serio1/input0` corresponds to the Touchpad and not the TrackPoint (see attached output of `cat /proc/bus/input/devices`)

I am running a fully updated Fedora 32 installation, kernel `5.8.4-200.fc32.x86_64`. I also tried the current mainline kernel `5.9.0-0.rc3.20200902git9c7d619be5a0.1.vanilla.2.fc32.x86_64`, where this issue is still present.
I was able to reproduce this on Manjaro Linux and Artix, so this must be a general kernel issue and not distribution-specific.

In this [review](https://redd.it/ht6sey) the same behaviour is observed on a T14s (AMD) (which shares its motherboard with the X13 (AMD)) running 5.7 mainline on Ubuntu.
>The trackpoint does work well and feels good, but sometimes it randomly jumps to the edge of the screen (doesn't happen very often, but it is annoying).

Therefore I assume that this is not a hardware failure but a bug in the kernel.

A possible workaround is adding `psmouse.proto=imps` or `psmouse.proto=bare` to the kernel command-line, but then of course touchpad gestures are missing (and I do encounter some weird double-clicks where I clicked a single time), so this is not a real option.
Comment 1 Alex Hofbauer 2020-12-23 20:19:53 UTC
I can observe this issue with a T14s AMD on 5.10.1.

Firmware ID says `PNP: LEN2143 PNP0f13`.


Setup at boot:
```
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX port at 0x60,0x64 irq 12
psmouse serio1: elantech: assuming hardware version 4 (with firmware version 0x7f3001)
psmouse serio1: elantech: Synaptics capabilities query result 0x90, 0x18, 0x0f.
psmouse serio1: elantech: Elan sample query result 00, 80, c9
psmouse serio1: elantech: Trying to set up SMBus access
psmouse serio1: elantech: SMbus companion is not ready yet
input: ETPS/2 Elantech TrackPoint as /devices/platform/i8042/serio1/input/input8
input: ETPS/2 Elantech Touchpad as /devices/platform/i8042/serio1/input/input6
```


Various occurrences:
```
Dec 23 11:54:25 shlep kernel: psmouse serio1: elantech: PS/2 packet [24 80 80 36 00 00]
Dec 23 11:56:16 shlep kernel: psmouse serio1: elantech: PS/2 packet [10 80 80 36 00 00]
Dec 23 11:58:31 shlep kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Dec 23 11:58:31 shlep kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 - driver resynced.
Dec 23 12:18:32 shlep kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Dec 23 12:18:32 shlep kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 - driver resynced.
Dec 23 12:19:42 shlep kernel: psmouse serio1: elantech: PS/2 packet [10 80 80 36 00 00]
Dec 23 12:27:15 shlep kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Dec 23 12:27:15 shlep kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 - driver resynced.
Dec 23 12:40:28 shlep kernel: psmouse serio1: elantech: PS/2 packet [34 80 80 36 00 00]
Dec 23 12:41:06 shlep kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Dec 23 12:41:06 shlep kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 - driver resynced.
Dec 23 12:44:54 shlep kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Dec 23 12:44:54 shlep kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Dec 23 12:44:54 shlep kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Dec 23 12:44:54 shlep kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Dec 23 12:44:54 shlep kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Dec 23 12:44:54 shlep kernel: psmouse serio1: issuing reconnect request
Dec 23 12:47:47 shlep kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Dec 23 12:47:47 shlep kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 - driver resynced.
Dec 23 13:02:48 shlep kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Dec 23 13:02:48 shlep kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 - driver resynced.
```

/proc/input/devices:
```
I: Bus=0011 Vendor=0002 Product=000e Version=0000
N: Name="ETPS/2 Elantech TrackPoint"
P: Phys=isa0060/serio1/input1
S: Sysfs=/devices/platform/i8042/serio1/input/input8
U: Uniq=
H: Handlers=mouse0 event6 
B: PROP=21
B: EV=7
B: KEY=70000 0 0 0 0
B: REL=3

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/input6
U: Uniq=
H: Handlers=mouse1 event7 
B: PROP=5
B: EV=b
B: KEY=e420 10000 0 0 0 0
B: ABS=661800011000003
```
Comment 2 Kim Lindberger 2020-12-30 21:55:26 UTC
I'm also experiencing this on a T14s Gen1 AMD (20UHCTO1WW/20UHCTO1WW, BIOS R1CET60W, 1.29) on 5.11.0-rc1.
Comment 3 shalzz 2021-01-17 05:48:57 UTC
Hello,

This is also affecting my Thinkpad E14 gen2 AMD RYZEN 7 4700U (LENOVO 20T6CTO1WW/20T6CTO1WW, BIOS R1AET33W (1.09 ) 10/26/2020).


However the issue is with the touchpad itself and not the trackpoint. Disabling the trackpoint in the BIOS settings does not resolve the issue of touchpad jumps. 


While having an enabled trackpoint, using the trackpoint does not have any cursor jumps.


revelant logs:
```
$ journalctl -b | grep psmouse
Jan 15 12:08:21 archlinux kernel: psmouse serio1: elantech: assuming hardware version 4 (with firmware version 0x5f3001)
Jan 15 12:08:21 archlinux kernel: psmouse serio1: elantech: Synaptics capabilities query result 0x90, 0x18, 0x0d.
Jan 15 12:08:21 archlinux kernel: psmouse serio1: elantech: Elan sample query result 00, 0d, a7
Jan 15 12:08:21 archlinux kernel: psmouse serio1: elantech: Trying to set up SMBus access
Jan 15 12:08:21 archlinux kernel: psmouse serio1: elantech: SMbus companion is not ready yet
Jan 15 12:09:37 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 15 12:09:37 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 15 12:09:38 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 15 12:09:39 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 15 12:09:40 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 15 12:09:40 shalzz-thinkpad kernel: psmouse serio1: issuing reconnect request
Jan 15 18:57:27 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 15 18:57:27 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 15 18:57:27 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 15 18:57:27 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 15 18:57:27 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 15 18:57:27 shalzz-thinkpad kernel: psmouse serio1: issuing reconnect request
Jan 15 23:44:34 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 15 23:44:34 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 15 23:44:51 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 15 23:44:51 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 15 23:44:51 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 15 23:44:51 shalzz-thinkpad kernel: psmouse serio1: issuing reconnect request
Jan 16 11:47:48 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 16 11:47:48 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 16 11:47:48 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 16 11:47:48 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 16 11:47:48 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 16 11:47:48 shalzz-thinkpad kernel: psmouse serio1: issuing reconnect request
Jan 16 12:58:21 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 16 12:58:21 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 16 12:58:21 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 16 12:58:21 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 16 12:58:21 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 16 12:58:21 shalzz-thinkpad kernel: psmouse serio1: issuing reconnect request
Jan 16 16:18:37 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 16 16:18:37 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 16 16:18:37 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 16 16:18:38 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 16 16:18:38 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 16 16:18:38 shalzz-thinkpad kernel: psmouse serio1: issuing reconnect request
Jan 17 11:09:10 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 17 11:09:25 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 17 11:09:25 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 17 11:09:25 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 17 11:09:25 shalzz-thinkpad kernel: psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
Jan 17 11:09:25 shalzz-thinkpad kernel: psmouse serio1: issuing reconnect request

```
Comment 4 shalzz 2021-01-17 05:50:08 UTC
kernel version: 5.10.7-arch1-1
Comment 5 async 2021-01-26 12:48:29 UTC
I have the exact same problem on all 5.8, 5.9 and 5.10 versions that I tried so far. 

Currently I'm running kubuntu 20.10 on

Linux x13 5.10.10-051010-generic #202101231639 SMP Sat Jan 23 17:16:37 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux


I regularly get in dmesg: 
[  199.662767] psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
[  199.669789] psmouse serio1: Touchpad at isa0060/serio1/input0 - driver resynced.

and the cursor jumps. 

On Windows 10 on the same machine this issue does not occur or is at least not noticeable.
Comment 6 async 2021-01-26 12:50:11 UTC
PS: also running a Thinkpad x13 with Ryzen 4750U
Comment 7 Oleg Trifonov 2021-02-26 19:50:29 UTC
Cursor jumps occur every few minutes while I'm using trackpoint.

Configuration:
ThinkPad T14s (AMD) 
BIOS: R1CET61W(1.30 )
Kernel: 5.8.0-44-generic (Default kernel of kubuntu 20.04.2)

My observations:
1. Some jumps correlate with "lost sync" from dmesg, but not all.
2. Some "lost sync" from dmesg correlate with jumps, but not all.

I turned on debug [1] and found a pattern of PS/2 packets that were causing jumps.
Some examples:
[00 80 80 36 80 80]
[10 00 80 26 00 80]
[11 00 80 26 00 80]
[30 00 00 06 00 00]
[20 80 00 16 80 00]

All of this is a valid "Native relative mode of a 6-byte packet" [2]. They are valid, but they report an extremely large relative movement [3].
Also, the second packet after that is invalid sometimes and  results in the loss of the sync message.
For example:
[ 1208.533558] psmouse serio1: elantech: PS/2 packet [30 00 00 06 00 00]
[ 1208.540623] psmouse serio1: elantech: PS/2 packet [30 00 00 00 00 00]
[ 1208.540631] psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
[ 1208.549088] psmouse serio1: elantech: PS/2 packet [30 00 00 06 ff fd]
[ 1208.549116] psmouse serio1: Touchpad at isa0060/serio1/input0 - driver resynced.

I don't know how find true cause of this behavior, so I made workaround on this level of stack:

diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index 053fe2d..5d7e13b 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -517,6 +517,16 @@ static void elantech_report_trackpoint(struct psmouse *psmouse,
        case 0x16008020U:
        case 0x26800010U:
        case 0x36808000U:
+               /* Drop and dump packet with unusual relative movements */
+               if ((packet[4] == 0x80) ||
+                   (packet[5] == 0x80) ||
+                   ((packet[1] == packet[4]) && (packet[4] == 0x00)) ||
+                   ((packet[2] == packet[5]) && (packet[5] == 0x00))) {
+                       if (etd->info.debug == 1)
+                               elantech_packet_dump(psmouse);
+                       break;
+               }
+
                x = packet[4] - (int)((packet[1]^0x80) << 1);
                y = (int)((packet[2]^0x80) << 1) - packet[5];

This workaround make trackpoint usable again for me. But dmesg still have lot of "lost sync" messages and I need recompile psmouse module for update kernel.

[1] https://www.kernel.org/doc/html/latest/input/devices/elantech.html#extra-knobs
[2] https://www.kernel.org/doc/html/latest/input/devices/elantech.html#native-relative-mode-6-byte-packet-format
[3] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/input/mouse/elantech.c?h=v5.11.2#n489
Comment 8 Kim Lindberger 2021-02-28 19:43:15 UTC
Thanks for the patch, Oleg! It works well for me!

I wonder if we could get some info from Elantech whether these packets are intentional and should be read in a different way or if the hardware is buggy and they should just be filtered out.

Also, looking at the documentation and comparing with your packet dump, I noticed that it doesn't match - in the docs 'sx' and 'sy' are swapped for byte 0.
Comment 9 Scott Miller 2021-03-08 14:14:54 UTC
That patch helps.  There is still a noticeable glitch in the mouse cursor but it seems to remain in roughly the same spot.

This has been driving me bonkers for the 6 months I've owned my T14S.  It also seems to be less prevalent on a fresh reboot and gets more frequent with increased uptime.  No idea why that would be.
Comment 10 Oleg Trifonov 2021-03-08 15:17:03 UTC
Created attachment 295733 [details]
Fix jumpy trackpoint on T14s

The previous version of the workaround doesn't cover some cases.
As example packet [00 80 80 36 00 f9] after calculation transform to x=0, y=-249.
My second version of the workaround fixes this. Worked great on my T14s the last few days.
Comment 11 Scott Miller 2021-03-08 15:58:09 UTC
Thanks!  Patching now to see if that gets rid of the rest.
Comment 12 Scott Miller 2021-03-15 04:04:12 UTC
Sorry, it's been a while but that fix has been working so well I forgot to note that I haven't seen the issue since I built the kernel with your patch.  Would still be nice to contact Elantech to determine what this was mean to be if not a bug.
Comment 13 async 2021-03-19 05:29:56 UTC
(In reply to Oleg Trifonov from comment #7)
> Cursor jumps occur every few minutes while I'm using trackpoint.
> 
> Configuration:
> ThinkPad T14s (AMD) 
> BIOS: R1CET61W(1.30 )
> Kernel: 5.8.0-44-generic (Default kernel of kubuntu 20.04.2)
> 
> My observations:
> 1. Some jumps correlate with "lost sync" from dmesg, but not all.
> 2. Some "lost sync" from dmesg correlate with jumps, but not all.
> 
> I turned on debug [1] and found a pattern of PS/2 packets that were causing
> jumps.
> Some examples:
> [00 80 80 36 80 80]
> [10 00 80 26 00 80]
> [11 00 80 26 00 80]
> [30 00 00 06 00 00]
> [20 80 00 16 80 00]
> 
> All of this is a valid "Native relative mode of a 6-byte packet" [2]. They
> are valid, but they report an extremely large relative movement [3].
> Also, the second packet after that is invalid sometimes and  results in the
> loss of the sync message.
> For example:
> [ 1208.533558] psmouse serio1: elantech: PS/2 packet [30 00 00 06 00 00]
> [ 1208.540623] psmouse serio1: elantech: PS/2 packet [30 00 00 00 00 00]
> [ 1208.540631] psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync
> at byte 6
> [ 1208.549088] psmouse serio1: elantech: PS/2 packet [30 00 00 06 ff fd]
> [ 1208.549116] psmouse serio1: Touchpad at isa0060/serio1/input0 - driver
> resynced.
> 
> I don't know how find true cause of this behavior, so I made workaround on
> this level of stack:
> 
> diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
> index 053fe2d..5d7e13b 100644
> --- a/drivers/input/mouse/elantech.c
> +++ b/drivers/input/mouse/elantech.c
> @@ -517,6 +517,16 @@ static void elantech_report_trackpoint(struct psmouse
> *psmouse,
>         case 0x16008020U:
>         case 0x26800010U:
>         case 0x36808000U:
> +               /* Drop and dump packet with unusual relative movements */
> +               if ((packet[4] == 0x80) ||
> +                   (packet[5] == 0x80) ||
> +                   ((packet[1] == packet[4]) && (packet[4] == 0x00)) ||
> +                   ((packet[2] == packet[5]) && (packet[5] == 0x00))) {
> +                       if (etd->info.debug == 1)
> +                               elantech_packet_dump(psmouse);
> +                       break;
> +               }
> +
>                 x = packet[4] - (int)((packet[1]^0x80) << 1);
>                 y = (int)((packet[2]^0x80) << 1) - packet[5];
> 
> This workaround make trackpoint usable again for me. But dmesg still have
> lot of "lost sync" messages and I need recompile psmouse module for update
> kernel.
> 
> [1]
> https://www.kernel.org/doc/html/latest/input/devices/elantech.html#extra-
> knobs
> [2]
> https://www.kernel.org/doc/html/latest/input/devices/elantech.html#native-
> relative-mode-6-byte-packet-format
> [3]
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/
> drivers/input/mouse/elantech.c?h=v5.11.2#n489


Thank you, you helped me kept my sanity. I built your patch on top of 5.11.7 on kubuntu 20.11. It's working well so far, no jumps but dmesg for me is also still showing these issues: 
[  191.307627] psmouse serio1: elantech: discarding packet [30 00 00 06 fa 00]
[  191.314326] psmouse serio1: elantech: discarding packet [00 80 80 36 00 fc]
[  344.500283] psmouse serio1: elantech: PS/2 packet [00 80 00 16 00 00]
[  669.690220] psmouse serio1: elantech: discarding packet [00 80 80 36 80 80]
[  669.697279] psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
[  669.707070] psmouse serio1: Touchpad at isa0060/serio1/input0 - driver resynced.
Comment 14 GerryT 2021-07-07 19:00:26 UTC
Thanks for the bugfix for this annoying Elantech Trackpoint hardware/firmware bug.

Is there an estimated time when this bug fix will be merged into the official kernel?

This Elantech Trackpoint bug affects users of Lenovo Thinkpad X13 and T14s (and probably also A475). The following discussion in the Lenovo forum confirms this. I experience the same problem on my T14s(AMD) 20ujs00k00. 
https://forums.lenovo.com/t5/Fedora/T14s-AMD-Trackpoint-almost-unusable/m-p/5064952?page=1
Comment 15 GerryT 2021-07-11 21:07:55 UTC
Is the bugfix suitable for all Elantech Trackpoint hardware configurations? I encounter the same bug on a Thinkpad T14s (AMD) 20ujs00k00 and would like to know whether my configuration is covered by the bugfix. Thanks!

These are my hardware details:

* cat /proc/bus/input/devices gives me: *

I: Bus=0011 Vendor=0002 Product=000e Version=0000
N: Name="ETPS/2 Elantech TrackPoint"
P: Phys=isa0060/serio1/input1
S: Sysfs=/devices/platform/i8042/serio1/input/input8
U: Uniq=
H: Handlers=mouse0 event6
B: PROP=21
B: EV=7
B: KEY=70000 0 0 0 0
B: REL=3

* journalctl -b gives me following: *

kernel: psmouse serio1: elantech: assuming hardware version 4 (with firmware version 0x7f3001)
kernel: psmouse serio1: elantech: Synaptics capabilities query result 0x90, 0x18, 0x0f.
kernel: usb 6-4: new full-speed USB device number 3 using xhci_hcd
kernel: psmouse serio1: elantech: Elan sample query result 00, 80, c9
kernel: psmouse serio1: elantech: Elan ic body: 0x10, current fw version: 0x3
kernel: psmouse serio1: elantech: Trying to set up SMBus access
kernel: psmouse serio1: elantech: SMbus companion is not ready yet
kernel: input: ETPS/2 Elantech TrackPoint as /devices/platform/i8042/serio1/input/input8
kernel: input: ETPS/2 Elantech Touchpad as /devices/platform/i8042/serio1/input/input6

[...]

gnome-shell[2021]: libinput error: event6 - ETPS/2 Elantech TrackPoint: client bug: event processing lagging behind by 13ms, your system is too slow

[...]

gnome-shell[2021]: libinput error: event6 - ETPS/2 Elantech TrackPoint: WARNING: log rate limit exceeded (5 msgs per 60min). Discarding future messages.
Comment 16 PhoenixH 2021-07-29 00:30:59 UTC
Thanks @Oleg Trifonov.
Currently this bugfix is ok, elan will upload this patch to the linux kernel.
Comment 17 async 2021-08-09 04:55:07 UTC
(In reply to PhoenixH from comment #16)
> Thanks @Oleg Trifonov.
> Currently this bugfix is ok, elan will upload this patch to the linux kernel.

Do you have a timeline for the integration to know when it will be integrated and in which version?
Comment 18 GerryT 2021-08-10 20:57:29 UTC
If I am not mistaken, this is the submitted patch: https://patchwork.kernel.org/project/linux-input/list/?series=523049

It would be great, if someone could review/approve this submitted patch. This would help many Thinkpad/Elantech users. Thanks a lot!
Comment 19 runrin 2021-08-15 08:01:08 UTC
I would really appreciate a bug fix for this. Currently my cursor jumps to the corners of the screen every few minutes and my laptop is nearly unusable without a mouse because of it.
Comment 20 async 2021-08-23 14:55:57 UTC
Looks like no progress to get this approved or reviewed. Is there anything to accelerate getting this into a kernel version?
Comment 21 Trace 2021-08-24 07:25:54 UTC
(In reply to async from comment #20)
> Looks like no progress to get this approved or reviewed. Is there anything
> to accelerate getting this into a kernel version?

they'll do it in that day when you buy a new laptop or never :)))
Comment 22 Trace 2021-08-24 07:43:49 UTC
My cursor no longer jumps with this bag fix, but sometimes when selecting text, the selection is reset or wrapped to another line, depending on the capabilities of the program in which I select the text
Comment 23 GerryT 2021-08-30 10:27:08 UTC
The submitted patch is still pending https://patchwork.kernel.org/project/linux-input/list/?series=523049 and has not yet found a reviewer/delegate. 

Is here anyone who could review/approve the patch? Thanks!
Comment 24 GerryT 2021-08-30 10:29:07 UTC
(In reply to Trace from comment #22)
> My cursor no longer jumps with this bag fix, but sometimes when selecting
> text, the selection is reset or wrapped to another line, depending on the
> capabilities of the program in which I select the text

Do you consider your observation (sometimes selection is reset or wrapped to another line) as a severe problem or is it unproblematic?
Comment 25 Daniel Nelson 2021-08-30 17:04:48 UTC
This patch makes this touchpoint function much better, I no longer want to throw my laptop out the window, but I agree that its not totally fixed.  I still get frequent errors in dmesg:

psmouse serio1: elantech: PS/2 packet [10 80 80 36 00 00]

I also use middle mouse button scrolling, where you hold the middle mouse button and scroll with the touchpoint, which should hold the mouse position but scroll up/down.  Little hiccups in the driver like this appear to cause the touchpoint to drop out of scroll mode, as if the middle mouse button was unpressed even though it is still being held.
Comment 26 Trace 2021-08-30 18:34:30 UTC
(In reply to GerryT from comment #24)
> (In reply to Trace from comment #22)
> > My cursor no longer jumps with this bag fix, but sometimes when selecting
> > text, the selection is reset or wrapped to another line, depending on the
> > capabilities of the program in which I select the text
> 
> Do you consider your observation (sometimes selection is reset or wrapped to
> another line) as a severe problem or is it unproblematic?

Yes I do, since it all happens uncontrollably.
By the way, one more thing that happens with the middle button is that it also inserts text spontaneously, I have already screwed up several documents, because I don't always see that the pressed middle button worked like a ctrl + v ((
Comment 27 runrin 2021-09-04 04:33:15 UTC
(In reply to Trace from comment #26)
> By the way, one more thing that happens with the middle button is that it
> also inserts text spontaneously, I have already screwed up several
> documents, because I don't always see that the pressed middle button worked
> like a ctrl + v ((

This is just the default behavior of X11, it has nothing to do with this bug. Whenever you highlight text it gets copied into the primary X selection. When you hit middle mouse, it will paste whatever was highlighted.

I use this utility to avoid pasting all over the place while scrolling with middle mouse and the trackpoint: https://github.com/milaq/XMousePasteBlock
Comment 28 Trace 2021-09-04 10:00:10 UTC
(In reply to runrin from comment #27)
> (In reply to Trace from comment #26)
> > By the way, one more thing that happens with the middle button is that it
> > also inserts text spontaneously, I have already screwed up several
> > documents, because I don't always see that the pressed middle button worked
> > like a ctrl + v ((
> 
> This is just the default behavior of X11, it has nothing to do with this
> bug. Whenever you highlight text it gets copied into the primary X
> selection. When you hit middle mouse, it will paste whatever was highlighted.
> 
> I use this utility to avoid pasting all over the place while scrolling with
> middle mouse and the trackpoint: https://github.com/milaq/XMousePasteBlock

hmm, and then why does this rarely happen?

anyway thank you i'll try XMousePasteBlock
Comment 29 runrin 2021-09-09 06:40:40 UTC
Created attachment 298715 [details]
Video of cursor jumping 18 times in under 9 minutes

Here's a video of my cursor jumping on average twice a minute with the syslog in the background. The video is sped up to 2x speed.

I am using only the trackpoint, and moving my cursor around the screen as you would when using a graphical application.

This is how frequently my cursor jumps while using my machine every day. In the process of just editing this comment, it has jumped three times.
Comment 30 Trace 2021-09-09 11:27:32 UTC
https://forums.lenovo.com/t5/Fedora/T14s-AMD-Trackpoint-almost-unusable/m-p/5064952?page=4


"That patch really needs the proposer to answer the question - but I'll see if I can test and answer for them. I was having a lot of trouble reproducing last time I tried...

I'll follow up with Elantech as well - I haven't heard any updates and it seems stalled. I agree this would seem better fixed by firmware rather than workarounds :(

Mark"
Comment 31 shalzz 2021-11-07 07:40:56 UTC
There's a firmware update[1] of the Elan touchpad for a few Thinkpad devices, however there is not way of flashing it via Linux, even to confirm whether it fixes this issues or not. :/

[1]: https://support.lenovo.com/in/en/downloads/ds545898-elan-touchpad-firmware-for-windows-10-thinkpad-e14-gen-2
Comment 32 felixg3 2021-11-16 22:38:22 UTC
(In reply to shalzz from comment #31)
> There's a firmware update[1] of the Elan touchpad for a few Thinkpad
> devices, however there is not way of flashing it via Linux, even to confirm
> whether it fixes this issues or not. :/
> 
> [1]:
> https://support.lenovo.com/in/en/downloads/ds545898-elan-touchpad-firmware-
> for-windows-10-thinkpad-e14-gen-2

Hi, the mentioned firmware update is incompatible with X13/T14s Gen 1 models. I could not install it using Windows.
The issue persists as of Kernel 5.14.x, Lenovo isn't concerned with this issue, as no progress has been made since 14 months.
Comment 34 Trace 2022-01-05 22:50:53 UTC
(In reply to Trace from comment #33)
> kernel 5.15.3 finally included this fix
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/
> drivers/input/mouse/elantech.c?h=v5.15.
> 3&id=4f43e1c69280313f121283cb5c16e5e0b1036b3a

Anyway, sometimes the cursor behaves strangely, but this is rare and for a split second...

and tired of seeing these errors in dmsg:

psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
psmouse serio1: issuing reconnect request
psmouse serio1: elantech: discarding packet [10 00 80 26 00 80]
psmouse serio1: Touchpad at isa0060/serio1/input0 lost sync at byte 6
psmouse serio1: Touchpad at isa0060/serio1/input0 - driver resynced
Comment 35 Dennis Gnad 2022-10-31 16:35:59 UTC
I have the same error on a Thinkpad E14 Gen4 still with the discarding packet involved. I risked it and managed to overwrite the Elantech Firmware using the Firmware update for a Thinkpad P53. The tool linked for the Thinkpad E14 Gen2/Gen3 suggested firmware "FW05" can not be updated because it is older than mine. That tool from the P53 is "1.0.2.0" and performed the update. Not sure which was the version that I had (no way to see it). I have probably downgraded it now, accidentally. Anyway, that "1.0.2.0" apparently still has the same problem.

My problem is negligible during normal use, however when using Virtualbox, it will not receive any working inputs after that event anymore, requiring a hard shutdown of the virtual machine. A real showstopper for its use.

Website Firmware P53: https://pcsupport.lenovo.com/us/en/products/laptops-and-netbooks/thinkpad-p-series-laptops/thinkpad-p53-type-20qn-20qq/20qn/downloads/DS505655

Website Firmware E14 Gen2/3: https://pcsupport.lenovo.com/in/en/downloads/ds545898-elan-touchpad-firmware-for-windows-10-thinkpad-e14-gen-2

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