Commit graph

60 commits

Author SHA1 Message Date
Peter Hutterer
572ef99bde udev: fix parse_hwdb.py to work with pyparsing 2.1.10
From systemd commit f644a6da7a: "pyparsing 2.1.10 fixed the handling of
LineStart to really just apply to line starts and not ignore whitespace and
comments any more. Adjust EMPTYLINE to this."

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-16 12:57:27 +10:00
Peter Hutterer
72e01485c0 udev: mark Asus X555LAB as touchpad with visible marker
https://bugs.freedesktop.org/show_bug.cgi?id=99200

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2017-01-11 10:39:15 +10:00
Peter Hutterer
43ba2dbb30 touchpad: add a model tag to mark touchpads with visible marker
We used to mark dell touchpads this way but let's make this more generic.
Nothing else used the dell touchpad model flag, so we can simply replace it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2017-01-11 10:39:05 +10:00
Peter Hutterer
996b845d68 touchpad: add a quirk for the HP Pavilion dm4
This touchpad has cursor jumps for 2-finger scrolling that also affects the
single-finger emulation. So disable any multitouch bits on this device and
disallow the 2-finger scroll method. This still allows for 2-finger
tapping/clicking.

https://bugs.freedesktop.org/show_bug.cgi?id=91135

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-12-01 06:24:07 +10:00
Peter Hutterer
ea8545bd2f udev: move TEST_EXTENSIONS out of the conditional
Fixes:
udev/Makefile.am:47: warning: 'TEST_EXTENSIONS' cannot have conditional
contents

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-11-22 11:23:39 +10:00
Peter Hutterer
6752544e56 evdev: add a quirk for the HP Zbook Studio G3
Announces 4 slots but only sends data for the first two. This causes libinput
to miss three-finger actions (we don't look at BTN_TOOL_TRIPLETAP if we have
3 or more slots).

https://bugs.freedesktop.org/show_bug.cgi?id=98100

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-11-21 06:44:16 +10:00
Peter Hutterer
76008034ca evdev: add hwdb quirk for HP Compaq 6910
Same as the HP Compat 8510, it doesn't send BTN_TOOL_DOUBLETAP/TRIPLETAP. This
may be a general issue with those series but they're 6 years old now, so
it's questionable to spend extra effort detecting them.

https://bugs.freedesktop.org/show_bug.cgi?id=98538

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-11-02 21:46:11 +10:00
Peter Hutterer
e09705522a udev: add the hwdb_parser.py test from systemd
upstream for this file lives in systemd, any changes to the actual parser
should flow back there.

libinput's matches are fairly simple. We have the various LIBINPUT_MODEL_ tags
that just take a "1" and the two attributes that are dimensions.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-11-02 09:03:48 +10:00
Peter Hutterer
f43a072d2c udev: fix hwdb match for the HP Stream 11
prefix must be libinput, not evdev

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-09-14 11:22:30 +10:00
Peter Hutterer
18adfed4c1 Force the HP Stream 11 touchpad as a clickpad
INPUT_PROP_BUTTONPAD is not set on this device and RMI4 which should fix this
is a bit too far into the future at this point. Hack around it.

https://bugs.freedesktop.org/show_bug.cgi?id=97147

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-09-07 13:25:31 +10:00
Peter Hutterer
52cd361907 udev: fix comment describing permitted match strings
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-09-05 08:51:12 +10:00
Peter Hutterer
43a8502ecf udev: add missing touchpad model name for the HP 8510w 2016-09-05 07:38:12 +10:00
Peter Hutterer
64c8939911 evdev: add quirk for the HP85810 touchpad
The touchpad's says it can do two- and three-finger detection but it never
sends events for it. Disable them so we treat it as pure single-finger
touchpad.

https://bugzilla.redhat.com/show_bug.cgi?id=1351285

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-09-01 10:55:34 +10:00
Peter Hutterer
8a8c72983f udev: check wacom devices for a paired product id
The newer Wacom Cintiqs have touch devices with a different PID than the pen
device. Use the new libwacom_get_paired_device call where available to pair
the two devices and give them the same device group.

This isn't that important just yet, so no need to force users to update to a
new libwacom version.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2016-08-03 14:06:48 +10:00
Peter Hutterer
188bad4866 udev: don't overwrite a previously set device group
In some cases a device may need a device group assigned by a custom udev rule
or hwdb entry. Don't overwrite that with our generated one.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-08-01 07:13:05 +10:00
Peter Hutterer
caf14fab16 touchpad: reduce middle button size on Dell touchpads to 10mm
All Dell touchpas appear to have a visual marker on their touchpads. With a
visible marker our middle button can (and should) be much smaller since we
can rely on users to hit the button precisely.

https://bugs.freedesktop.org/show_bug.cgi?id=96710

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Andy Lutomirski <luto@kernel.org>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-07-14 07:46:54 +10:00
Peter Hutterer
28f75d9f9d Merge branch 'wip/touchpad-drop-hysteresis' 2016-06-20 09:26:44 +10:00
Peter Hutterer
48473994c8 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 27078b2667
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.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-06-20 09:23:58 +10:00
Peter Hutterer
9bb0cfd878 test: add an apple magicmouse device
This device has a touchpad on the mouse but it's labeled as mouse. For litest
we only label it as LITEST_MOUSE feature and test the touchpad directly on the
device.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-06-20 09:17:38 +10:00
Peter Hutterer
27078b2667 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.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-06-06 09:00:14 +10:00
Peter Hutterer
7aa6b40f31 udev: mark the Logitech M570 as trackball
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-30 15:36:46 +10:00
Peter Hutterer
e1915b53b5 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.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-05-23 14:56:15 +10:00
Peter Hutterer
cebbe0c2da udev: mark ALPS touchpads fw version 300 as wobbly touchpads
Includes the Dell Lattitude E5420 but since all alps touchpads with the same
fw version are the same (as far as we know) hooking this off the firmware
version should cover this generation.

https://bugzilla.redhat.com/show_bug.cgi?id=1336084

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-05-23 14:56:15 +10:00
Peter Hutterer
595b5f6ae7 udev: add the Yoga 2 to the wobbly touchpads
https://bugs.freedesktop.org/show_bug.cgi?id=95290

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-05-23 14:55:02 +10:00
Peter Hutterer
8a415e486a Add tagging of trackballs
Currently unused, but oh, the possibilities...

The only thing we have to go on for trackballs at the moment is whether they
have "Trackball" in the name string. All others need to be manually tagged.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-05-03 17:17:28 +10:00
Peter Hutterer
afdcaf5015 touchpad: add LIBINPUT_MODEL_WOBBLY_TOUCHPAD for the HP 14-ac157tu
If some elantech touchpads require a hysteresis, let's use some more generic
tag for those touchpads that require correct handling of pointer wobbles.

https://bugs.freedesktop.org/show_bug.cgi?id=94897

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-04-15 10:46:54 +10:00
Peter Hutterer
8ebe33827e udev: update the hwdb matches to avoid use of ( and )
libudev's util_replace_chars() replaces the () with underscores so that match
would work too but let's use ? instead to make it look like a regex.

This now activates the rules for all cyapa touchpads, before they wouldn't
have applied to any device.

https://bugs.freedesktop.org/show_bug.cgi?id=93846#c12

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-04-14 08:56:36 +10:00
Peter Hutterer
a608d9dc2c touchpad: add quirk for the T450 and T460 generation hardware
The touchpad's sensors are too far apart (or the firmware interferes), causing
in a jerky movement visible especially on slow motion. We get a bunch of
normal motion events, then only ABS_MT_PRESSURE updates without x/y updates.
After about one mm of movement x/y updates resume, with the first event
covering the distance between the last motion event. That event is usually
accelerated and thus causes a large jump. Subsequent events are sufficiently
fine-grained again.

This patch counts the number of non-motion events. Once we hit 10 in a row, we
mark the first motion update as non-dirty, effectively discarding the motion
and thus stopping the pointer jumps.

https://bugs.freedesktop.org/show_bug.cgi?id=94379

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2016-03-11 10:02:26 +10:00
Peter Hutterer
07420eec05 touchpad: init a default hysteresis for ALPS rushmore touchpads
https://bugs.freedesktop.org/show_bug.cgi?id=90590

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-02-10 08:08:31 +10:00
Peter Hutterer
1f304763b4 udev: fix ALPS firmware detection
The firmware version is in id.version, not id.model which is always
PSMOUSE_ALPS for ALPS devices.

The various fw versions are listed in <kernel>/drivers/input/mouse/alps.h and
are all hex numbers. Version 8 is actually 0x800, change the match
accordingly.

Expected side-effect: earlier versions of ALPS touchpads now lose their
(erroneous) size assignment.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-02-10 08:08:31 +10:00
Peter Hutterer
f6c2d4b8b5 touchpad: drop motion hysteresis by default
Some older touchpad devices jitter a fair bit when a finger is resting on the
touchpad. That's why the hysteresis was introduced in the synaptics driver
back in 2011. However, the default value of the hysteresis in the synaptics
driver ended up being 0, even though the code looks like it's using a fraction
of the touchpad diagonal. When the hysteresis code was ported to libinput it
was eventually set to 0.5mm.

Turns out this is still too high and tiny finger motions are either
nonreactive or quite jumpy, making it hard to select small targets. Drop the
default hysteresis by reducing its margin to 0, but leave it in place for
those devices where we need them (e.g. the cyapa touchpads).

https://bugs.freedesktop.org/show_bug.cgi?id=93503

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-02-04 15:12:55 +10:00
Peter Hutterer
e19d5d228c evdev: disable the mode button on the Cyborg RAT 5
This button sends a release N, press N+1 on each press, cycling through the
three event codes supported. This causes a stuck button since the current mode
is never released.

Long-term this better served by a set of switches that toggle accordingly, for
now disable the button codes.

https://bugs.freedesktop.org/show_bug.cgi?id=92127

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-02-01 08:37:41 +10:00
Caibin Chen
b3f11180e3 touchpad: fix DWT pairing for Macbook Pro 2015
Label internal keyboards through the udev hwdb and only pair the internal
(usb) Apple touchpads with those keyboards labelled as such.

https://bugs.freedesktop.org/show_bug.cgi?id=93367

Co-authored-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-01-11 10:11:32 +10:00
Peter Hutterer
53c28a7d75 touchpad: add a special quirk for the Lenovo x220 with updated firmware
If an x220 is updated to the touchpad firmware version 8.1, the touchpad
suffers from the same issues as the x230 and needs custom acceleration code.
Unfortunately we cannot detect this otherwise, so it is left to the user as a
custom hwdb setting.

https://bugzilla.redhat.com/show_bug.cgi?id=1264453

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-12-14 08:25:56 +10:00
Peter Hutterer
05ce472a05 udev: use prop_value() to fetch the ID_INPUT_PROP property
This will thus work if the property is only set on a parent device, not on the
device directly.

https://github.com/systemd/systemd/issues/763

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-08-11 07:49:42 +10:00
Peter Hutterer
e625d2d24b udev: include new udev rule in EXTRA_DIST
Fixes distcheck

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-08-04 10:26:43 +10:00
Peter Hutterer
6933062dab touchpad: elantech touchpads can use a 2mm gesture motion threshold
Unlike ALPS and Synaptics semi-mt touchpads, the Elantech touchpads appear to
be precise enough to allow a smaller motion threshold before we decide on the
type of gesture (pinch vs scroll).

https://bugs.freedesktop.org/show_bug.cgi?id=91475

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-08-03 11:40:29 +10:00
Jonas Ådahl
091206c907 Ignore test devices for libinput contexts not run from the test suite
Add a LIBINPUT_TEST_DEVICE udev parameter to test devices created by
the test suite. When an application tries to add such a device to the
path backend or when the udev backend discovers such a device, it will
be ignored. Only the context when run via the test suite will actually
handle these devices.

Doing this will enable a user to run the libinput test suite on a system
running libinput without having the test suite devices interfering with
the actual system.

Note that X.org users running an input device driver that is not the
libinput X input driver will still need to manually configure the X
server to ignore such devices (see test/50-litest.conf).

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-07-28 17:42:32 +08:00
Peter Hutterer
eb146677eb touchpad: disable 2fg scrolling on Synaptics semi-mt touchpads
These touchpads have a terrible resolution when two fingers are down, causing
scrolling to jump around a lot. That then turns into bug reports that we can't
do much about, the data is simply garbage.

https://bugs.freedesktop.org/show_bug.cgi?id=91135

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-07-27 19:34:42 +10:00
Peter Hutterer
ab016fd8ed Tag synaptics serial touchpads with a LIBINPUT_MODEL tag
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Hallelujah-expressed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-07-22 13:53:09 +10:00
Peter Hutterer
aacf40341d evdev: allow for multiple LIBINPUT_MODEL_* flags per device
On some devices we need to set more than one flag, i.e. make it into actual
flags.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Hallelujah-expressed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-07-22 13:53:04 +10:00
Peter Hutterer
32f298c127 udev: don't install the litest udev rules
They are installed by the test.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-07-16 15:15:20 +10:00
Peter Hutterer
a13d936d74 evdev: parse LIBINPUT_ATTR_RESOLUTION_HINT
For Elantech touchpads, we know that the resolution is 31u/mm (800dpi) for
v1-v3 firmware. Set this as a hint until we get either the kernel or systemd
to set this for us.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-07-15 12:49:44 +10:00
Peter Hutterer
fcd7af86e2 udev: add size hint for apple touchpads
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-07-14 10:12:12 +10:00
Peter Hutterer
a74dcf965a udev: add ALPS firmware detection and size properties
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-07-14 10:12:12 +10:00
Peter Hutterer
b06a1be013 udev: add a model-quirks callout
Some model-specific information isn't available through udev properties. This
callout is used to query the device directly and set a property that we can
then match on for the hwdb entries.

This is geared for Elantech and ALPS touchpads where the firmware version is
the interesting bit. The udev rule is added already to match on that, note
that the callout doesn't do anything at this point. The various
touchpad-related things will be added separately.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-07-14 10:12:12 +10:00
Peter Hutterer
4e39443757 udev: make sure the udev callout path is valid for a test run
udev requires callout binaries to sit in /lib/udev or otherwise provide an
absolute path. The test suite should work without installing everything first,
so create two rule files - one to install, one with the path to the
$builddir/test

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-07-09 11:29:06 +10:00
Peter Hutterer
2285217ae1 udev: make a note that hwdb matches are exclusive
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-07-01 11:13:46 +10:00
Peter Hutterer
7cd6f9780d Add missing copyright header to the udev callout
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-06-30 13:32:14 +10:00
Peter Hutterer
b1fc392268 udev: prepend the libinput group with the product string
Multiple devices plugged into the same USB hub have the same
PHYS path and are assigned to the same group.

Prepend the content of the PRODUCT env to the phys path, this at least ensures
that different devices are never grouped together.

https://bugs.freedesktop.org/show_bug.cgi?id=89802

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-06-23 09:07:44 +10:00