summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/user/touchpad-jumping-cursors.rst14
-rw-r--r--src/evdev-mt-touchpad.c13
2 files changed, 27 insertions, 0 deletions
diff --git a/doc/user/touchpad-jumping-cursors.rst b/doc/user/touchpad-jumping-cursors.rst
index f1c49d74..e1b065a1 100644
--- a/doc/user/touchpad-jumping-cursors.rst
+++ b/doc/user/touchpad-jumping-cursors.rst
@@ -64,3 +64,17 @@ See :ref:`reporting_bugs` for more details.
Note that it most cases, libinput cannot actually fix the issue. Filing a
bug is useful to figure out if there are other factors at play or whether
there are heuristics we can employ to reduce the impact.
+
+------------------------------------------------------------------------------
+AlpsPS/2 ALPS DualPoint TouchPad jumping to 4095/0
+------------------------------------------------------------------------------
+
+A special case of pointer jumps happens on ``AlpsPS/2 ALPS DualPoint TouchPad``
+devices found in the Lenovo ThinkPad E465 and E550 and likely others with
+the same touchpad hardware. On those devices, the touchpad occasionally
+sends an event for the second finger to move to position 4095/0 before
+moving back to the original position. libinput detects this movement and
+removes it but depending on the interaction this may cause a smaller jump
+later when the coordinates reset to the new position of the finger.
+
+Some more information is available in `Gitlab Issue #492 <https://gitlab.freedesktop.org/libinput/libinput/-/issues/492>`__.
diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index d8db704b..4c017c35 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -1549,6 +1549,19 @@ tp_detect_jumps(const struct tp_dispatch *tp,
abs_distance = hypot(mm.x, mm.y) * reference_interval/tdelta;
rel_distance = abs_distance - t->jumps.last_delta_mm;
+ /* Special case for the ALPS devices in the Lenovo ThinkPad E465,
+ * E550. These devices send occasional 4095/0 events on two fingers
+ * before snapping back to the correct position.
+ * https://gitlab.freedesktop.org/libinput/libinput/-/issues/492
+ * The specific values are hardcoded here, if this ever happens on
+ * any other device we can make it absmax/absmin instead.
+ */
+ if (tp->device->model_flags & EVDEV_MODEL_ALPS_SERIAL_TOUCHPAD &&
+ t->point.x == 4095 && t->point.y == 0) {
+ t->point = last->point;
+ return true;
+ }
+
/* Cursor jump if:
* - current single-event delta is >20mm, or
* - we increased the delta by over 7mm within a 12ms frame.