Commit graph

15 commits

Author SHA1 Message Date
Peter Hutterer
1ea91b212b 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>
(cherry picked from commit 9d7f48b66a)
2018-04-18 15:09:41 +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
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
25d54b90db touchpad: add pressure-base palm detection
If a touch goes past the fixed pressure threshold it is labelled as a palm and
stays a palm. Default value is one that works well here on a T440 and is
virtually impossible to trigger by a normal finger or thumb. A udev property
is exposed so we can handle this in the udev hwdb and the new tool introduce a
few commits ago can help finding the palm detection threshold.

Unlike the other palm detection features, once a palm goes past the threshold
it remains a palm until the touch is released. This means palm overrides any
other palm detection features. For code simplicity, we don't combine the
states but merely check for pressure before and after the other palm detection
functions. If the pressure triggers, it will trigger before anything else. And
if something else is already active (e.g. edge where the pressure doesn't work
well) it will trigger as soon as the palm is released.

The palm threshold should thus be chosen with some room to spare between the
highest finger pressure.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-03 15:58:13 +10:00
Peter Hutterer
1cfa1f64cf evdev: read LIBINPUT_ATTR_KEYBOARD_INTEGRATION property
We have heuristics for detecting whether a keyboard is internal or external,
but in some cases (e.g. Surface 3) these heuristics fail. Add a udev property
that we can apply to these cases so we have something that's reliable.

This will likely eventually become ID_INPUT_KEYBOARD_INTEGRATION as shipped by
systemd, similar to the touchpad property.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-23 15:10:10 +10:00
Gabriel Laskar
cef2a09524 udev/hwdb_parser.py: use python3 from env instead of /usr/bin
python installation does not always lives in /usr/bin, this allows to
use virtualenv for example.

Signed-off-by: Gabriel Laskar <gabriel@lse.epita.fr>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-15 10:22:09 +10:00
Peter Hutterer
8d5f4decb4 touchpad: move the pressure range to a hwdb entry
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-26 12:38:15 +10:00
Peter Hutterer
019f185107 touchpad: add a hwdb quirk for (external) touchpad/keyboard combos
Specify the layout of the combo so we know when to initialize palm detection.

This allows us to drop palm detection on external touchpads otherwise,
replacing the wacom-specific check with something more generic..

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2017-02-13 08:28:37 +10:00
Peter Hutterer
dc15a42d6c switch: for surface 3 tablets, write the lid open to the device
These tablets only ever give us a close event, the open event is broken. So
when we detect keyboard events, fix the kernel device's state by writing the
event to the fd.

We still sync the lid state manually, in case this fails and we don't get the
SW_LID through the normal event sequence. If it works fine, the real open
event will just be ignored.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-30 15:26:45 +10:00
Peter Hutterer
2a8d64c02d udev: mark all laptops as lid switch reliable
If the chassis type is 9 or 10 (Laptop, Notebook) let's assume that our lid
switch works. On anything else we leave it at unknown.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-30 15:26:44 +10:00
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
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