Commit graph

129 commits

Author SHA1 Message Date
Peter Hutterer
870ddce9e4 Drop the udev hwdb model quirks
Replaced with the quirks files in merge commit
000ac14c27

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-18 11:04:43 +10:00
Peter Hutterer
845e912527 udev: remove duplicate Chromebook Falco hwdb entry
We can expand the first one and re-use it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-08 13:47:33 +10:00
Peter Hutterer
07eefba84b udev: the IBM X41 Tablet must not disable the keyboard in tablet mode
https://bugs.freedesktop.org/show_bug.cgi?id=106799

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-05 10:44:53 +10:00
Peter Hutterer
085a33d545 Revert "udev: copy the trackpoint sensitivity directly from sysfs"
The lenovo compact keyboard with trackpoint has a sensitivity of 5, which
causes the trackpoint range to be 0. This in turn causes inf/NaN during
pointer acceleration as we divide by 0 and makes the cursor go unpredictably
somewhere it probably shouldn't be.

This is part of a wider problem in that the current sensitivity handling
doesn't work well for values well below the default of 128. Any such values
are scaled up to multiples of pixels instead of just working as-is.

Reverting the automatic sensitivity parsing, any systemd udev property set to
change the sensitivity increases it, so we don't run into this bug.

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

This reverts commit a4036a33ca.
2018-06-04 08:44:11 +10:00
Peter Hutterer
a55693f87c udev: drop the JUMPING_SEMI_MT quirk, no-one uses it
Obsolete since 342bc51016 when we disabled MT on
all semi-mt touchpads.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-31 13:09:37 +10:00
Peter Hutterer
a9ef4ba1f3 udev: drop the custom firmware detection code in favor of a modalias
This was overengineered. The separation between the model quirks file and the
udev hwdb matches allowed for more complex firmware detection. Except we never
used it anywhere but on ALPS and there we can, thankfully, just get it from
the version number in the input_id field exposed in the modalias.

So let's drop this and use that match instead. We just need an extra udev rule
to match on ID_INPUT_POINTINGSTICKs so we can differ between ALPS touchpads
and ALPS trackpoints.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-31 13:09:33 +10:00
Peter Hutterer
9b1b87cadd touchpad: replace the hardcoded thumb threshold with a udev prop
LIBINPUT_ATTR_THUMB_PRESSURE_THRESHOLD now determines whether we do thumb
pressure detection or not. Much better than having a hardcoded default that
may or may not be correct on any given device.

This patch is likely to break thumb detection on some touchpads, the only
property so far is to restore the default of 100 for all Lenovo Thinkpad
touchpads. More rules are needed, we'll just wait until someone shouts.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-30 09:42:06 +10:00
Peter Hutterer
50d8bc722c udev: default to a trackpoint range of 160 for the new ALPS trackpoints
https://bugs.freedesktop.org/show_bug.cgi?id=106323

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-30 09:42:06 +10:00
Martin Wilck
c5bfa00760 udev: support firmware detection for pointing sticks
Add support for firmware detection on pointing stick devices. This
is needed for ALPS only at this time.

Signed-off-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-30 09:42:06 +10:00
Peter Hutterer
7e6dd22ad5 udev: fix entry for Lenovo X280, missing dmi: prefix
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-24 11:19:07 +10:00
Peter Hutterer
6dcdfdd513 evdev: add three more Logitech K400-like devices to the debouncing quirk
And rename the model flag, no point in having separate flags here, we likely
have to add more devices over time.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-17 12:37:20 +10:00
Veli-Jussi Raitila
d7ff5a8f0d Add quirk to fix spurious palm detections on MacBook Pro (13-inch, Mid 2009)
https://bugzilla.redhat.com/show_bug.cgi?id=1575260
https://bugs.freedesktop.org/show_bug.cgi?id=106489

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-15 09:13:29 +10:00
Paul Kocialkowski
cdebfc78ff udev: Fix Chromebook R13 CB5-312T hwdb name
This fixes a typo in the Chromebook R13 CB5-312T hwdb name match and
extends it to the full model name, so that potential future other
Chromebook R13 devices (that are not CB5-312T) won't use these quirks.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-09 14:18:16 +10:00
Peter Hutterer
a4036a33ca udev: copy the trackpoint sensitivity directly from sysfs
Rather than going the roundabout way of having systemd set the sensitivity
followed by us reading that udev property and hoping, just take the
sensitivity directly from sysfs. This makes us basically independent of what
systemd does (or the lack of systemd, where that is a problem).

It does remove the chance of users to trick libinput by manually adjusting the
sensitivity after the udev rules kicked in, but seriously, we should work on
fixing acceleration properly in that case.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-03 19:15:18 +10:00
Mike Hogye
a1ca02ec88 Fix spurious palm detections for Logitech Wireless Touchpad
This device frequently reports large pressure values during normal usage.
It does not require a tight palm threshold, because it is a desktop device
-- not built into a laptop surface -- so we can avoid false positives by
setting a very high threshold.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-02 08:20:38 +10:00
Peter Ganzhorn
4cc2b952a2 fallback: Add IBM/Lenovo Scrollpoint mice quirk to enable smooth scrolling.
Instead of a scroll wheel these mice feature trackpoint-like sticks which
generate a huge amount of scroll events that need to be handled differently
than scroll wheel events.

Signed-off-by: Peter Ganzhorn <peter.ganzhorn@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-26 09:53:57 +10:00
Peter Hutterer
74e20e0ae0 evdev: disable ABS_MT_TOOL_PALM on the Lenovo X1 Carbon 6th gen
This device randomly decides that a touch is now a palm, based on
the moon phase, the user's starsign and possibly what the dog had for
breakfast. Since libinput assumes that a touchpad that labels a touch as palm
has reasons to do so, let's unassume this for this device by disabling that
axis altogether and relying on the touch pressure only.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2018-04-20 17:01:10 +10:00
Daniel van Vugt
d5b4558675 Improve responsiveness for Apple Magic Trackpad
The touch size threshold was too high, so occasionally libinput would
think the finger had lifted when it hadn't and events would be ignored.

Similarly, the palm threshold was too low, so occasionally libinput would
think a heavy single finger was a palm and ignored that too.

This fixes both of those issues.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-19 10:53:34 +10:00
Peter Hutterer
0dccaa8a42 udev: add the P50 to the T450 jumping motion quirks
On slow finger motion, this device also sends a bunch of events with only
pressure updates, followed by a massive coordinate jump. Enable the quirk so
we skip that jump.

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

This patch was initially applied as ab55302ef and reverted as e8cb7e4523.
Turns out the issues are unrelated to this patch, so let's re-apply it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-18 15:35:51 +10:00
Davide Depau
5feaa5f00c evdev: don't suspend keyboard on ThinkPad X1 Yoga 1st in tablet mode
When the X1 Yoga is in tablet mode, one capacitative touch button (windows
key, sends KEY_LEFTMETA) and two side volume buttons are accessible on the
front. The key event comes through the internal keyboard that we disabled in
tablet mode so it stops working.

Luckily the Yoga physically disables the "main" keyboard when in tablet mode,
so all we have to do is skip our code to disable the keyboard and the keys are
working again.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-18 14:36:31 +10:00
Sean Lanigan
5aec854ac3 Add Dell XPS13 L322X touchpad quirks
Signed-off-by: Sean Lanigan <sean@lano.id.au>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-17 10:08:29 +10:00
Peter Hutterer
ea52b0d575 Revert "Add Dell XPS13 L322X touchpad quirks"
The current match doesn't capture all L322X devices, the 'pn' element of
the dmi modalias can read 'pnXPSL322X' or 'pnDellSystemXPSL322X'.
Reverting in favour of the following patch.

This reverts commit 69fe467fba.

https://bugs.freedesktop.org/show_bug.cgi?id=104990
2018-04-17 10:06:22 +10:00
Sean Lanigan
69fe467fba Add Dell XPS13 L322X touchpad quirks
https://bugs.freedesktop.org/show_bug.cgi?id=104990

Signed-off-by: Sean Lanigan <sean@lano.id.au>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-13 11:15:04 +10:00
Peter Hutterer
23614f7551 debounce: disable debouncing on the Logitech K400
This is an external keyboard+touchpad but not recognised as touchpad by the
kernel so it's in mouse emulation mode. Double-taps are sent with impossibly
close timestamps and filtered out by the debouncing code. Since this isn't a
real button that can wear out anyway, let's just disable debouncing on this
device.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-13 09:29:36 +10:00
Peter Hutterer
e8cb7e4523 Revert "udev: add the P50 to the T450 jumping motion quirks"
Apparently this negatively affects scrolling behavior.

https://bugs.freedesktop.org/show_bug.cgi?id=105022#c38

This reverts commit ab55302ef8.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-10 08:55:56 +10:00
Peter Hutterer
93dfd0fa54 udev: add T450s trackpoint range
From https://bugs.freedesktop.org/show_bug.cgi?id=103947

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-23 14:17:33 +10:00
Peter Hutterer
cf445f99dc udev: add trackpoint range for the T440s
Measured at 200 sensitivity because that's what systemd sets for us

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-23 13:38:07 +10:00
Peter Hutterer
238ffd3227 udev: add the T440p to the T450 jumping motion quirks
On slow finger motion, this device also sends a bunch of events with only
pressure updates, followed by a massive coordinate jump. Enable the quirk so
we skip that jump. This is for RMI4 and PS/2, RMI4 is confirmed in the bug
below, let's assume PS/2 has that issue too.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-23 13:38:07 +10:00
Peter Hutterer
9d7f48b66a udev: add trackpoint range for Lenovo X280
https://bugs.freedesktop.org/show_bug.cgi?id=105485

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-23 10:17:52 +10:00
Peter Hutterer
ab55302ef8 udev: add the P50 to the T450 jumping motion quirks
On slow finger motion, this device also sends a bunch of events with only
pressure updates, followed by a massive coordinate jump. Enable the quirk so
we skip that jump.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-20 15:32:01 +10:00
Peter Hutterer
49a8bd3ca7 Merge branch 'wip/hysteresis-wobbles' 2018-03-09 10:17:43 +10:00
Peter Hutterer
1523d8bb2e Extract and reset the abs fuzz value for the x/y axes
The kernel fuzz handling is buggy, especially when we want to rely on the fuzz
value for our hysteresis. But since this is a hw property and (at least
sometimes) set by the driver, we can't make this a pure libinput hwdb set
either.

So our workaround is:
* extract the (non-zero) fuzz into a udev property so we don't lose it
* set the fuzz to 0 to disable the in-kernel hysteresis
* overwrite our internal absinfo with the property fuzz

This way we get to use the hw-specified fuzz without having the kernel muck
around with it. We also get to use the EVDEV_ABS_ values in 60-evdev.hwdb to
override a driver-set fuzz.

Two drawbacks:
- we're resetting the kernel fuzz to 0, this affects any other users of the
  device node. That's probably a minor impact only.
- we can only save this in a udev property there's a risk of this information
  getting lost when playing around with udev rules. That too should be a minor
  issue.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-09 09:49:54 +10:00
Peter Hutterer
a437d9374b touchpad: enable palm detection on tablets' touchpads
https://bugs.freedesktop.org/show_bug.cgi?id=104986

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-05 15:51:17 +10:00
Mario Di Raimondo
f47eb2d796 Fix Apple Magic Trackpad sensitivity
https://bugs.freedesktop.org/show_bug.cgi?id=103572

Signed-off-by: Mario Di Raimondo <mario.diraimondo@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-02 14:24:59 +10:00
Peter Hutterer
f1b740022a udev: fix flake8-3 complaint in parse_hwdb.py
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-02-27 14:36:08 +10:00
Peter Hutterer
da94e4e603 Silence coverity warning about uninitialized entry
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-02-16 16:57:30 +10:00
Peter Hutterer
582e3c00b7 Add a test device for aiptek tablets
This tablet advertises tilt but doesn't actually have it. Let's rule out tilt
for all aiptek devices until someone complains.

Recording from: https://bugzilla.redhat.com/show_bug.cgi?id=1535755
Related to: https://bugs.freedesktop.org/show_bug.cgi?id=104911

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-02-13 16:04:58 +10:00
Peter Hutterer
3a3fd645c4 evdev: add a quirk to disable debouncing on the MS Nano Transcievers
A set of wireless devices that can scramble the timestamps, so we get
press/release within 8ms even though I doubt the user is capable of doing
this. Since they're generally good quality anyway, let's just disable
debouncing on those until someone complains and we need something more
sophisticated.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-02-13 15:58:48 +10:00
Peter Hutterer
c06660b314 udev: add integration flag for the Lenovo Compact Keyboard with TrackPoint
From https://bugzilla.redhat.com/show_bug.cgi?id=1510814

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-14 15:53:12 +10:00
Benjamin Tissoires
57c5a409d6 udev: drop the version field in device groups
The version field is a per device information. We have
no guarantees a touchscreen and a tablet device will share
the same version of the firmware (especially if both
firmwares are from different vendors).

Fixes the touch arbitration for the Dell Canvas 27

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-10-26 18:25:54 +10:00
Peter Hutterer
23a611ea1e fallback: allow for multiple keyboards to toggle the lid switch
Previously we only listened for events on the first one to come up, based on
the assumption that there can only be one internal keyboard. The Razer Blade
laptop keyboards come with with multiple event nodes, all looking like a
normal keyboard. The one that comes up first is one for special keys, so
typing on the internal keyboard after a lid switch does not toggle the write
state.

Fix this by allowing for up to 3 keyboard listeners for a lid switch.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-09-25 14:14:20 +10:00
Peter Hutterer
77890ecc8f tablet: always enable the no-proximity-out quirk on HUION tablets
And instead disable it when we do get a proximity out.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2017-09-21 12:27:46 +10:00
Peter Hutterer
1962c6f2db tablet: add a quirk for the HUION PenTablet that doesn't send proximity out events
Could be fixed in the kernel, but these tablets are effectively abandoned and
fixing them is a one-by-one issue. Let's put the infrastructure in place to
have this fixed once for this type of device and move on.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Yay-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2017-09-20 09:30:06 +10:00
Peter Hutterer
c44c028678 udev: move the EKR into the parent's device group
If we find an EKR, search for the usb hub of the Cintiq, then find the Cintiq
Pen (or Touch) device and assume that device's product id. This way we end up
in the same device group as the Cintiq.

Co-authored-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-09-07 08:59:20 +10:00
Peter Hutterer
64fcd7bd02 udev: update pressure range for Dell Latitude E6620
"This gives some more sensitivity to the fingers without introducing spurious
touches and movements."

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-08-21 11:41:19 +10:00
Peter Hutterer
ca4285de66 touchpad: add touch-size-based palm detection
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-11 12:28:28 +10:00
Peter Hutterer
432fbc33cd touchpad: add touch-size based touch handling
Apple touchpads don't use ABS_MT_PRESSURE but they are multitouch touchpads,
so the current pressure-based handling code doesn't apply because it expects
slot-based pressure for mt touchpads.

Apple does however send useful data for ABS_MT_WIDTH_MAJOR/MINOR, so let's use
that instead. The data provided in those is more-or-less random, so we need a
hwdb entry to track the acceptable thresholds.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-11 12:27:54 +10:00
Peter Hutterer
c268e5f003 udev: fix flake8 style warnings
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-10 09:51:36 +10:00
Peter Hutterer
064d74f574 udev: cleanup hwdb parsing
Group into similar props, we really only have value-based properties or
type-based properties. Compress those together so it's easier to understand.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-10 09:34:54 +10:00
Peter Hutterer
ca9d6a88d7 Merge branch 'wip/touchpad-palm-pressure' 2017-07-04 13:57:32 +10:00