Re: PROBLEM: Missing events on thinkpad trackpoint buttons
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2015-08-20 21:35:31
Subsystem:
input (keyboard, mouse, joystick, touchscreen) drivers, the rest · Maintainers:
Dmitry Torokhov, Linus Torvalds
Hi Gabor, On Thu, Aug 20, 2015 at 10:50:27PM +0200, Gabor Balla wrote:
quoted hunk ↗ jump to hunk
Hi, I could also reproduce this issue using a T450s, but have probably found the issue behind it. At some point a new PS/2 mode was introduced by Synaptics, called EWmode. This can be enabled by setting bit 2 of the mode byte. But previously this bit was used for 'Disable Gesture', whatever that stands for, and it was reused for selecting EWmode. Now if plain Wmode is selected, with bit 0 of the mode byte, than disable gesture is on by default and bit 2 selects EWmode instead. Reference: http://www.synaptics.com/sites/default/files/511-000275-01_RevB.pdf The current implementation of the driver doesn't take EWmode into account, and enables it, when setting both Wmode and what it thinks to be the disable gesture bit. It is probably selecting EWmode that causes the glitch. A quick fix follows: diff -ru a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c--- a/drivers/input/mouse/synaptics.c2015-08-20 22:25:05.261546729 +0200 +++ b/drivers/input/mouse/synaptics.c2015-08-20 22:21:28.560038539 +0200@@ -521,7 +521,7 @@ priv->mode = 0; if (priv->absolute_mode) priv->mode |= SYN_BIT_ABSOLUTE_MODE; -if (priv->disable_gesture && !SYN_CAP_EXTENDED(priv->capabilities)) +if (priv->disable_gesture)
It looks like the patch "direction" is reverted. Also, the presence of extended capabilities is not the indication that gesture mode should not be used: in relative mode bit 2 disables gesture reporting, in absolute mode it enables Extended W-mode. Does the patch below also work for you? Thanks. -- Dmitry Input: synaptics - fix handling of disabling gesture mode Bit 2 of the mode byte only disables gesture reporting when touchpad is in relative mode, when in absolute mode it activates the so-called Extended W-mode that confuses driver and causes missing button presses on some Thinkpads (x250, T450s). Reported-by: Nick Bowler <redacted> Suggested-by: Gabor Balla <redacted> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> --- drivers/input/mouse/synaptics.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 28daca1..97c5dde 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c@@ -519,12 +519,15 @@ static int synaptics_set_mode(struct psmouse *psmouse) struct synaptics_data *priv = psmouse->private; priv->mode = 0; + if (priv->absolute_mode) priv->mode |= SYN_BIT_ABSOLUTE_MODE; - if (priv->disable_gesture) + else if (priv->disable_gesture) priv->mode |= SYN_BIT_DISABLE_GESTURE; + if (psmouse->rate >= 80) priv->mode |= SYN_BIT_HIGH_RATE; + if (SYN_CAP_EXTENDED(priv->capabilities)) priv->mode |= SYN_BIT_W_MODE;
@@ -1482,7 +1485,7 @@ static int __synaptics_init(struct psmouse *psmouse, bool absolute_mode) } priv->absolute_mode = absolute_mode; - if (SYN_ID_DISGEST_SUPPORTED(priv->identity)) + if (!absolute_mode && SYN_ID_DISGEST_SUPPORTED(priv->identity)) priv->disable_gesture = true; /*