From 40762142f01301f2aa773c5a65458a3260fe3ebf Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 19 May 2016 16:07:12 +1000 Subject: [PATCH] Disable negative pressure transition on non-synaptics pads to avoid jerky movement (#1335249) --- ...e-negative-pressure-change-check-on-.patch | 46 +++++++++++++++++++ libinput.spec | 9 +++- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 0001-touchpad-only-use-negative-pressure-change-check-on-.patch diff --git a/0001-touchpad-only-use-negative-pressure-change-check-on-.patch b/0001-touchpad-only-use-negative-pressure-change-check-on-.patch new file mode 100644 index 0000000..f7315e3 --- /dev/null +++ b/0001-touchpad-only-use-negative-pressure-change-check-on-.patch @@ -0,0 +1,46 @@ +From 2f5231cc88fccf389a78270d827f6c9201b86794 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Wed, 18 May 2016 07:35:36 +1000 +Subject: [PATCH libinput] touchpad: only use negative pressure change check on + Lenovo *50 and *60 series + +This was introduced for bug 94379 - an X1 Carbon 3rd. Other touchpads have +different pressure change ranges, causing this condition to trigger +randomly and resulting in a jerky pointer motion. + +For now, reduce the check to the *50 and *60 series touchpads until we have +data for more touchpads that we can add one-by-one. + +https://bugs.freedesktop.org/show_bug.cgi?id=95393 + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +--- + src/evdev-mt-touchpad.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c +index 4c8c3a3..c854043 100644 +--- a/src/evdev-mt-touchpad.c ++++ b/src/evdev-mt-touchpad.c +@@ -928,6 +928,7 @@ tp_detect_jumps(const struct tp_dispatch *tp, struct tp_touch *t) + static void + tp_process_state(struct tp_dispatch *tp, uint64_t time) + { ++ struct evdev_device *device = tp->device; + struct tp_touch *t; + unsigned int i; + bool restart_filter = false; +@@ -953,7 +954,8 @@ tp_process_state(struct tp_dispatch *tp, uint64_t time) + if (!t->dirty) + continue; + +- if (t->pressure_delta < -7) ++ if ((device->model_flags & EVDEV_MODEL_LENOVO_T450_TOUCHPAD) && ++ t->pressure_delta < -7) + tp_motion_history_reset(t); + + if (tp_detect_jumps(tp, t)) { +-- +2.7.4 + diff --git a/libinput.spec b/libinput.spec index 23202cd..948ac25 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 1.3.0 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -21,6 +21,9 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} # Not upstream, keep until kernel 4.2 or 4.1.x with dbf3c37086 Patch01: 0001-touchpad-serial-synaptics-need-to-fake-new-touches-o.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1335249 +Patch02: 0001-touchpad-only-use-negative-pressure-change-check-on-.patch + BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -97,6 +100,10 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Thu May 19 2016 Peter Hutterer 1.3.0-2 +- Disable negative pressure transition on non-synaptics pads to avoid + jerky movement (#1335249) + * Tue May 10 2016 Peter Hutterer 1.3.0-1 - libinput 1.3.0