configure.ac | 4 - debian/changelog | 6 + doc/Makefile.am | 1 doc/absolute-coordinate-ranges.dox | 119 +++++++++++++++++++++++++++++++++++++ doc/page-hierarchy.dox | 1 src/evdev-mt-touchpad.c | 95 ++++++++++++++++++++--------- src/evdev-mt-touchpad.h | 6 + src/evdev-tablet-pad.c | 4 - src/evdev.c | 8 +- src/evdev.h | 2 test/litest.c | 42 ++++--------- test/litest.h | 7 -- test/touchpad.c | 69 --------------------- tools/libinput-list-devices.c | 9 +- udev/90-libinput-model-quirks.hwdb | 20 ------ 15 files changed, 227 insertions(+), 166 deletions(-)
New commits: commit 7188cf612058a9a65321251b255195b54f99dd75 Author: Emilio Pozuelo Monfort <po...@debian.org> Date: Thu Jul 14 17:42:16 2016 +0200 Release to unstable diff --git a/debian/changelog b/debian/changelog index dafe506..e4e78d8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -libinput (1.3.3-1) UNRELEASED; urgency=medium +libinput (1.3.3-1) unstable; urgency=medium * New upstream release. - -- Emilio Pozuelo Monfort <po...@debian.org> Thu, 14 Jul 2016 17:09:58 +0200 + -- Emilio Pozuelo Monfort <po...@debian.org> Sun, 17 Jul 2016 18:56:44 +0200 libinput (1.3.1-1) unstable; urgency=medium commit 27395ef88e3ccc2afb0798fddbff20f2ddce5640 Author: Emilio Pozuelo Monfort <po...@debian.org> Date: Thu Jul 14 17:20:55 2016 +0200 New upstream release. diff --git a/debian/changelog b/debian/changelog index 6b2495c..dafe506 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +libinput (1.3.3-1) UNRELEASED; urgency=medium + + * New upstream release. + + -- Emilio Pozuelo Monfort <po...@debian.org> Thu, 14 Jul 2016 17:09:58 +0200 + libinput (1.3.1-1) unstable; urgency=medium * New upstream release. commit ef03affa2a50a46c4d286f628b0001e82fc78680 Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Fri Jun 24 15:02:41 2016 +1000 configure.ac: libinput 1.3.3 Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> diff --git a/configure.ac b/configure.ac index e55aa22..0c4059b 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.64]) m4_define([libinput_major_version], [1]) m4_define([libinput_minor_version], [3]) -m4_define([libinput_micro_version], [2]) +m4_define([libinput_micro_version], [3]) m4_define([libinput_version], [libinput_major_version.libinput_minor_version.libinput_micro_version]) @@ -35,7 +35,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) # b) If interfaces have been changed or added, but binary compatibility has # been preserved, change to C+1:0:A+1 # c) If the interface is the same as the previous version, change to C:R+1:A -LIBINPUT_LT_VERSION=18:5:8 +LIBINPUT_LT_VERSION=18:6:8 AC_SUBST(LIBINPUT_LT_VERSION) AM_SILENT_RULES([yes]) commit a6c2274ab57f39381c36ff30c15024950f7bfa71 Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Thu Jun 16 16:11:56 2016 +1000 touchpad: re-enable hysteresis by default for all devices The removal of the hysteresis even on precise touchpads has led to difficulties controlling the cursor in a few instances. Since 27078b2667d we only have the hysteresis on Apple touchpads and the Lenovo *40 series and later. Even on those do we see some positioning difficulties (bug 94379). So restore the hysteresis by default again for all touchpads. In the future a knob could be exposed for precision vs reactivity or something, but for now the drawback of imprecise positioning does not outweigh the benefits we get on those few devices. https://bugs.freedesktop.org/show_bug.cgi?id=94379 Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> Reviewed-by: Hans de Goede <hdego...@redhat.com> (cherry picked from commit 48473994c8e60189356feae7b7eae25288e5ac28) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 9eac42e..9b557df 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -2065,12 +2065,6 @@ tp_init_hysteresis(struct tp_dispatch *tp) { int res_x, res_y; - tp->hysteresis_margin.x = 0; - tp->hysteresis_margin.y = 0; - - if (tp->device->model_flags & EVDEV_MODEL_PRECISE_TOUCHPAD) - return; - res_x = tp->device->abs.absinfo_x->resolution; res_y = tp->device->abs.absinfo_y->resolution; tp->hysteresis_margin.x = res_x/2; diff --git a/src/evdev.c b/src/evdev.c index 198244a..293e7e9 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1736,7 +1736,6 @@ evdev_read_model_flags(struct evdev_device *device) { "LIBINPUT_MODEL_CYBORG_RAT", EVDEV_MODEL_CYBORG_RAT }, { "LIBINPUT_MODEL_CYAPA", EVDEV_MODEL_CYAPA }, { "LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD", EVDEV_MODEL_LENOVO_T450_TOUCHPAD }, - { "LIBINPUT_MODEL_PRECISE_TOUCHPAD", EVDEV_MODEL_PRECISE_TOUCHPAD }, { NULL, EVDEV_MODEL_DEFAULT }, }; const struct model_map *m = model_map; diff --git a/src/evdev.h b/src/evdev.h index 6f39548..a8c3b4d 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -114,7 +114,6 @@ enum evdev_device_model { EVDEV_MODEL_CYBORG_RAT = (1 << 14), EVDEV_MODEL_CYAPA = (1 << 15), EVDEV_MODEL_LENOVO_T450_TOUCHPAD= (1 << 17), - EVDEV_MODEL_PRECISE_TOUCHPAD = (1 << 18), }; struct mt_slot { diff --git a/test/litest-device-synaptics-x1-carbon-3rd.c b/test/litest-device-synaptics-x1-carbon-3rd.c index 9d4034d..23d9c5b 100644 --- a/test/litest-device-synaptics-x1-carbon-3rd.c +++ b/test/litest-device-synaptics-x1-carbon-3rd.c @@ -121,7 +121,6 @@ static const char udev_rule[] = "\n" "ATTRS{name}==\"litest SynPS/2 Synaptics TouchPad X1C3rd\"," " ENV{LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD}=\"1\"\n" -" ENV{LIBINPUT_MODEL_PRECISE_TOUCHPAD}=\"1\"\n" "\n" "LABEL=\"touchpad_end\""; diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb index 002b0dd..1a6cec0 100644 --- a/udev/90-libinput-model-quirks.hwdb +++ b/udev/90-libinput-model-quirks.hwdb @@ -32,7 +32,6 @@ libinput:name:*AlpsPS/2 ALPS GlidePoint:fwversion:800 libinput:touchpad:input:b0003v05ACp* libinput:touchpad:input:b0005v05ACp* LIBINPUT_MODEL_APPLE_TOUCHPAD=1 - LIBINPUT_MODEL_PRECISE_TOUCHPAD=1 LIBINPUT_ATTR_SIZE_HINT=104x75 libinput:name:*Apple Inc. Apple Internal Keyboard*:dmi:* @@ -103,7 +102,6 @@ libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPad??50*: libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPad??60*: libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX1Carbon3rd:* LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD=1 - LIBINPUT_MODEL_PRECISE_TOUCHPAD=1 ########################################## # Synaptics commit 762e752899926568362ae73fdc40d2486d7c4a80 Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Thu Jun 16 16:10:21 2016 +1000 Revert "touchpad: reset the motion history on significant negative pressure changes" We will reinstate the hysteresis for all devices making the negative pressure check unncessary. This reverts commit ef48c07a9600733e068a2a437a145862ba07fdab. Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> Reviewed-by: Hans de Goede <hdego...@redhat.com> (cherry picked from commit 89747d714356b5225592355d8ef1c83a59b2c5f7) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 82379a8..9eac42e 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -357,7 +357,6 @@ tp_process_absolute(struct tp_dispatch *tp, tp_end_sequence(tp, t, time); break; case ABS_MT_PRESSURE: - t->pressure_delta = e->value - t->pressure; t->pressure = e->value; t->dirty = true; tp->queued |= TOUCHPAD_EVENT_OTHERAXIS; @@ -990,9 +989,6 @@ tp_process_state(struct tp_dispatch *tp, uint64_t time) if (!t->dirty) continue; - if (t->pressure_delta < -7) - tp_motion_history_reset(t); - if (tp_detect_jumps(tp, t)) { if (!tp->semi_mt) log_bug_kernel(tp_libinput_context(tp), diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h index 1efe25c..4b372f3 100644 --- a/src/evdev-mt-touchpad.h +++ b/src/evdev-mt-touchpad.h @@ -155,7 +155,6 @@ struct tp_touch { uint64_t millis; int distance; /* distance == 0 means touch */ int pressure; - int pressure_delta; struct { /* A quirk mostly used on Synaptics touchpads. In a diff --git a/test/litest.c b/test/litest.c index ab59b0f..0c93dc8 100644 --- a/test/litest.c +++ b/test/litest.c @@ -1500,39 +1500,23 @@ litest_touch_move_extended(struct litest_device *d, } void -litest_touch_move_to_extended(struct litest_device *d, - unsigned int slot, - double x_from, double y_from, - double x_to, double y_to, - struct axis_replacement *axes, - int steps, int sleep_ms) +litest_touch_move_to(struct litest_device *d, + unsigned int slot, + double x_from, double y_from, + double x_to, double y_to, + int steps, int sleep_ms) { for (int i = 0; i < steps - 1; i++) { - litest_touch_move_extended(d, slot, - x_from + (x_to - x_from)/steps * i, - y_from + (y_to - y_from)/steps * i, - axes); + litest_touch_move(d, slot, + x_from + (x_to - x_from)/steps * i, + y_from + (y_to - y_from)/steps * i); if (sleep_ms) { libinput_dispatch(d->libinput); msleep(sleep_ms); libinput_dispatch(d->libinput); } } - litest_touch_move_extended(d, slot, x_to, y_to, axes); -} - -void -litest_touch_move_to(struct litest_device *d, - unsigned int slot, - double x_from, double y_from, - double x_to, double y_to, - int steps, int sleep_ms) -{ - litest_touch_move_to_extended(d, slot, - x_from, y_from, - x_to, y_to, - NULL, - steps, sleep_ms); + litest_touch_move(d, slot, x_to, y_to); } static int diff --git a/test/litest.h b/test/litest.h index 747512e..d6de089 100644 --- a/test/litest.h +++ b/test/litest.h @@ -409,13 +409,6 @@ litest_touch_move_to(struct litest_device *d, double x_from, double y_from, double x_to, double y_to, int steps, int sleep_ms); -void -litest_touch_move_to_extended(struct litest_device *d, - unsigned int slot, - double x_from, double y_from, - double x_to, double y_to, - struct axis_replacement *axes, - int steps, int sleep_ms); void litest_touch_move_two_touches(struct litest_device *d, diff --git a/test/touchpad.c b/test/touchpad.c index 11fe2cf..c179983 100644 --- a/test/touchpad.c +++ b/test/touchpad.c @@ -3594,7 +3594,7 @@ START_TEST(touchpad_thumb_edgescroll) libinput_dispatch(li); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_AXIS); - litest_touch_move_to_extended(dev, 0, 99, 55, 99, 70, axes, 10, 0); + litest_touch_move_to(dev, 0, 99, 55, 99, 70, 10, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_AXIS); } commit 7e3cfc261e29f0f49314820363692e05b9417f66 Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Thu Jun 16 16:08:30 2016 +1000 Revert "touchpad: only use negative pressure change check on Lenovo *50 and *60 series" We will reinstate the hysteresis for all devices making the negative pressure check unncessary and thus this commit as well. This reverts commit 2f5231cc88fccf389a78270d827f6c9201b86794. Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> Reviewed-by: Hans de Goede <hdego...@redhat.com> (cherry picked from commit 8d73275166d677a8672ad245d61a0316b1c54a44) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index c3f65a6..82379a8 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -965,7 +965,6 @@ 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; @@ -991,8 +990,7 @@ tp_process_state(struct tp_dispatch *tp, uint64_t time) if (!t->dirty) continue; - if ((device->model_flags & EVDEV_MODEL_LENOVO_T450_TOUCHPAD) && - t->pressure_delta < -7) + if (t->pressure_delta < -7) tp_motion_history_reset(t); if (tp_detect_jumps(tp, t)) { commit 18380006ee988394aac78e3e85fef397716104a5 Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Thu Jun 16 16:37:29 2016 +1000 Revert "test: add a test for the T450 dropped motion events" This reverts commit b5527fa4c73da687774971ddd7cf6ad2016f89e7. Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> Reviewed-by: Hans de Goede <hdego...@redhat.com> (cherry picked from commit dd73c5391e000a71748d0c7ec8b3ae57e318bc1f) diff --git a/test/touchpad.c b/test/touchpad.c index 2dbb346..11fe2cf 100644 --- a/test/touchpad.c +++ b/test/touchpad.c @@ -3924,72 +3924,6 @@ START_TEST(touchpad_tool_tripletap_touch_count) } END_TEST -START_TEST(touchpad_t450_motion_drops) -{ - struct litest_device *dev = litest_current_device(); - struct libinput *li = dev->libinput; - struct libinput_event *event; - struct libinput_event_pointer *ptrev; - int i; - double d; - - /* In some areas on the touchpad we only get pressure events. - * https://bugs.freedesktop.org/show_bug.cgi?id=94379 - */ - litest_drain_events(li); - - litest_touch_down(dev, 0, 50, 50); - - for (i = 0; i < 10; i++) { - litest_event(dev, EV_ABS, ABS_MT_SLOT, 0); - litest_event(dev, EV_ABS, ABS_MT_POSITION_X, 3000 - i); - litest_event(dev, EV_ABS, ABS_MT_POSITION_Y, 3000 - i); - litest_event(dev, EV_ABS, ABS_MT_PRESSURE, 30); - litest_event(dev, EV_ABS, ABS_X, 3000 - i); - litest_event(dev, EV_ABS, ABS_Y, 3000 - i); - litest_event(dev, EV_ABS, ABS_PRESSURE, 30); - litest_event(dev, EV_SYN, SYN_REPORT, 0); - litest_drain_events(li); - } - - /* several pressure-only events */ - - for (i = 0; i< 20; i++) { - litest_event(dev, EV_ABS, ABS_MT_PRESSURE, 30 + i % 2); - litest_event(dev, EV_ABS, ABS_PRESSURE, 30 + i % 2); - litest_event(dev, EV_SYN, SYN_REPORT, 0); - litest_assert_empty_queue(li); - } - - /* a 100 unit jump followed by fine-grained motion, we expect small - * motions without the jump */ - - for (i = 0; i < 10; i++) { - litest_event(dev, EV_ABS, ABS_MT_SLOT, 0); - litest_event(dev, EV_ABS, ABS_MT_POSITION_X, 3100 + i); - litest_event(dev, EV_ABS, ABS_MT_POSITION_Y, 3100 + i); - litest_event(dev, EV_ABS, ABS_X, 3100 + i); - litest_event(dev, EV_ABS, ABS_Y, 3100 + i); - litest_event(dev, EV_ABS, ABS_PRESSURE, 30); - litest_event(dev, EV_SYN, SYN_REPORT, 0); - libinput_dispatch(li); - } - - event = libinput_get_event(li); - ck_assert_notnull(event); - while (event) { - ptrev = litest_is_motion_event(event); - d = libinput_event_pointer_get_dx(ptrev); - litest_assert_double_lt(d, 1.0); - d = libinput_event_pointer_get_dy(ptrev); - litest_assert_double_lt(d, 1.0); - libinput_event_destroy(event); - - event = libinput_get_event(li); - } -} -END_TEST - START_TEST(touchpad_time_usec) { struct litest_device *dev = litest_current_device(); @@ -4178,7 +4112,6 @@ litest_setup_tests(void) litest_add("touchpad:thumb", touchpad_thumb_tap_hold_2ndfg_tap, LITEST_CLICKPAD, LITEST_SINGLE_TOUCH); litest_add_for_device("touchpad:bugs", touchpad_tool_tripletap_touch_count, LITEST_SYNAPTICS_TOPBUTTONPAD); - litest_add_for_device("touchpad:bugs", touchpad_t450_motion_drops, LITEST_SYNAPTICS_TRACKPOINT_BUTTONS); litest_add("touchpad:time", touchpad_time_usec, LITEST_TOUCHPAD, LITEST_ANY); commit 1d1d608d384b65125918ca987f5960d535581d73 Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Wed Jun 8 11:22:17 2016 +1000 pad: change button map ordering BTN_A and above sort after BTN_BASE Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> (cherry picked from commit a914e253fc0ea706a06867a70c2259b341b35d4a) diff --git a/src/evdev-tablet-pad.c b/src/evdev-tablet-pad.c index 5341657..ff826e7 100644 --- a/src/evdev-tablet-pad.c +++ b/src/evdev-tablet-pad.c @@ -469,12 +469,12 @@ pad_init_buttons(struct pad_dispatch *pad, pad->button_map[code] = map++; } - for (code = BTN_A; code < BTN_A + 6; code++) { + for (code = BTN_BASE; code < BTN_BASE + 2; code++) { if (libevdev_has_event_code(device->evdev, EV_KEY, code)) pad->button_map[code] = map++; } - for (code = BTN_BASE; code < BTN_BASE + 2; code++) { + for (code = BTN_A; code < BTN_A + 6; code++) { if (libevdev_has_event_code(device->evdev, EV_KEY, code)) pad->button_map[code] = map++; } commit 7cf5e5a4a93476fec6cf80af203cfbbdb5ccd659 Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Fri Jun 3 11:19:23 2016 +1000 touchpad: restore the hysteresis by default A large part of the bugs seen right now are related to touchpads jittering too much. Fixing them one by one is entertaining, but time consuming. Right now the number of touchpads that require a hysteresis seem to outnumber those that don't, so switch the approach around: leave the hysteresis in place but disable it for those touchpads that don't need it. Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> Reviewed-by: Hans de Goede <hdego...@redhat.com> (cherry picked from commit 27078b2667def4ecde1f47b8258d510a576c8bb1) Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index c5a0359..c3f65a6 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -2071,27 +2071,17 @@ tp_init_hysteresis(struct tp_dispatch *tp) { int res_x, res_y; - if (tp->device->model_flags & EVDEV_MODEL_CYAPA) - goto want_hysteresis; - - if (tp->semi_mt && - (tp->device->model_flags & EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD)) - goto want_hysteresis; - - if (tp->device->model_flags & EVDEV_MODEL_WOBBLY_TOUCHPAD) - goto want_hysteresis; - tp->hysteresis_margin.x = 0; tp->hysteresis_margin.y = 0; - return; + if (tp->device->model_flags & EVDEV_MODEL_PRECISE_TOUCHPAD) + return; -want_hysteresis: res_x = tp->device->abs.absinfo_x->resolution; res_y = tp->device->abs.absinfo_y->resolution; - tp->hysteresis_margin.x = res_x/2; tp->hysteresis_margin.y = res_y/2; + return; } diff --git a/src/evdev.c b/src/evdev.c index 32fe2f2..198244a 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1736,7 +1736,7 @@ evdev_read_model_flags(struct evdev_device *device) { "LIBINPUT_MODEL_CYBORG_RAT", EVDEV_MODEL_CYBORG_RAT }, { "LIBINPUT_MODEL_CYAPA", EVDEV_MODEL_CYAPA }, { "LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD", EVDEV_MODEL_LENOVO_T450_TOUCHPAD }, - { "LIBINPUT_MODEL_WOBBLY_TOUCHPAD", EVDEV_MODEL_WOBBLY_TOUCHPAD }, + { "LIBINPUT_MODEL_PRECISE_TOUCHPAD", EVDEV_MODEL_PRECISE_TOUCHPAD }, { NULL, EVDEV_MODEL_DEFAULT }, }; const struct model_map *m = model_map; diff --git a/src/evdev.h b/src/evdev.h index b900be6..6f39548 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -114,7 +114,7 @@ enum evdev_device_model { EVDEV_MODEL_CYBORG_RAT = (1 << 14), EVDEV_MODEL_CYAPA = (1 << 15), EVDEV_MODEL_LENOVO_T450_TOUCHPAD= (1 << 17), - EVDEV_MODEL_WOBBLY_TOUCHPAD = (1 << 18), + EVDEV_MODEL_PRECISE_TOUCHPAD = (1 << 18), }; struct mt_slot { diff --git a/test/litest-device-synaptics-x1-carbon-3rd.c b/test/litest-device-synaptics-x1-carbon-3rd.c index 23d9c5b..9d4034d 100644 --- a/test/litest-device-synaptics-x1-carbon-3rd.c +++ b/test/litest-device-synaptics-x1-carbon-3rd.c @@ -121,6 +121,7 @@ static const char udev_rule[] = "\n" "ATTRS{name}==\"litest SynPS/2 Synaptics TouchPad X1C3rd\"," " ENV{LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD}=\"1\"\n" +" ENV{LIBINPUT_MODEL_PRECISE_TOUCHPAD}=\"1\"\n" "\n" "LABEL=\"touchpad_end\""; diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb index e4ea1da..002b0dd 100644 --- a/udev/90-libinput-model-quirks.hwdb +++ b/udev/90-libinput-model-quirks.hwdb @@ -26,18 +26,13 @@ libinput:name:*AlpsPS/2 ALPS DualPoint TouchPad:fwversion:800 libinput:name:*AlpsPS/2 ALPS GlidePoint:fwversion:800 LIBINPUT_ATTR_SIZE_HINT=100x55 -libinput:name:*AlpsPS/2 ALPS DualPoint TouchPad:fwversion:300 -libinput:name:*AlpsPS/2 ALPS GlidePoint:fwversion:300 -libinput:name:*AlpsPS/2 ALPS DualPoint TouchPad:fwversion:310 -libinput:name:*AlpsPS/2 ALPS GlidePoint:fwversion:310 - LIBINPUT_MODEL_WOBBLY_TOUCHPAD=1 - ########################################## # Apple ########################################## libinput:touchpad:input:b0003v05ACp* libinput:touchpad:input:b0005v05ACp* LIBINPUT_MODEL_APPLE_TOUCHPAD=1 + LIBINPUT_MODEL_PRECISE_TOUCHPAD=1 LIBINPUT_ATTR_SIZE_HINT=104x75 libinput:name:*Apple Inc. Apple Internal Keyboard*:dmi:* @@ -83,14 +78,6 @@ libinput:name:Cypress APA Trackpad ?cyapa?:dmi:* LIBINPUT_MODEL_CYAPA=1 ########################################## -# HP -########################################## - -# HP 14-ac157tu -libinput:name:*ETPS/2 Elantech Touchpad*:dmi:*svnHP*pvrCNB1:* - LIBINPUT_MODEL_WOBBLY_TOUCHPAD=1 - -########################################## # LENOVO ########################################## @@ -116,10 +103,7 @@ libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPad??50*: libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPad??60*: libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX1Carbon3rd:* LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD=1 - -# Lenovo Yoga 2013 -libinput:name:*SynPS/2 Synaptics TouchPad*:dmi:*svnLENOVO*pvrLenovoYoga213:* - LIBINPUT_MODEL_WOBBLY_TOUCHPAD=1 + LIBINPUT_MODEL_PRECISE_TOUCHPAD=1 ########################################## # Synaptics commit 54591d47ff69032044885a19622d1d3104d58c5e Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Fri May 27 14:25:52 2016 +1000 tools: show tablet-pad capabilities in libinput-list-devices Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> (cherry picked from commit 4f8088066c3ccd868d18b618fca884a2b70d868f) diff --git a/tools/libinput-list-devices.c b/tools/libinput-list-devices.c index 71cecab..f7755b6 100644 --- a/tools/libinput-list-devices.c +++ b/tools/libinput-list-devices.c @@ -272,6 +272,9 @@ print_device_notify(struct libinput_event *ev) if (libinput_device_has_capability(dev, LIBINPUT_DEVICE_CAP_TABLET_TOOL)) printf("tablet "); + if (libinput_device_has_capability(dev, + LIBINPUT_DEVICE_CAP_TABLET_PAD)) + printf("tablet-pad"); printf("\n"); printf("Tap-to-click: %s\n", tap_default(dev)); commit b03fc49a839ecf34d6e43034b5c1dfef1e5ea977 Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Fri May 27 14:25:26 2016 +1000 tools: add missing space after listing touch/tablet capabilities Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> (cherry picked from commit 34eff6564dad082d1be39729cdd532b554edcf6b) diff --git a/tools/libinput-list-devices.c b/tools/libinput-list-devices.c index 7683c3f..71cecab 100644 --- a/tools/libinput-list-devices.c +++ b/tools/libinput-list-devices.c @@ -268,10 +268,10 @@ print_device_notify(struct libinput_event *ev) printf("pointer "); if (libinput_device_has_capability(dev, LIBINPUT_DEVICE_CAP_TOUCH)) - printf("touch"); + printf("touch "); if (libinput_device_has_capability(dev, LIBINPUT_DEVICE_CAP_TABLET_TOOL)) - printf("tablet"); + printf("tablet "); printf("\n"); printf("Tap-to-click: %s\n", tap_default(dev)); commit 5a599654d8d9752fe37765acf3e9b7174c5ef322 Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Mon May 23 14:33:51 2016 +1000 Drop the ALPS_RUSHMORE tag Was only used for the touchpad hysteresis, we can re-use the wobbly touchpad tag for this. Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> Reviewed-by: Hans de Goede <hdego...@redhat.com> (cherry picked from commit e1915b53b5c9c8989535080de775a3e7e3e7c395) Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 6c9cfab..c5a0359 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -2074,9 +2074,6 @@ tp_init_hysteresis(struct tp_dispatch *tp) if (tp->device->model_flags & EVDEV_MODEL_CYAPA) goto want_hysteresis; - if (tp->device->model_flags & EVDEV_MODEL_ALPS_RUSHMORE) - goto want_hysteresis; - if (tp->semi_mt && (tp->device->model_flags & EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD)) goto want_hysteresis; diff --git a/src/evdev.c b/src/evdev.c index 0241edf..32fe2f2 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1735,7 +1735,6 @@ evdev_read_model_flags(struct evdev_device *device) { "LIBINPUT_MODEL_APPLE_INTERNAL_KEYBOARD", EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD }, { "LIBINPUT_MODEL_CYBORG_RAT", EVDEV_MODEL_CYBORG_RAT }, { "LIBINPUT_MODEL_CYAPA", EVDEV_MODEL_CYAPA }, - { "LIBINPUT_MODEL_ALPS_RUSHMORE", EVDEV_MODEL_ALPS_RUSHMORE }, { "LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD", EVDEV_MODEL_LENOVO_T450_TOUCHPAD }, { "LIBINPUT_MODEL_WOBBLY_TOUCHPAD", EVDEV_MODEL_WOBBLY_TOUCHPAD }, { NULL, EVDEV_MODEL_DEFAULT }, diff --git a/src/evdev.h b/src/evdev.h index db6d83f..b900be6 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -113,7 +113,6 @@ enum evdev_device_model { EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD = (1 << 13), EVDEV_MODEL_CYBORG_RAT = (1 << 14), EVDEV_MODEL_CYAPA = (1 << 15), - EVDEV_MODEL_ALPS_RUSHMORE = (1 << 16), EVDEV_MODEL_LENOVO_T450_TOUCHPAD= (1 << 17), EVDEV_MODEL_WOBBLY_TOUCHPAD = (1 << 18), }; diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb index 88f3243..e4ea1da 100644 --- a/udev/90-libinput-model-quirks.hwdb +++ b/udev/90-libinput-model-quirks.hwdb @@ -28,11 +28,9 @@ libinput:name:*AlpsPS/2 ALPS GlidePoint:fwversion:800 libinput:name:*AlpsPS/2 ALPS DualPoint TouchPad:fwversion:300 libinput:name:*AlpsPS/2 ALPS GlidePoint:fwversion:300 - LIBINPUT_MODEL_WOBBLY_TOUCHPAD=1 - libinput:name:*AlpsPS/2 ALPS DualPoint TouchPad:fwversion:310 libinput:name:*AlpsPS/2 ALPS GlidePoint:fwversion:310 - LIBINPUT_MODEL_ALPS_RUSHMORE=1 + LIBINPUT_MODEL_WOBBLY_TOUCHPAD=1 ########################################## # Apple commit 762ea1563c120ea67467b8d9f98c05a60b11659e Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Thu Jun 16 09:42:56 2016 +1000 test: when creating an abs test device, force the abs->value to the mimimum Otherwise the abs->value could lie outside the [min, max] range of the axis. This isn't much of an issue for actual axes but in the case of ABS_MT_SLOT (value 47) it causes errors when libevdev sanitises the event into the allowed slot range. Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> Reviewed-by: Hans de Goede <hdego...@redhat.com> (cherry picked from commit 5f55d717744e37216d3c1ac5741e0f4d9154e2de) diff --git a/test/litest.c b/test/litest.c index 48569d6..ab59b0f 100644 --- a/test/litest.c +++ b/test/litest.c @@ -2248,8 +2248,12 @@ litest_create_uinput(const char *name, abs = abs_info; while (abs && abs->value != -1) { - rc = libevdev_enable_event_code(dev, EV_ABS, - abs->value, abs); + struct input_absinfo a = *abs; + + /* abs_info->value is used for the code and may be outside + of [min, max] */ + a.value = abs->minimum; + rc = libevdev_enable_event_code(dev, EV_ABS, abs->value, &a); litest_assert_int_eq(rc, 0); abs++; } commit 8be6d697ac35117e79cb0280dcd1e09cf5ecbca4 Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Thu Jun 16 15:14:55 2016 +1000 configure.ac: libinput 1.3.2 Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> diff --git a/configure.ac b/configure.ac index 3cf46d4..e55aa22 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.64]) m4_define([libinput_major_version], [1]) m4_define([libinput_minor_version], [3]) -m4_define([libinput_micro_version], [1]) +m4_define([libinput_micro_version], [2]) m4_define([libinput_version], [libinput_major_version.libinput_minor_version.libinput_micro_version]) @@ -35,7 +35,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) # b) If interfaces have been changed or added, but binary compatibility has # been preserved, change to C+1:0:A+1 # c) If the interface is the same as the previous version, change to C:R+1:A -LIBINPUT_LT_VERSION=18:4:8 +LIBINPUT_LT_VERSION=18:5:8 AC_SUBST(LIBINPUT_LT_VERSION) AM_SILENT_RULES([yes]) commit 2908beb2728ade0025b3bb824ba34165b6a25c70 Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Fri Jun 10 10:30:24 2016 +1000 touchpad: don't warn about kernel jumps on semi-mt devices These devices are all over the place anyway, no need to spam the log, just silently discard the jumps. https://bugs.freedesktop.org/show_bug.cgi?id=96275 Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> Reviewed-by: Hans de Goede <hdego...@redhat.com> (cherry picked from commit 92b21247f434037202e9ebb4355f08775d007ae2) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 314d464..6c9cfab 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -996,10 +996,11 @@ tp_process_state(struct tp_dispatch *tp, uint64_t time) tp_motion_history_reset(t); if (tp_detect_jumps(tp, t)) { - log_bug_kernel(tp_libinput_context(tp), - "Touch jump detected and discarded.\n" - "See %stouchpad_jumping_cursor.html for details\n", - HTTP_DOC_LINK); + if (!tp->semi_mt) + log_bug_kernel(tp_libinput_context(tp), + "Touch jump detected and discarded.\n" + "See %stouchpad_jumping_cursor.html for details\n", + HTTP_DOC_LINK); tp_motion_history_reset(t); } commit d9c8da9da69a0271c13880605cb7e1127331a493 Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Thu Jun 9 08:44:30 2016 +1000 evdev: check model flags for actual booleans The hwdb doesn't allow unsetting a property so once we start nesting model flags it'll become important to be able to be able to unset one as well (by assigning it to 0). So rather than checking for existence, check whether the property is actually set to something resembling a boolean. Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> Tested-by: Vasily Khoruzhick <anars...@gmail.com> Reviewed-by: Hans de Goede <hdego...@redhat.com> (cherry picked from commit c781ef2eb366154d651f00e9a6107eff609b2afb) diff --git a/src/evdev.c b/src/evdev.c index cd05cfc..0241edf 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1742,10 +1742,12 @@ evdev_read_model_flags(struct evdev_device *device) }; const struct model_map *m = model_map; uint32_t model_flags = 0; + const char *val; while (m->property) { - if (!!udev_device_get_property_value(device->udev_device, - m->property)) { + val = udev_device_get_property_value(device->udev_device, + m->property); + if (val && !streq(val, "0")) { log_debug(device->base.seat->libinput, "%s: tagged as %s\n", evdev_device_get_sysname(device), commit f9207606aaa7cff2c0d2ab58be081a87d561d2a5 Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Tue May 31 14:52:57 2016 +1000 touchpad: warn if we have invalid touchpad ranges Quite a few bugs are caused by touchpad ranges being out of whack. If we get input events significantly outside the expected range (5% width/height as error margin) print a warning to the log. And add a new doc page to explain what is happening and how to fix it. Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> Reviewed-by: Hans de Goede <hdego...@redhat.com> (cherry picked from commit faf7a6107f5a5eb81a58a3879f7b7034803e043f) diff --git a/doc/Makefile.am b/doc/Makefile.am index 62630d0..d325dc1 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -11,6 +11,7 @@ header_files = \ $(top_srcdir)/src/libinput.h \ $(top_srcdir)/README.txt \ $(srcdir)/absolute-axes.dox \ + $(srcdir)/absolute-coordinate-ranges.dox \ $(srcdir)/clickpad-softbuttons.dox \ $(srcdir)/device-configuration-via-udev.dox \ $(srcdir)/faqs.dox \ diff --git a/doc/absolute-coordinate-ranges.dox b/doc/absolute-coordinate-ranges.dox new file mode 100644 index 0000000..24e5218 --- /dev/null +++ b/doc/absolute-coordinate-ranges.dox @@ -0,0 +1,119 @@ +/** +@page absolute_coordinate_ranges Coordinate ranges for absolute axes + +libinput requires that all touchpads provide a correct axis range and +resolution. These are used to enable or disable certain features or adapt +the interaction with the touchpad. For example, the software button area is +narrower on small touchpads to avoid reducing the interactive surface too +much. Likewise, palm detection works differently on small touchpads as palm +interference is less likely to happen. + +Touchpads with incorrect axis ranges generate error messages +in the form: +<blockquote> +Axis 0x35 value 4000 is outside expected range [0, 3000] +</blockquote> + +This error message indicates that the ABS_MT_POSITION_X axis (i.e. the x +axis) generated an event outside the expected range of 0-3000. In this case +the value was 4000. +This discrepancy between the coordinate range the kernels advertises vs. +what the touchpad sends can be the source of a number of perceived +bugs in libinput. + +@section absolute_coordinate_ranges_fix Measuring and fixing touchpad ranges + +To fix the touchpad you need to: +-# measure the physical size of your touchpad in mm +-# run touchpad-edge-detector +-# trim the udev match rule to something sensible +-# replace the resolution with the calculated resolution based on physical + settings +-# test locally +-# send a patch to the systemd project + +Detailed explanations are below. + +[libevdev](http://freedesktop.org/wiki/Software/libevdev/) provides a tool +called **touchpad-edge-detector** that allows measuring the touchpad's input +ranges. Run the tool as root against the device node of your touchpad device +and repeatedly move a finger around the whole outside area of the +touchpad. Then control+c the process and note the output. +An example output is below: + +@code +$> sudo touchpad-edge-detector /dev/input/event4 +Touchpad SynPS/2 Synaptics TouchPad on /dev/input/event4 +Move one finger around the touchpad to detect the actual edges +Kernel says: x [1024..3112], y [2024..4832] +Touchpad sends: x [2445..4252], y [3464..4071] + +Touchpad size as listed by the kernel: 49x66mm +Calculate resolution as: + x axis: 2088/<width in mm> + y axis: 2808/<height in mm> + +Suggested udev rule: +# <Laptop model description goes here> +evdev:name:SynPS/2 Synaptics TouchPad:dmi:bvnLENOVO:bvrGJET72WW(2.22):bd02/21/2014:svnLENOVO:pn20ARS25701:pvrThinkPadT440s:rvnLENOVO:rn20ARS25701:rvrSDK0E50512STD:cvnLENOVO:ct10:cvrNotAvailable:* + EVDEV_ABS_00=2445:4252:<x resolution> + EVDEV_ABS_01=3464:4071:<y resolution> + EVDEV_ABS_35=2445:4252:<x resolution> + EVDEV_ABS_36=3464:4071:<y resolution> + +@endcode + +Note the discrepancy between the coordinate range the kernels advertises vs. +what the touchpad sends. +To fix the advertised ranges, the udev rule should be taken and trimmed +before being sent to the [systemd project](https://github.com/systemd/systemd). +An example commit can be found +[here](https://github.com/systemd/systemd/commit/26f667eac1c5e89b689aa0a1daef6a80f473e045). + +In most cases the match can and should be trimmed to the system vendor (svn) +and the product version (pvr), with everything else replaced by a wildcard