linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: PROBLEM: Missing events on thinkpad trackpoint buttons
@ 2015-08-20 20:50 Gabor Balla
  2015-08-20 21:35 ` Dmitry Torokhov
  0 siblings, 1 reply; 25+ messages in thread
From: Gabor Balla @ 2015-08-20 20:50 UTC (permalink / raw)
  To: linux-input

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)
 priv->mode |= SYN_BIT_DISABLE_GESTURE;
 if (psmouse->rate >= 80)
 priv->mode |= SYN_BIT_HIGH_RATE;

Regards,
Gabor

^ permalink raw reply	[flat|nested] 25+ messages in thread
* PROBLEM: Missing events on thinkpad trackpoint buttons
@ 2015-08-18  2:31 Nick Bowler
  2015-08-18 19:06 ` Benjamin Tissoires
  0 siblings, 1 reply; 25+ messages in thread
From: Nick Bowler @ 2015-08-18  2:31 UTC (permalink / raw)
  To: linux-input

Hi,

I'm not sure if this is actually a Linux issue but figured I'd at least
report it here to start...

I have a Lenovo Thinkpad X250, with the newfangled trackpoint buttons.
I have a problem with missing button press or release events: sometimes
pressing a button has no effect, and sometimes releasing a button has no
effect (the latter is especially annoying, as the button remains depressed
as far as any applications are concerned).

After some testing, the problem apparently depends on the position of my
hands over the touchpad.  I can reliably reproduce it as follows: place
two fingers on the touchpad, then press the button repeatedly.  Watching
with evtest, several events (could be either press or release) will
simply be missin, although the kernel never does anything weird like
send two release events in a row.  There are no problems if there are
0 or 1 fingers on the touchpad.

My current kernel version is 4.1.6, although the problem occurs in all
versions that I tried.

Here is the evtest result from placing two fingers on the touchpad, then
pressing the left trackpoint button 10 times, counting 1 second between
each press.  As you can see, only 3 presses and 3 release events total
were sent by the kernel, sometimes with many physical button presses
between the press and its corresponding release:

  Input driver version is 1.0.1
  Input device ID: bus 0x11 vendor 0x2 product 0xa version 0x0
  Input device name: "TPPS/2 IBM TrackPoint"
  Supported events:
    Event type 0 (EV_SYN)
    Event type 1 (EV_KEY)
      Event code 272 (BTN_LEFT)
      Event code 273 (BTN_RIGHT)
      Event code 274 (BTN_MIDDLE)
    Event type 2 (EV_REL)
      Event code 0 (REL_X)
      Event code 1 (REL_Y)
  Properties:
    Property type 0 (INPUT_PROP_POINTER)
    Property type 5 (?)
  Testing ... (interrupt to exit)
  Event: time 1439863173.241278, type 1 (EV_KEY), code 272 (BTN_LEFT), value 1
  Event: time 1439863173.241278, -------------- SYN_REPORT ------------
  Event: time 1439863180.610511, type 1 (EV_KEY), code 272 (BTN_LEFT), value 0
  Event: time 1439863180.610511, -------------- SYN_REPORT ------------
  Event: time 1439863182.162257, type 1 (EV_KEY), code 272 (BTN_LEFT), value 1
  Event: time 1439863182.162257, -------------- SYN_REPORT ------------
  Event: time 1439863185.749212, type 1 (EV_KEY), code 272 (BTN_LEFT), value 0
  Event: time 1439863185.749212, -------------- SYN_REPORT ------------
  Event: time 1439863187.145478, type 1 (EV_KEY), code 272 (BTN_LEFT), value 1
  Event: time 1439863187.145478, -------------- SYN_REPORT ------------
  Event: time 1439863189.162652, type 1 (EV_KEY), code 272 (BTN_LEFT), value 0
  Event: time 1439863189.162652, -------------- SYN_REPORT ------------

For reference: the same test was repeated with only one finger on the
touchpad; all events are delivered properly in this case:

  Input driver version is 1.0.1
  Input device ID: bus 0x11 vendor 0x2 product 0xa version 0x0
  Input device name: "TPPS/2 IBM TrackPoint"
  Supported events:
    Event type 0 (EV_SYN)
    Event type 1 (EV_KEY)
      Event code 272 (BTN_LEFT)
      Event code 273 (BTN_RIGHT)
      Event code 274 (BTN_MIDDLE)
    Event type 2 (EV_REL)
      Event code 0 (REL_X)
      Event code 1 (REL_Y)
  Properties:
    Property type 0 (INPUT_PROP_POINTER)
    Property type 5 (?)
  Testing ... (interrupt to exit)
  Event: time 1439863147.840979, type 1 (EV_KEY), code 272 (BTN_LEFT), value 1
  Event: time 1439863147.840979, -------------- SYN_REPORT ------------
  Event: time 1439863147.919313, type 1 (EV_KEY), code 272 (BTN_LEFT), value 0
  Event: time 1439863147.919313, -------------- SYN_REPORT ------------
  Event: time 1439863149.198783, type 1 (EV_KEY), code 272 (BTN_LEFT), value 1
  Event: time 1439863149.198783, -------------- SYN_REPORT ------------
  Event: time 1439863149.285873, type 1 (EV_KEY), code 272 (BTN_LEFT), value 0
  Event: time 1439863149.285873, -------------- SYN_REPORT ------------
  Event: time 1439863150.673035, type 1 (EV_KEY), code 272 (BTN_LEFT), value 1
  Event: time 1439863150.673035, -------------- SYN_REPORT ------------
  Event: time 1439863150.780064, type 1 (EV_KEY), code 272 (BTN_LEFT), value 0
  Event: time 1439863150.780064, -------------- SYN_REPORT ------------
  Event: time 1439863152.204741, type 1 (EV_KEY), code 272 (BTN_LEFT), value 1
  Event: time 1439863152.204741, -------------- SYN_REPORT ------------
  Event: time 1439863152.321820, type 1 (EV_KEY), code 272 (BTN_LEFT), value 0
  Event: time 1439863152.321820, -------------- SYN_REPORT ------------
  Event: time 1439863153.698388, type 1 (EV_KEY), code 272 (BTN_LEFT), value 1
  Event: time 1439863153.698388, -------------- SYN_REPORT ------------
  Event: time 1439863153.834195, type 1 (EV_KEY), code 272 (BTN_LEFT), value 0
  Event: time 1439863153.834195, -------------- SYN_REPORT ------------
  Event: time 1439863155.181776, type 1 (EV_KEY), code 272 (BTN_LEFT), value 1
  Event: time 1439863155.181776, -------------- SYN_REPORT ------------
  Event: time 1439863155.308142, type 1 (EV_KEY), code 272 (BTN_LEFT), value 0
  Event: time 1439863155.308142, -------------- SYN_REPORT ------------
  Event: time 1439863156.723367, type 1 (EV_KEY), code 272 (BTN_LEFT), value 1
  Event: time 1439863156.723367, -------------- SYN_REPORT ------------
  Event: time 1439863156.849475, type 1 (EV_KEY), code 272 (BTN_LEFT), value 0
  Event: time 1439863156.849475, -------------- SYN_REPORT ------------
  Event: time 1439863158.294692, type 1 (EV_KEY), code 272 (BTN_LEFT), value 1
  Event: time 1439863158.294692, -------------- SYN_REPORT ------------
  Event: time 1439863158.419989, type 1 (EV_KEY), code 272 (BTN_LEFT), value 0
  Event: time 1439863158.419989, -------------- SYN_REPORT ------------
  Event: time 1439863159.846138, type 1 (EV_KEY), code 272 (BTN_LEFT), value 1
  Event: time 1439863159.846138, -------------- SYN_REPORT ------------
  Event: time 1439863159.962375, type 1 (EV_KEY), code 272 (BTN_LEFT), value 0
  Event: time 1439863159.962375, -------------- SYN_REPORT ------------
  Event: time 1439863161.591024, type 1 (EV_KEY), code 272 (BTN_LEFT), value 1
  Event: time 1439863161.591024, -------------- SYN_REPORT ------------
  Event: time 1439863161.688792, type 1 (EV_KEY), code 272 (BTN_LEFT), value 0
  Event: time 1439863161.688792, -------------- SYN_REPORT ------------

Any thoughts?

Thanks,
  Nick

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2015-09-29  0:26 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-20 20:50 PROBLEM: Missing events on thinkpad trackpoint buttons Gabor Balla
2015-08-20 21:35 ` Dmitry Torokhov
2015-08-20 22:24   ` Gabor Balla
2015-08-20 22:42     ` Gabor Balla
2015-08-20 22:56     ` Dmitry Torokhov
2015-08-20 23:01       ` Dmitry Torokhov
2015-08-20 23:05         ` Gabor Balla
2015-08-20 23:08           ` Dmitry Torokhov
2015-08-20 23:13             ` Dmitry Torokhov
2015-08-20 23:35               ` Gabor Balla
2015-08-21  0:06                 ` Dmitry Torokhov
2015-08-24 17:57               ` Dmitry Torokhov
2015-08-24 23:44                 ` Nick Bowler
     [not found]               ` <CAN+gG=H88uVbRun=Vs1r1b8jM=wpnC1285BquFpDsh8HQdr07Q@mail.gmail.com>
2015-09-27 12:14                 ` Benjamin Tissoires
2015-09-28 22:52                   ` Dmitry Torokhov
2015-09-29  0:22                     ` Nick Bowler
2015-09-29  0:26                       ` Dmitry Torokhov
  -- strict thread matches above, loose matches on Subject: below --
2015-08-18  2:31 Nick Bowler
2015-08-18 19:06 ` Benjamin Tissoires
2015-08-19 13:52   ` Benjamin Tissoires
2015-08-19 14:10     ` Nick Bowler
2015-08-19 14:12       ` Benjamin Tissoires
2015-08-19 21:27     ` Dmitry Torokhov
2015-08-19 21:33       ` Stephen Chandler Paul
2015-08-19 21:34       ` Benjamin Tissoires

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).