Skip to content

Commit eeb0655

Browse files
Eric Miaodtor
authored andcommitted
Input: synaptics - fix sync lost after resume on some laptops
In summary, the symptom is intermittent key events lost after resume on some machines with synaptics touchpad (seems this is synaptics _only_), and key events loss is due to serio port reconnect after psmouse sync lost. Removing psmouse and inserting it back during the suspend/resume process is able to work around the issue, so the difference between psmouse_connect() and psmouse_reconnect() is the key to the root cause of this problem. After comparing the two different paths, synaptics driver has its own implementation of synaptics_reconnect(), and the missing psmouse_probe() seems significant, the patch below added psmouse_probe() to the reconnect process, and has been verified many times that the issue could not be reliably reproduced. There are two PS/2 commands in psmouse_probe(): 1. PSMOUSE_CMD_GETID 2. PSMOUSE_CMD_RESET_DIS Only the PSMOUSE_CMD_GETID seems to be significant. The PSMOUSE_CMD_RESET_DIS is irrelevant to this issue after trying several times. So we have only implemented this patch to issue the PSMOUSE_CMD_GETID so far. Tested-by: Daniel Manrique <daniel.manrique@canonical.com> Signed-off-by: James M Leddy <james.leddy@canonical.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent c73a1af commit eeb0655

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎drivers/input/mouse/synaptics.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1379,6 +1379,7 @@ static int synaptics_reconnect(struct psmouse *psmouse)
13791379
{
13801380
struct synaptics_data *priv = psmouse->private;
13811381
struct synaptics_data old_priv = *priv;
1382+
unsigned char param[2];
13821383
int retry = 0;
13831384
int error;
13841385

@@ -1394,6 +1395,7 @@ static int synaptics_reconnect(struct psmouse *psmouse)
13941395
*/
13951396
ssleep(1);
13961397
}
1398+
ps2_command(&psmouse->ps2dev, param, PSMOUSE_CMD_GETID);
13971399
error = synaptics_detect(psmouse, 0);
13981400
} while (error && ++retry < 3);
13991401

0 commit comments

Comments
 (0)