Skip to content
Commits on Source (30)
## Summary
<!--
Summarize the bug encountered concisely. See
https://wayland.freedesktop.org/libinput/doc/latest/reporting-bugs.html for
detailed instructions to report bugs
-->
## Steps to reproduce
<!-- How one can reproduce the issue - this is very important -->
## libinput version you encountered the bug on
<!-- Note: if your libinput version is older than the current stable version,
please reproduce with a current version instead -->
## Hardware information:
<!-- Model name/number and general hardware information if applicable -->
## Other log output:
- `libinput record` output: <!-- attach file here -->
- `libinput debug-events --verbose` output: <!-- attach file here -->
<!-- Paste any other relevant logs - please use code blocks (```) to format
console output, logs, and code as it's very hard to read otherwise.) -->
/label ~bug ~needs-investigation
<!--
Before your file a feature request, please read
https://wayland.freedesktop.org/libinput/doc/latest/what-is-libinput.html
The amount of developer time libinput has available is very small.
Requesting a feature is no guarantee that it will get implemented. Someone
(you!) needs to step up to do the work.
-->
## Summary
<!-- Summarize the requested feature in a few sentences. -->
## Feature details
<!-- A step-by-step list of what the feature should achieve (where applicable) -->
## Affected Hardware
<!-- Which hardware types would be affected by this -->
## Implementation in Other Systems
<!-- Does this feature already exist elsewhere? How does it work there? Try
to provide as many details as possible -->
/label ~RFE ~needs-investigation
libinput (1.12.1-1) unstable; urgency=medium
* New upstream release.
- add/fix quirks
* source: Update diff-ignore.
-- Timo Aaltonen <tjaalton@debian.org> Thu, 04 Oct 2018 12:47:10 +0300
libinput (1.12.0-1) unstable; urgency=medium
[ Timo Aaltonen ]
......
extend-diff-ignore = "(^|/)(.vimdir|CODING_STYLE|autogen.sh|circle.yml|doc/*|test/50-litest.conf|tools/publish-doc)"
extend-diff-ignore = test/generate-gcov-report.sh
extend-diff-ignore = .gitlab-ci.yml
extend-diff-ignore = .gitlab-ci.yml|.gitlab/issue_templates
......@@ -96,7 +96,7 @@ int main(void) {
// handle the event here
libinput_event_destroy(li);
libinput_event_destroy(event);
libinput_dispatch(li);
}
......
......@@ -247,6 +247,11 @@ in the udev rules files). ::
sudo udevadm test /sys/class/input/eventX
.. warning:: ``udevadm test`` does not run commands specified in ``RUN``
directives. This affects the udev properties relying on e.g.
the udev keyboard builtin such as the :ref:`touchpad_jitter`
workarounds.
.. _hwdb_modifying:
..............................................................................
......
......@@ -109,7 +109,7 @@ When you file a bug, please attach the following information:
- the output from udevadm info, see :ref:`udev_info`.
- the vendor model number of your laptop (e.g. "Lenovo Thinkpad T440s")
- and the content of ``/sys/class/dmi/id/modalias``.
- run the ``touchpad-edge-detectior`` tool (provided by libevdev) and verify
- run the ``touchpad-edge-detector`` tool (provided by libevdev) and verify
that the ranges and sizes it prints match the touchpad (up to 5mm
difference is ok)
......
......@@ -61,7 +61,7 @@ value in case the ``libinput measure fuzz`` tool fails.
Check with ``udevadm info /sys/class/input/eventX`` (replace your device node
number) whether an existing hwdb override exists. If the ``EVDEV_ABS_``
properties are present, the hwdb overried exists. Find the file that
properties are present, the hwdb override exists. Find the file that
contains that entry, most likely in ``/etc/udev/hwdb.d`` or
``/usr/lib/udev/hwdb.d``.
......
project('libinput', 'c', 'cpp',
version : '1.12.0',
version : '1.12.1',
license : 'MIT/Expat',
default_options : [ 'c_std=gnu99', 'warning_level=2' ],
meson_version : '>= 0.41.0')
......@@ -255,6 +255,7 @@ quirks_data = [
'quirks/30-vendor-elantech.quirks',
'quirks/30-vendor-huion.quirks',
'quirks/30-vendor-ibm.quirks',
'quirks/30-vendor-kensington.quirks',
'quirks/30-vendor-logitech.quirks',
'quirks/30-vendor-microsoft.quirks',
'quirks/30-vendor-razer.quirks',
......
......@@ -4,3 +4,8 @@
MatchName=*Elantech Touchpad*
AttrResolutionHint=31x31
AttrPressureRange=10:8
[Elan Touchpads]
MatchName=*Elan Touchpad*
AttrResolutionHint=31x31
AttrPressureRange=10:8
[Kensington Orbit Scroll Wheel]
MatchBus=usb
MatchVendor=0x047d
MatchProduct=0x2048
ModelKensingtonOrbit=1
ModelTrackball=1
......@@ -14,5 +14,5 @@ AttrKeyboardIntegration=internal
MatchUdevType=mouse
MatchBus=usb
MatchVendor=0x045E
MatchProduct=0x8000
MatchProduct=0x0800
ModelBouncingKeys=1
......@@ -9,3 +9,8 @@ ModelTouchpadVisibleMarker=1
MatchName=*ETPS/2 Elantech Touchpad*
MatchDMIModalias=dmi:*svnASUSTeKComputerInc.:pnUX21E:*
AttrPressureRange=24:10
[Asus UX302LA]
MatchName=*ETPS/2 Elantech Touchpad*
MatchDMIModalias=dmi:*svnASUSTeKCOMPUTERINC.:pnUX302LA:*
ModelAsusUX302LATouchpad=1
......@@ -18,8 +18,8 @@ AttrPressureRange=100:90
[Dell XPS L322X Touchpad]
MatchName=*CyPS/2 Cypress Trackpad
MatchDMIModalias=dmi:*svnDell*:XPSL322X*
AttrPressureRange=32:20
MatchDMIModalias=dmi:*svnDell*:*XPSL322X*
AttrPressureRange=30:20
AttrPalmPressureThreshold=254
[Dell XPS13 9333 Touchpad]
......@@ -51,4 +51,4 @@ AttrTrackpointMultiplier=1.5
[Latitude E7470 Trackpoint]
MatchName=*DualPoint Stick
MatchDMIModalias=dmi:*svnDellInc.:pnLatitudeE7470*
AttrTrackpointMultiplier=0.6
AttrTrackpointMultiplier=0.125
......@@ -565,7 +565,7 @@ fallback_init_debounce(struct fallback_dispatch *dispatch)
struct evdev_device *device = dispatch->device;
char timer_name[64];
if (device->model_flags & EVDEV_MODEL_BOUNCING_KEYS) {
if (evdev_device_has_model_quirk(device, QUIRK_MODEL_BOUNCING_KEYS)) {
dispatch->debounce.state = DEBOUNCE_STATE_DISABLED;
return;
}
......
......@@ -490,6 +490,31 @@ fallback_flush_st_up(struct fallback_dispatch *dispatch,
return true;
}
static bool
fallback_flush_st_cancel(struct fallback_dispatch *dispatch,
struct evdev_device *device,
uint64_t time)
{
struct libinput_device *base = &device->base;
struct libinput_seat *seat = base->seat;
int seat_slot;
if (!(device->seat_caps & EVDEV_DEVICE_TOUCH))
return false;
seat_slot = dispatch->abs.seat_slot;
dispatch->abs.seat_slot = -1;
if (seat_slot == -1)
return false;
seat->slot_map &= ~(1 << seat_slot);
touch_notify_touch_cancel(base, time, -1, seat_slot);
return true;
}
static void
fallback_process_touch_button(struct fallback_dispatch *dispatch,
struct evdev_device *device,
......@@ -1015,14 +1040,14 @@ fallback_interface_process(struct evdev_dispatch *evdev_dispatch,
}
static void
release_touches(struct fallback_dispatch *dispatch,
cancel_touches(struct fallback_dispatch *dispatch,
struct evdev_device *device,
uint64_t time)
{
unsigned int idx;
bool need_frame = false;
need_frame = fallback_flush_st_up(dispatch, device, time);
need_frame = fallback_flush_st_cancel(dispatch, device, time);
for (idx = 0; idx < dispatch->mt.slots_len; idx++) {
struct mt_slot *slot = &dispatch->mt.slots[idx];
......@@ -1030,7 +1055,7 @@ release_touches(struct fallback_dispatch *dispatch,
if (slot->seat_slot == -1)
continue;
if (fallback_flush_mt_up(dispatch, device, idx, time))
if (fallback_flush_mt_cancel(dispatch, device, idx, time))
need_frame = true;
}
......@@ -1098,7 +1123,7 @@ fallback_return_to_neutral_state(struct fallback_dispatch *dispatch,
if ((time = libinput_now(libinput)) == 0)
return;
release_touches(dispatch, device, time);
cancel_touches(dispatch, device, time);
release_pressed_keys(dispatch, device, time);
memset(dispatch->hw_key_mask, 0, sizeof(dispatch->hw_key_mask));
memset(dispatch->hw_key_mask, 0, sizeof(dispatch->last_hw_key_mask));
......@@ -1301,7 +1326,8 @@ fallback_keyboard_pair_tablet_mode(struct evdev_device *keyboard,
(EVDEV_TAG_TRACKPOINT|EVDEV_TAG_INTERNAL_KEYBOARD)) == 0)
return;
if (keyboard->model_flags & EVDEV_MODEL_TABLET_MODE_NO_SUSPEND)
if (evdev_device_has_model_quirk(keyboard,
QUIRK_MODEL_TABLET_MODE_NO_SUSPEND))
return;
if ((tablet_mode_switch->tags & EVDEV_TAG_TABLET_MODE_SWITCH) == 0)
......
......@@ -615,7 +615,8 @@ tp_init_softbuttons(struct tp_dispatch *tp,
* On touchpads with visible markings we reduce the size of the
* middle button since users have a visual guide.
*/
if (tp->device->model_flags & EVDEV_MODEL_TOUCHPAD_VISIBLE_MARKER) {
if (evdev_device_has_model_quirk(device,
QUIRK_MODEL_TOUCHPAD_VISIBLE_MARKER)) {
mm.x = width/2 - 5; /* 10mm wide */
edges = evdev_device_mm_to_units(device, &mm);
mb_le = edges.x;
......@@ -739,14 +740,13 @@ static enum libinput_config_click_method
tp_click_get_default_method(struct tp_dispatch *tp)
{
struct evdev_device *device = tp->device;
uint32_t clickfinger_models = EVDEV_MODEL_CHROMEBOOK |
EVDEV_MODEL_SYSTEM76_BONOBO |
EVDEV_MODEL_SYSTEM76_GALAGO |
EVDEV_MODEL_SYSTEM76_KUDU |
EVDEV_MODEL_CLEVO_W740SU |
EVDEV_MODEL_APPLE_TOUCHPAD_ONEBUTTON;
if (device->model_flags & clickfinger_models)
if (evdev_device_has_model_quirk(device, QUIRK_MODEL_CHROMEBOOK) ||
evdev_device_has_model_quirk(device, QUIRK_MODEL_SYSTEM76_BONOBO) ||
evdev_device_has_model_quirk(device, QUIRK_MODEL_SYSTEM76_GALAGO) ||
evdev_device_has_model_quirk(device, QUIRK_MODEL_SYSTEM76_KUDU) ||
evdev_device_has_model_quirk(device, QUIRK_MODEL_CLEVO_W740SU) ||
evdev_device_has_model_quirk(device, QUIRK_MODEL_APPLE_TOUCHPAD_ONEBUTTON))
return LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER;
if (!tp->buttons.is_clickpad)
......@@ -862,7 +862,8 @@ tp_init_middlebutton_emulation(struct tp_dispatch *tp,
if (!libevdev_has_event_code(device->evdev, EV_KEY, BTN_MIDDLE)) {
enable_by_default = true;
want_config_option = false;
} else if (device->model_flags & EVDEV_MODEL_ALPS_TOUCHPAD) {
} else if (evdev_device_has_model_quirk(device,
QUIRK_MODEL_ALPS_TOUCHPAD)) {
enable_by_default = true;
want_config_option = true;
} else
......
......@@ -98,6 +98,9 @@ tp_calculate_motion_speed(struct tp_dispatch *tp, struct tp_touch *t)
if (!tp->has_mt || tp->semi_mt)
return;
if (t->state != TOUCH_UPDATE)
return;
/* This doesn't kick in until we have at least 4 events in the
* motion history. As a side-effect, this automatically handles the
* 2fg scroll where a finger is down and moving fast before the
......@@ -332,6 +335,7 @@ tp_begin_touch(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time)
t->thumb.first_touch_time = time;
t->tap.is_thumb = false;
t->tap.is_palm = false;
t->speed.exceeded_count = 0;
assert(tp->nfingers_down >= 1);
tp->hysteresis.last_motion_time = time;
}
......@@ -409,6 +413,7 @@ tp_end_touch(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time)
t->pinned.is_pinned = false;
t->time = time;
t->palm.time = 0;
t->speed.exceeded_count = 0;
tp->queued |= TOUCHPAD_EVENT_MOTION;
}
......@@ -1741,7 +1746,7 @@ tp_process_state(struct tp_dispatch *tp, uint64_t time)
if (!tp->semi_mt)
evdev_log_bug_kernel(tp->device,
"Touch jump detected and discarded.\n"
"See %stouchpad-jumping-cursor.html for details\n",
"See %stouchpad-jumping-cursors.html for details\n",
HTTP_DOC_LINK);
tp_motion_history_reset(t);
}
......@@ -2605,7 +2610,8 @@ evdev_tag_touchpad(struct evdev_device *device,
switch (bustype) {
case BUS_USB:
if (device->model_flags & EVDEV_MODEL_APPLE_TOUCHPAD)
if (evdev_device_has_model_quirk(device,
QUIRK_MODEL_APPLE_TOUCHPAD))
evdev_tag_touchpad_internal(device);
break;
case BUS_BLUETOOTH:
......@@ -2663,7 +2669,7 @@ tp_interface_toggle_touch(struct evdev_dispatch *dispatch,
} else {
/* if in-kernel arbitration is in use and there is a touch
* and a pen in proximity, lifting the pen out of proximity
* causes a touch being for the touch. On a hand-lift the
* causes a touch begin for the touch. On a hand-lift the
* proximity out precedes the touch up by a few ms, so we
* get what looks like a tap. Fix this by delaying
* arbitration by just a little bit so that any touch in
......@@ -2756,7 +2762,8 @@ tp_init_slots(struct tp_dispatch *tp,
* for single-finger movement. See fdo bug 91135
*/
if (tp->semi_mt ||
device->model_flags & EVDEV_MODEL_HP_PAVILION_DM4_TOUCHPAD) {
evdev_device_has_model_quirk(tp->device,
QUIRK_MODEL_HP_PAVILION_DM4_TOUCHPAD)) {
tp->num_slots = 1;
tp->slot = 0;
tp->has_mt = false;
......@@ -2841,7 +2848,7 @@ tp_init_accel(struct tp_dispatch *tp)
tp->accel.y_scale_coeff = (DEFAULT_MOUSE_DPI/25.4) / res_y;
tp->accel.xy_scale_coeff = 1.0 * res_x/res_y;
if (tp->device->model_flags & EVDEV_MODEL_LENOVO_X230 ||
if (evdev_device_has_model_quirk(device, QUIRK_MODEL_LENOVO_X230) ||
tp->device->model_flags & EVDEV_MODEL_LENOVO_X220_TOUCHPAD_FW81)
filter = create_pointer_accelerator_filter_lenovo_x230(dpi, use_v_avg);
else if (libevdev_get_id_bustype(device->evdev) == BUS_BLUETOOTH)
......@@ -2875,7 +2882,8 @@ tp_scroll_get_methods(struct tp_dispatch *tp)
/* Any movement with more than one finger has random cursor
* jumps. Don't allow for 2fg scrolling on this device, see
* fdo bug 91135 */
if (tp->device->model_flags & EVDEV_MODEL_HP_PAVILION_DM4_TOUCHPAD)
if (evdev_device_has_model_quirk(tp->device,
QUIRK_MODEL_HP_PAVILION_DM4_TOUCHPAD))
return LIBINPUT_CONFIG_SCROLL_EDGE;
if (tp->ntouches >= 2)
......
......@@ -2030,7 +2030,7 @@ tablet_init_left_handed(struct evdev_device *device)
tablet_change_to_left_handed);
}
static int
static bool
tablet_reject_device(struct evdev_device *device)
{
struct libevdev *evdev = device->evdev;
......@@ -2044,7 +2044,7 @@ tablet_reject_device(struct evdev_device *device)
has_size = evdev_device_get_size(device, &w, &h) == 0;
if (has_xy && (has_pen || has_btn_stylus) && has_size)
return 0;
return false;
evdev_log_bug_libinput(device,
"missing tablet capabilities:%s%s%s%s. "
......@@ -2053,7 +2053,7 @@ tablet_reject_device(struct evdev_device *device)
has_pen ? "" : " pen",
has_btn_stylus ? "" : " btn-stylus",
has_size ? "" : " resolution");
return -1;
return true;
}
static int
......@@ -2105,7 +2105,8 @@ tablet_init(struct tablet_dispatch *tablet,
tablet_set_status(tablet, TABLET_TOOL_OUT_OF_PROXIMITY);
if (device->model_flags & EVDEV_MODEL_TABLET_NO_PROXIMITY_OUT)
if (evdev_device_has_model_quirk(device,
QUIRK_MODEL_TABLET_NO_PROXIMITY_OUT))
want_proximity_quirk = true;
if (want_proximity_quirk)
......
......@@ -1270,33 +1270,11 @@ evdev_read_model_flags(struct evdev_device *device)
enum evdev_device_model model;
} model_map[] = {
#define MODEL(name) { QUIRK_MODEL_##name, EVDEV_MODEL_##name }
MODEL(LENOVO_X230),
MODEL(CHROMEBOOK),
MODEL(SYSTEM76_BONOBO),
MODEL(SYSTEM76_GALAGO),
MODEL(SYSTEM76_KUDU),
MODEL(CLEVO_W740SU),
MODEL(APPLE_TOUCHPAD),
MODEL(WACOM_TOUCHPAD),
MODEL(ALPS_TOUCHPAD),
MODEL(SYNAPTICS_SERIAL_TOUCHPAD),
MODEL(BOUNCING_KEYS),
MODEL(CYBORG_RAT),
MODEL(HP_STREAM11_TOUCHPAD),
MODEL(LENOVO_T450_TOUCHPAD),
MODEL(TOUCHPAD_VISIBLE_MARKER),
MODEL(TRACKBALL),
MODEL(APPLE_MAGICMOUSE),
MODEL(HP8510_TOUCHPAD),
MODEL(HP6910_TOUCHPAD),
MODEL(HP_ZBOOK_STUDIO_G3),
MODEL(HP_PAVILION_DM4_TOUCHPAD),
MODEL(APPLE_TOUCHPAD_ONEBUTTON),
MODEL(LOGITECH_MARBLE_MOUSE),
MODEL(TABLET_NO_PROXIMITY_OUT),
MODEL(TABLET_NO_TILT),
MODEL(TABLET_MODE_NO_SUSPEND),
MODEL(LENOVO_CARBON_X1_6TH),
MODEL(LENOVO_SCROLLPOINT),
#undef MODEL
{ 0, 0 },
......@@ -1944,7 +1922,7 @@ evdev_pre_configure_model_quirks(struct evdev_device *device)
*
* Disable the event codes to avoid stuck buttons.
*/
if (device->model_flags & EVDEV_MODEL_CYBORG_RAT) {
if (evdev_device_has_model_quirk(device, QUIRK_MODEL_CYBORG_RAT)) {
libevdev_disable_event_code(device->evdev, EV_KEY, 0x118);
libevdev_disable_event_code(device->evdev, EV_KEY, 0x119);
libevdev_disable_event_code(device->evdev, EV_KEY, 0x11a);
......@@ -1953,47 +1931,65 @@ evdev_pre_configure_model_quirks(struct evdev_device *device)
* emulates a full 2/3 button mouse for us. Ignore anything from the
* ABS interface
*/
if (device->model_flags & EVDEV_MODEL_APPLE_MAGICMOUSE)
if (evdev_device_has_model_quirk(device, QUIRK_MODEL_APPLE_MAGICMOUSE))
libevdev_disable_event_type(device->evdev, EV_ABS);
/* Claims to have double/tripletap but doesn't actually send it
* https://bugzilla.redhat.com/show_bug.cgi?id=1351285 and
* https://bugs.freedesktop.org/show_bug.cgi?id=98538
*/
if (device->model_flags &
(EVDEV_MODEL_HP8510_TOUCHPAD|EVDEV_MODEL_HP6910_TOUCHPAD)) {
if (evdev_device_has_model_quirk(device, QUIRK_MODEL_HP8510_TOUCHPAD) ||
evdev_device_has_model_quirk(device, QUIRK_MODEL_HP6910_TOUCHPAD)) {
libevdev_disable_event_code(device->evdev, EV_KEY, BTN_TOOL_DOUBLETAP);
libevdev_disable_event_code(device->evdev, EV_KEY, BTN_TOOL_TRIPLETAP);
}
/* Touchpad is a clickpad but INPUT_PROP_BUTTONPAD is not set, see
* fdo bug 97147. Remove when RMI4 is commonplace */
if (device->model_flags & EVDEV_MODEL_HP_STREAM11_TOUCHPAD)
if (evdev_device_has_model_quirk(device, QUIRK_MODEL_HP_STREAM11_TOUCHPAD))
libevdev_enable_property(device->evdev,
INPUT_PROP_BUTTONPAD);
/* Touchpad claims to have 4 slots but only ever sends 2
* https://bugs.freedesktop.org/show_bug.cgi?id=98100 */
if (device->model_flags & EVDEV_MODEL_HP_ZBOOK_STUDIO_G3)
if (evdev_device_has_model_quirk(device, QUIRK_MODEL_HP_ZBOOK_STUDIO_G3))
libevdev_set_abs_maximum(device->evdev, ABS_MT_SLOT, 1);
/* Logitech Marble Mouse claims to have a middle button */
if (device->model_flags & EVDEV_MODEL_LOGITECH_MARBLE_MOUSE)
/* Logitech Marble Mouse claims to have a middle button, same for
* the Kensington Orbit */
if (evdev_device_has_model_quirk(device,
QUIRK_MODEL_LOGITECH_MARBLE_MOUSE) ||
evdev_device_has_model_quirk(device,
QUIRK_MODEL_KENSINGTON_ORBIT))
libevdev_disable_event_code(device->evdev, EV_KEY, BTN_MIDDLE);
/* Aiptek tablets have tilt but don't send events */
if (device->model_flags & EVDEV_MODEL_TABLET_NO_TILT) {
if (evdev_device_has_model_quirk(device, QUIRK_MODEL_TABLET_NO_TILT)) {
libevdev_disable_event_code(device->evdev, EV_ABS, ABS_TILT_X);
libevdev_disable_event_code(device->evdev, EV_ABS, ABS_TILT_Y);
}
/* Lenovo Carbon X1 6th gen sends bogus ABS_MT_TOOL_TYPE events for
* MT_TOOL_PALM */
if (device->model_flags & EVDEV_MODEL_LENOVO_CARBON_X1_6TH)
if (evdev_device_has_model_quirk(device, QUIRK_MODEL_LENOVO_CARBON_X1_6TH))
libevdev_disable_event_code(device->evdev,
EV_ABS,
ABS_MT_TOOL_TYPE);
/* Asus UX302LA touchpad doesn't update the pressure values once two
* fingers are down. So let's just pretend it doesn't have pressure
* at all. https://gitlab.freedesktop.org/libinput/libinput/issues/145
*/
if (evdev_device_has_model_quirk(device,
QUIRK_MODEL_ASUS_UX320LA_TOUCHPAD)) {
libevdev_disable_event_code(device->evdev,
EV_ABS,
ABS_MT_PRESSURE);
libevdev_disable_event_code(device->evdev,
EV_ABS,
ABS_PRESSURE);
}
/* Generally we don't care about MSC_TIMESTAMP and it can cause
* unnecessary wakeups but on some devices we need to watch it for
* pointer jumps */
......