On Mon, Jul 17, 2023 at 2:59 PM Jonathan Denose <jdenose@xxxxxxxxxxxx> wrote: > > Hello, > > I am on a Lenovo N24 laptop. > > When this device resumes after closing the lid, the mouse freezes and > is unusable. After right-clicking multiple times the touchpad resumes > working. I am seeing the following in the logs: > > [ 1188.690138] psmouse serio1: Touchpad at isa0060/serio1/input0 lost > sync at byte 6 > [ 1188.699636] psmouse serio1: Touchpad at isa0060/serio1/input0 lost > sync at byte 6 > [ 1188.709124] psmouse serio1: Touchpad at isa0060/serio1/input0 lost > sync at byte 6 > [ 1188.718557] psmouse serio1: Touchpad at isa0060/serio1/input0 lost > sync at byte 6 > [ 1188.728110] psmouse serio1: Touchpad at isa0060/serio1/input0 lost > sync at byte 6 > [ 1188.975964] psmouse serio1: Touchpad at isa0060/serio1/input0 lost > sync at byte 6 > [ 1188.985456] psmouse serio1: Touchpad at isa0060/serio1/input0 lost > sync at byte 6 > [ 1188.994954] psmouse serio1: Touchpad at isa0060/serio1/input0 lost > sync at byte 6 > [ 1189.004443] psmouse serio1: Touchpad at isa0060/serio1/input0 lost > sync at byte 6 > [ 1189.013930] psmouse serio1: Touchpad at isa0060/serio1/input0 lost > sync at byte 6 > > This device has an ETPS/2 Elantech Touchpad. I am on kernel version: > 5.15.117-19629-gf1eb3139d206. > > Greg KH suggested that I try later kernel versions, and I've tried 6.4 > and 6.1 and the issue is present on both of those versions. This issue > is also present on 5.10. > > Currently the device suspends to ram when the lid closes. When the > device idles without the lid closing, the touchpad works fine on > resume. > > I have tried adding various i8042 and psmouse kernel parameters from > searching different forums related to these error messages, but none > of them fix the issue. I have tried > - psmouse.resetafter=0 > - psmouse.resetafter=1 > - i8042.nomux=1 > - i8042.resetafter=1/0 > - i8042.reset=1 i8042.nomux=1 > - i8042.noloop=1 i8042.nopnp=1 i8042.nomux=1 i8042.reset=1 > > I was able to resolve this issue by doing `modprobe -r psmouse && > modprobe.psmouse proto=imps`. proto=bare and proto=exps also resolve > the issue. However, with those options enabled I can no longer use > gestures like two-finger scroll. > > This issue reproduces on ChromeOS Flex and Ubuntu 22.04 but not on > Windows. On Windows the touchpad resuming after closing the lid works > fine. > > What can I do to resolve this issue while also keeping touchpad gestures? > > Any help is greatly appreciated! Hello, As an update, this error is getting thrown from case 4 in elantech_process_byte: ``` static psmouse_ret_t elantech_process_byte(struct psmouse *psmouse) { ... case 4: packet_type = elantech_packet_check_v4(psmouse); switch (packet_type) { case PACKET_UNKNOWN: return PSMOUSE_BAD_DATA; case PACKET_TRACKPOINT: elantech_report_trackpoint(psmouse, packet_type); break; default: elantech_report_absolute_v4(psmouse, packet_type); break; } break; } return PSMOUSE_FULL_PACKET; } ``` The issue is fixed by running `rmmod psmouse && modprobe psmouse` but I haven't found a good way to replicate that in code for the failure case.