Commit graph

4204 commits

Author SHA1 Message Date
Evan Goode
034226d904 Allow the flat acceleration profile for touchpads
Signed-off-by: Evan Goode <mail@evangoo.de>
2020-05-27 06:21:00 +00:00
Peter Hutterer
0d06bfc4e2 tablet: add support for sendevents on tablets
This is merely the simple support that we use in the fallback backend as
well. It doesn't interact with touch arbitration directly but it'll be
good enough for the default use-case.

Fixes #476

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-05-26 05:11:01 +00:00
Hans de Goede
3618129496 quirks: Add HP stream x360 11 ModelTabletModeNoSuspend keyboard quirk
The HP stream x360 11's embedded-controller filters out events form its
builtin keyboard when in tablet-mode itself; and it has a capacitive
home-button (windows logo) underneath its display which also sends
PS/2 key-events.

Suspending the keyboard while in tablet-mode also disable the capacitive
home button, which is undesirable.

Add a ModelTabletModeNoSuspend quirk so that the home button keeps working
when in tablet-mode. This can safely be done since the rest of the
keyboard gets disabled by the embedded-controller for us.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2020-05-22 04:06:40 +00:00
Peter Hutterer
ba68cdf67e tools: replay: allow for missing quirks entry in libinput recordings
Older recordings don't have that field so we should just ignore that
case.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-05-22 03:41:05 +00:00
Peter Hutterer
ba24c95b05 test: add a test for disabling the forced prox out
This somewhat duplicates the existing test
huion_static_btn_tool_pen_disable_quirk_on_prox_out

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-05-22 03:10:06 +00:00
Peter Hutterer
0b221c6c97 tablet: handle a valid prox-out sequence after a forced proximity out
With the previous patches a tablet would ignore a valid proximity out sequence
where it happends after a forced prox-out. Fix this by checking the state when
we're in forced proximity out - if we have a zero tool state but a tool
updated then we did get a proximity out.

And fix the existing test to check for that case.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-05-22 03:10:06 +00:00
Peter Hutterer
c457050d44 Revert "tablet: don't disable the proximity quirk on good sequences"
This quirk was introduced for #248 was caused by buggy input-wacom drivers,
not by actual firmware, see
https://gitlab.freedesktop.org/libinput/libinput/issues/381#note_279371

This appears to be the only tablet where this fix was needed, but we've been
playing whack-a-mole ever since to work around the various other tablets that
break with this behavior in place.

So let's revert that fix and hope there aren't any other tablets out there
(and if they are, we can probably quirk those). The revert makes the ISDV4 pen
quirk obsolete (see 9cb089f2b6), so this was
folded into this commit.

This reverts commit 4f63345b60.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-05-22 03:10:06 +00:00
Matt Mayfield
73870d938e touchpad: restore thumb detection while keeping fixes from !292
!292 improved libinput's ability to detect multiple-finger clicks when
the fingers were not aligned close to horizontally. However that caused
thumb detection to fail in several use cases.

This patch restores thumb detection for
- 2+ finger physical clickpad presses
- resting thumb while two-finger scrolling
- touches in the thumb exclusion area during multi-finger taps
and improves pinch detection when thumb is centered below fingers.

It also further enhances the flexibility of finger position for 2-, 3-,
or 4-finger taps: if all tapping fingers land on the touchpad within a
short time (currently 100ms), they will all count regardless of
position (unless below the lower_thumb_line).

Signed-off-by: Matt Mayfield <mdmayfield@yahoo.com>
2020-05-22 02:16:05 +00:00
Peter Hutterer
4ff6d6e317 Deprecate wheel tilt as separate axis source
This has never been supported through the stack. No device ever had the
required MOUSE_WHEEL_TILT_VERTICAL/HORIZONTAL udev property set, so
libinput never set the right axis source. Neither weston nor mutter
added the code for it. Even if we added wheel tilt for devices now, it
would break those devices. And the benefit we get from having those
separate is miniscule at best.

So let's do the long-term thing and just deprecate this axis source.

The wheel tilt mouse test device remains in the test suite, with the
udev properties set just to verify that we do indeed ignore those now.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-05-21 07:29:44 +00:00
Peter Hutterer
152837f44a quirks: mark the 0x233 razer keyboard as internal
Razer Blade 2018 has a different model ID than the one we already have.

Fixes #489

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-05-21 13:34:28 +10:00
Peter Hutterer
bd7b91065b evdev: warn if our event processing lags by 10ms or more
Take a snapshot of the time every 10 libinput_dispatch() calls. During event
processing, check if the event timestamp is more than 10ms in the past and
warn if it is. This should provide a warning to users when the compositor is
too slow to processes events but events aren't coming in fast enough to
trigger SYN_DROPPED.

Because we check the device event time against the dispatch time we may get
warnings for multiple devices on delayed processing. This is intended, it's
good to know which devices were affected.

In the test suite we need to ignore the warning though, since we compose the
events in very specific ways it's common to exceed that threshold
(particularly when calling litest_touch_move_to).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-05-13 06:21:27 +00:00
Peter Hutterer
2ff0c3427d test: fix the lookup for the timer offset warnings
This was changed in 5e25bdfb03 but the litest
message lookup wasn't changed. Let's do that now and change to a generic
wording we can re-use for other messages.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-05-13 06:21:27 +00:00
Peter Hutterer
bfccf5c405 touchpad: correct a comment regarding the touchpad integration
The previous text wasn't accurate enough, USB used to be considered
external but we've since started deferring to the hwdb for those (except
Apple).

Fixes #483

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-05-12 13:46:57 +10:00
Troels Blicher Petersen
50ee371c59 Lenovo X201 Tablet: Added bezel buttons support in tablet mode
This patch allows the bezel buttons,
to work when entering SW_TABLET_MODE
similar to how other x2xx tablets are
working.

Signed-off-by: Troels Blicher Petersen <troels@newtec.dk>
2020-05-08 13:18:09 +00:00
Peter Hutterer
975d036713 tools: measure-fuzz: sleep for 2 seconds to give the hwdb time
one second isn't always enough here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-04-19 16:04:58 +10:00
Peter Hutterer
28e7f62302 tools: measure-fuzz: fix the tool to work again
Where libinput is installed, checking whether the fuzz is applied to the
device will always fail with an error - the udev rules will remove the
fuzz and copy its value to the LIBINPUT_FUZZ properties instead.

So let's fix this: where the fuzz shows up on the device print a warning
because libinput's udev rule isn't working. And where it's missing check
the udev properties and compare those to the settings instead.

Fixes #472

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-04-19 16:04:58 +10:00
Peter Hutterer
a22137e7fd tools: measure-fuzz: run systemd-hwdb update, not udevadm hwdb
For backwards compatibility reasons, the hwdb.bin created udevadm hwdb
does not actually apply matches in the way you'd expect. systemd-hwdb
creates the newer format and is preferred.

Related: #472

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-04-19 15:23:23 +10:00
Peter Hutterer
3ec74cfc35 tools: measure-fuzz: handle a None return correctly
Fixes #472

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-04-19 15:18:42 +10:00
Peter Hutterer
58cf854124 gitlab CI: Ubuntu 19.04 is EOL, drop it
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-04-18 05:17:52 +00:00
Peter Hutterer
d107d58cd2 tools: per-slot-delta: skip the extra evbit indirection
e.code is the evbit anyway, we don't have to convert it

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-04-16 06:10:25 +00:00
Peter Hutterer
e48a316c02 gitlab ci: fix a templating whitespace issue
For some reason I'm too tired to investigate, the whitespace in the CI is
different than the locally generated one. Alpine must've updated something, I
guess. Quickfix it by adjusting the whitespace so it's correct again.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-04-16 15:45:05 +10:00
Peter Hutterer
78dcbec7a4 tools: per-slot-delta: drop an unused variable
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-04-11 15:32:22 +10:00
Peter Hutterer
f5ab18ab8f tools: per-slot-delta: always mark slot 0 as used
If a device never sends ABS_MT_SLOT, our output was emtpy.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-04-11 15:32:17 +10:00
Peter Hutterer
d88ad293d2 tools: per-slot-delta: add arguments to set a threshold and ignore-below
The threshold colors events above a certain value in red, ignore-below skips
any line below that threshold.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-04-11 14:35:27 +10:00
Peter Hutterer
61296feaee tools: per-slot-delta: init the slots with the right index
The index is unused, but useful during debugging

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-04-11 13:50:53 +10:00
Peter Hutterer
4e03175307 tools: per-slot-delta: move printing the slot data into a helper function
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-04-11 13:50:53 +10:00
Peter Hutterer
5a9fb539d9 tools: per-slot-delta: print the BTN_TOUCH etc. bits in-line
New output example:

 9.408899    +5ms DBL: ↑↗    1/  -9 | →→    0/   0 |

where DBL stands for BTN_DOUBLE.

This also widens the relative time by one so we don't lose formatting for >1s
delta time.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-04-11 13:38:48 +10:00
Peter Hutterer
c23484a9ec tools: per-slot-delta: only render the slots that have been seen
Makes the output easier to understand given that most touchpads have 5+ slots
but don't actually use them (or the users don't).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-04-11 13:38:48 +10:00
Loïc Yhuel
dd0370f73c quirks: correctly print boolean values
When a boolean quirk is set to "0", it is correctly disabled, but "libinput quirks list" and
"libinput record" showed it as "1".

This happens for example if ModelXXXX=0 is set in /etc/libinput/local-overrides.quirks, to
override a default quirk.

Signed-off-by: Loïc Yhuel <loic.yhuel@softathome.com>
2020-04-06 23:51:01 +02:00
Peter Hutterer
c4cb4da33a util: make the trace macro actually useful
This has been there for years and I never used it. Much better to convert it
to a generically useful one (i.e. one that prints red so it's easy to see) and
make it unconditional.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-04-04 21:10:40 +10:00
Peter Hutterer
72af32c89e tablet: use the AttrPressureRange quirk for tablets too
The Aiptek 8000U has a pressure offset above our default (%5) but no
meaningful way of detecting that. It doesn't provide distance or BTN_TOOL_PEN
either, so our heuristics can't hook onto anything. BTN_TOUCH is set by this
tablet but not at consistent pressure thresholds.

Work around this by shipping a quirk that ups it to 70. Aiptek
re-uses USB IDs because of course they do, so this applies to more than one
device. Let's see what breaks.

Fixes #462

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-31 02:49:24 +00:00
Peter Hutterer
4a9d3e8796 tools: add a measure touchpad-size tool
Replacement for the touchpad-edge-detector tool with a slightly more
expressive design, hopefully cutting down on some of the bug reports.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-30 15:14:45 +10:00
Peter Hutterer
101cbe16c3 tools: make the thumb threshold configurable while measuring pressure
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-30 14:45:19 +10:00
Peter Hutterer
ef5204fda7 tools: revamp the touchpad-pressure measuring tool
Let's hope this one is more obvious to use for users.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-30 14:44:47 +10:00
Peter Hutterer
9351f54d1c Fix race condition causing duplicate devices in udev seats
There is a race between adding the udev monitor and enumerating current
devices. Any device added in that window will show up in both lists, causing
it to be added twice.

Fix this by comparing the syspath of any added device to the existin ones in
the seat - where it matches we can ignore the device.

Fixes #459

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-30 03:48:25 +00:00
Peter Hutterer
281ecf10d1 udev: don't use IMPORT+=
IMPORT really only supports == and != and for a short while udevd warned about
this before that warning was reverted again.

Where anything else is used, it falls back to ==. systemd upstream rules all
use a single = though, so let's stick with that to be consistent, even if it
is technically wrong (udevd will warn about this in debug mode).

See the long discussion in systemd upstream for details:
https://github.com/systemd/systemd/issues/14062

Fixes #461

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-30 00:35:43 +00:00
Peter Hutterer
1f5a27bf3d tools: add libinput analyze to the libinput tool help output
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-29 15:33:24 +10:00
Peter Hutterer
1547e5b5d2 completion: add libinput analyze to zsh completions
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-25 05:52:56 +00:00
Peter Hutterer
8ed234243c doc/user: add a mini-blurb for the new libinput analyze tool
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-25 05:52:56 +00:00
Peter Hutterer
5063f30492 gitlab CI: generate the jobs for the custom builds from the config.yaml
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-23 07:05:28 +00:00
Peter Hutterer
dedee77d62 gitlab CI: autogenerate the qemu tests for the last version of a distribution
Where want_qemu is set for a distribution, we generate the qemu tests for that
distribution for its last version listed.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-23 07:05:28 +00:00
Peter Hutterer
5991023a7c gitlab CI: invert the ci-templates check
This makes the config file simpler, use a variable that is default false but
true where we need it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-23 07:05:28 +00:00
Peter Hutterer
31479b346d gitlab CI: switch the 'needs' tags to a dashed list
We don't use the [...] style list elsewhere, so let's not do this here either.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-23 07:05:28 +00:00
Peter Hutterer
d946c062d8 gitlab CI: update the various build tests to F32
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-23 07:05:28 +00:00
Peter Hutterer
cbf55a6264 gitlab issue templates: remove the checkmarks
They show up like a task list in the issue tracker and that's not useful.

Likewise, make the "attach this" more prominent by no longer making it a
comment.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-22 22:33:01 +00:00
Martin Cihlář
4d42e9b9e2 add trust mouse quirk #455
Signed-off-by: Martin Cihlář <martin.cibule@seznam.cz>
2020-03-22 12:07:51 +01:00
Peter Hutterer
7814bcfed0 meson.build: bump to 1.15.900
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-22 10:51:01 +10:00
Peter Hutterer
8a858fc65e test: fix a scan-build warning (value set but not read)
This test pre-dates litest_assert_empty_queue(), so let's just use that

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-22 10:44:17 +10:00
Peter Hutterer
a1a419df6c util: fix a scan-build warning (value set but not read)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-22 10:43:52 +10:00
Peter Hutterer
05201958eb evdev: print a human time for ratelimit tests
No point in printing an interval of e.g. 2h as milliseconds, let's convert
this to something human-readable.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-22 10:35:21 +10:00