platform/upstream/libinput.git
4 years agotouchpad: correct the tap state transitions for a palm on TOUCH_BEGIN
Peter Hutterer [Thu, 28 May 2020 00:58:06 +0000 (10:58 +1000)]
touchpad: correct the tap state transitions for a palm on TOUCH_BEGIN

Where a touch is labelled as palm on TOUCH_BEGIN (edge palms) we would still
feed the touch through the tap state machine. This would trigger the PALM
transition for each state, usually reducing the touch count.

When the touches were later released, the touch count was out of sync,
resulting in an error message. In the case of #488, the trigger was
a single evdev frame with three fingers down, the third of which was an edge
palm:
- touch 1 transitions from IDLE to TOUCH
- touch 2 transitions from TOUCH to TOUCH_2
- touch 3 (the palm) transitioned from TOUCH_2 back to TOUCH

That third transition is invalid, the palm hasn't been seen by the tap state
machine so it should just be ignored.

Fix this by moving making the tap state processing conditional on a touch
state other than TOUCH_BEGIN.

Fixes #488

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotest: move the check for edge palms on devices to litest proper
Peter Hutterer [Thu, 28 May 2020 00:57:45 +0000 (10:57 +1000)]
test: move the check for edge palms on devices to litest proper

We'll need this in other files soon

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotouchpad: add touch state debugging to the palm and tap state debug logs
Peter Hutterer [Thu, 28 May 2020 00:33:21 +0000 (10:33 +1000)]
touchpad: add touch state debugging to the palm and tap state debug logs

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: alpine needs pip explicitly installed now
Peter Hutterer [Wed, 3 Jun 2020 11:22:21 +0000 (21:22 +1000)]
gitlab CI: alpine needs pip explicitly installed now

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agoIgnore key repeat in all backends
Peter Hutterer [Tue, 2 Jun 2020 00:52:11 +0000 (10:52 +1000)]
Ignore key repeat in all backends

Since we don't really care about keys in any of these backends and buttons
shouldn't autorepeat anyway, this should have no effect on functionality. But
it does guard us against potential kernel bugs like  this one:
https://www.spinics.net/lists/linux-input/msg67653.html

See https://gitlab.freedesktop.org/libinput/libinput/-/issues/447#note_468971

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agoAllow the flat acceleration profile for touchpads
Evan Goode [Fri, 22 May 2020 17:24:34 +0000 (13:24 -0400)]
Allow the flat acceleration profile for touchpads

Signed-off-by: Evan Goode <mail@evangoo.de>
4 years agotablet: add support for sendevents on tablets
Peter Hutterer [Fri, 22 May 2020 01:39:49 +0000 (11:39 +1000)]
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>
4 years agoquirks: Add HP stream x360 11 ModelTabletModeNoSuspend keyboard quirk
Hans de Goede [Fri, 15 May 2020 19:17:36 +0000 (21:17 +0200)]
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>
4 years agotools: replay: allow for missing quirks entry in libinput recordings
Peter Hutterer [Fri, 22 May 2020 03:15:24 +0000 (13:15 +1000)]
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>
4 years agotest: add a test for disabling the forced prox out
Peter Hutterer [Mon, 23 Mar 2020 00:36:00 +0000 (10:36 +1000)]
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>
4 years agotablet: handle a valid prox-out sequence after a forced proximity out
Peter Hutterer [Fri, 27 Mar 2020 11:15:50 +0000 (21:15 +1000)]
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>
4 years agoRevert "tablet: don't disable the proximity quirk on good sequences"
Peter Hutterer [Sun, 22 Mar 2020 11:21:52 +0000 (21:21 +1000)]
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 9cb089f2b68ba21877ea0973c08837cf073679c8), so this was
folded into this commit.

This reverts commit 4f63345b60762e9a1c1e229a85058232e6f93ae6.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotouchpad: restore thumb detection while keeping fixes from !292
Matt Mayfield [Sat, 4 Apr 2020 17:56:21 +0000 (12:56 -0500)]
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>
4 years agoDeprecate wheel tilt as separate axis source
Peter Hutterer [Mon, 18 May 2020 01:47:29 +0000 (11:47 +1000)]
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>
4 years agoquirks: mark the 0x233 razer keyboard as internal
Peter Hutterer [Thu, 21 May 2020 03:32:13 +0000 (13:32 +1000)]
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>
4 years agoevdev: warn if our event processing lags by 10ms or more
Peter Hutterer [Mon, 13 Apr 2020 05:12:43 +0000 (15:12 +1000)]
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>
4 years agotest: fix the lookup for the timer offset warnings
Peter Hutterer [Thu, 16 Apr 2020 00:58:00 +0000 (10:58 +1000)]
test: fix the lookup for the timer offset warnings

This was changed in 5e25bdfb0374bf7f9a6b5fc887e81d6a0b492f70 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>
4 years agotouchpad: correct a comment regarding the touchpad integration
Peter Hutterer [Tue, 12 May 2020 03:46:04 +0000 (13:46 +1000)]
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>
4 years agoLenovo X201 Tablet: Added bezel buttons support in tablet mode
Troels Blicher Petersen [Sat, 18 Apr 2020 22:25:12 +0000 (00:25 +0200)]
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>
4 years agotools: measure-fuzz: sleep for 2 seconds to give the hwdb time
Peter Hutterer [Sun, 19 Apr 2020 05:53:11 +0000 (15:53 +1000)]
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>
4 years agotools: measure-fuzz: fix the tool to work again
Peter Hutterer [Sun, 19 Apr 2020 05:46:12 +0000 (15:46 +1000)]
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>
4 years agotools: measure-fuzz: run systemd-hwdb update, not udevadm hwdb
Peter Hutterer [Sun, 19 Apr 2020 05:22:34 +0000 (15:22 +1000)]
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>
4 years agotools: measure-fuzz: handle a None return correctly
Peter Hutterer [Sun, 19 Apr 2020 05:18:42 +0000 (15:18 +1000)]
tools: measure-fuzz: handle a None return correctly

Fixes #472

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: Ubuntu 19.04 is EOL, drop it
Peter Hutterer [Sat, 18 Apr 2020 05:07:10 +0000 (15:07 +1000)]
gitlab CI: Ubuntu 19.04 is EOL, drop it

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools: per-slot-delta: skip the extra evbit indirection
Peter Hutterer [Thu, 16 Apr 2020 03:04:05 +0000 (13:04 +1000)]
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>
4 years agogitlab ci: fix a templating whitespace issue
Peter Hutterer [Thu, 16 Apr 2020 05:43:42 +0000 (15:43 +1000)]
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>
4 years agotools: per-slot-delta: drop an unused variable
Peter Hutterer [Sat, 11 Apr 2020 05:31:58 +0000 (15:31 +1000)]
tools: per-slot-delta: drop an unused variable

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools: per-slot-delta: always mark slot 0 as used
Peter Hutterer [Sat, 11 Apr 2020 05:30:12 +0000 (15:30 +1000)]
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>
4 years agotools: per-slot-delta: add arguments to set a threshold and ignore-below
Peter Hutterer [Sat, 11 Apr 2020 01:58:15 +0000 (11:58 +1000)]
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>
4 years agotools: per-slot-delta: init the slots with the right index
Peter Hutterer [Sat, 11 Apr 2020 03:29:38 +0000 (13:29 +1000)]
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>
4 years agotools: per-slot-delta: move printing the slot data into a helper function
Peter Hutterer [Sat, 11 Apr 2020 00:50:42 +0000 (10:50 +1000)]
tools: per-slot-delta: move printing the slot data into a helper function

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools: per-slot-delta: print the BTN_TOUCH etc. bits in-line
Peter Hutterer [Fri, 27 Mar 2020 00:30:38 +0000 (10:30 +1000)]
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>
4 years agotools: per-slot-delta: only render the slots that have been seen
Peter Hutterer [Fri, 27 Mar 2020 00:07:46 +0000 (10:07 +1000)]
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>
4 years agoquirks: correctly print boolean values
Loïc Yhuel [Mon, 6 Apr 2020 21:48:20 +0000 (23:48 +0200)]
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>
4 years agoutil: make the trace macro actually useful
Peter Hutterer [Fri, 27 Mar 2020 11:26:05 +0000 (21:26 +1000)]
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>
4 years agotablet: use the AttrPressureRange quirk for tablets too
Peter Hutterer [Sat, 28 Mar 2020 23:19:27 +0000 (09:19 +1000)]
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>
4 years agotools: add a measure touchpad-size tool
Peter Hutterer [Sat, 28 Mar 2020 03:26:17 +0000 (13:26 +1000)]
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>
4 years agotools: make the thumb threshold configurable while measuring pressure
Peter Hutterer [Mon, 30 Mar 2020 04:43:56 +0000 (14:43 +1000)]
tools: make the thumb threshold configurable while measuring pressure

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools: revamp the touchpad-pressure measuring tool
Peter Hutterer [Sun, 29 Mar 2020 02:08:30 +0000 (12:08 +1000)]
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>
4 years agoFix race condition causing duplicate devices in udev seats
Peter Hutterer [Fri, 27 Mar 2020 02:01:45 +0000 (12:01 +1000)]
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>
4 years agoudev: don't use IMPORT+=
Peter Hutterer [Fri, 27 Mar 2020 09:37:10 +0000 (19:37 +1000)]
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>
4 years agotools: add libinput analyze to the libinput tool help output
Peter Hutterer [Sun, 29 Mar 2020 04:55:57 +0000 (14:55 +1000)]
tools: add libinput analyze to the libinput tool help output

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agocompletion: add libinput analyze to zsh completions
Peter Hutterer [Mon, 23 Mar 2020 06:54:02 +0000 (16:54 +1000)]
completion: add libinput analyze to zsh completions

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agodoc/user: add a mini-blurb for the new libinput analyze tool
Peter Hutterer [Mon, 23 Mar 2020 06:48:31 +0000 (16:48 +1000)]
doc/user: add a mini-blurb for the new libinput analyze tool

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: generate the jobs for the custom builds from the config.yaml
Peter Hutterer [Sun, 22 Mar 2020 02:27:51 +0000 (12:27 +1000)]
gitlab CI: generate the jobs for the custom builds from the config.yaml

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: autogenerate the qemu tests for the last version of a distribution
Peter Hutterer [Sun, 22 Mar 2020 02:17:29 +0000 (12:17 +1000)]
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>
4 years agogitlab CI: invert the ci-templates check
Peter Hutterer [Sun, 22 Mar 2020 01:51:01 +0000 (11:51 +1000)]
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>
4 years agogitlab CI: switch the 'needs' tags to a dashed list
Peter Hutterer [Sun, 22 Mar 2020 01:40:38 +0000 (11:40 +1000)]
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>
4 years agogitlab CI: update the various build tests to F32
Peter Hutterer [Sun, 22 Mar 2020 01:31:03 +0000 (11:31 +1000)]
gitlab CI: update the various build tests to F32

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab issue templates: remove the checkmarks
Peter Hutterer [Sun, 22 Mar 2020 22:29:13 +0000 (08:29 +1000)]
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>
4 years agoadd trust mouse quirk #455
Martin Cihlář [Sun, 22 Mar 2020 11:07:51 +0000 (12:07 +0100)]
add trust mouse quirk #455

Signed-off-by: Martin Cihlář <martin.cibule@seznam.cz>
4 years agomeson.build: bump to 1.15.900
Peter Hutterer [Sun, 22 Mar 2020 00:51:01 +0000 (10:51 +1000)]
meson.build: bump to 1.15.900

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotest: fix a scan-build warning (value set but not read)
Peter Hutterer [Sun, 22 Mar 2020 00:44:17 +0000 (10:44 +1000)]
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>
4 years agoutil: fix a scan-build warning (value set but not read)
Peter Hutterer [Sun, 22 Mar 2020 00:43:52 +0000 (10:43 +1000)]
util: fix a scan-build warning (value set but not read)

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agoevdev: print a human time for ratelimit tests
Peter Hutterer [Sun, 22 Mar 2020 00:31:44 +0000 (10:31 +1000)]
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>
4 years agodoc: update the jumping cursor docs
Peter Hutterer [Sat, 21 Mar 2020 11:09:50 +0000 (21:09 +1000)]
doc: update the jumping cursor docs

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotouchpad: ratelimit the touch jump tests
Peter Hutterer [Sat, 21 Mar 2020 11:03:32 +0000 (21:03 +1000)]
touchpad: ratelimit the touch jump tests

In most cases these days touch jumps aren't actually fixable, they don't have
any good heuristics we can employ to remove them. And, luckily, in most cases
it doesn't matter because the users only notice the issue because of the error
message. To avoid spamming the user's log, let's ratelimit it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agopad: fix a compiler warning
Peter Hutterer [Sat, 21 Mar 2020 11:13:14 +0000 (21:13 +1000)]
pad: fix a compiler warning

gcc 10 isn't happy with the implicit enum conversion

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agodoc/api: remove invalid doxygen option
Peter Hutterer [Sat, 21 Mar 2020 11:21:09 +0000 (21:21 +1000)]
doc/api: remove invalid doxygen option

doxygen 1.8.17 shows this error:

error: Illegal format for option FILTER_PATTERNS, no equal sign ('=') specified for item '*.h'
error: Illegal format for option FILTER_PATTERNS, no equal sign ('=') specified for item '*.dox'

This was added in deadbf35c41 but I cannot figure out how this ever had any
effect based on the documentation for it. So let's drop it, I don't think it
has any effect anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools: record: drop quotes from os-release information
Peter Hutterer [Fri, 20 Mar 2020 08:38:55 +0000 (18:38 +1000)]
tools: record: drop quotes from os-release information

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools: if pytest fails to import, skip the tool option parsing test
Peter Hutterer [Fri, 20 Mar 2020 06:16:48 +0000 (16:16 +1000)]
tools: if pytest fails to import, skip the tool option parsing test

It's not the most important test outside of my machine and CI, so let's just
skip over it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Michel Dänzer <mdaenzer@redhat.com>
4 years agoman: install the analyze per-slot-delta man page
Peter Hutterer [Fri, 20 Mar 2020 06:09:28 +0000 (16:09 +1000)]
man: install the analyze per-slot-delta man page

And add libinput analyze to the main libinput man page

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agoci: move the ci template to the expected file for ci-fairy
Benjamin Tissoires [Wed, 18 Mar 2020 11:18:43 +0000 (12:18 +0100)]
ci: move the ci template to the expected file for ci-fairy

this makes the command to type much easier

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
4 years agoci: use ci-fairy to generate the template, not a custom script
Benjamin Tissoires [Wed, 18 Mar 2020 11:14:41 +0000 (12:14 +0100)]
ci: use ci-fairy to generate the template, not a custom script

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
4 years agoci: use the ci fairy to delete unwanted tags
Benjamin Tissoires [Wed, 18 Mar 2020 09:11:49 +0000 (10:11 +0100)]
ci: use the ci fairy to delete unwanted tags

here is some magic dust from https://gitlab.freedesktop.org/libevdev/libevdev/-/merge_requests/49/diffs?commit_id=325839e6401d322ed632bf30e2e0255785bb31f6#7bc093350962b0f3fe1e612f06beaba806ee061f_219_217

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
4 years agoci: use latest templates, and API
Benjamin Tissoires [Tue, 17 Mar 2020 10:23:50 +0000 (11:23 +0100)]
ci: use latest templates, and API

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
4 years agotools: switch tool option parsing test to use pytest
Peter Hutterer [Mon, 16 Mar 2020 03:13:41 +0000 (13:13 +1000)]
tools: switch tool option parsing test to use pytest

pytest is more powerful than unittest, so let's switch to that instead. And in
the process fix a few tests that for some reason succeeded even though they
shouldn't have (e.g. the autorestart test).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools: record: use the right exit code when the output file is missing
Peter Hutterer [Mon, 16 Mar 2020 06:13:27 +0000 (16:13 +1000)]
tools: record: use the right exit code when the output file is missing

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools: record: allow for an output file without --o
Peter Hutterer [Mon, 16 Mar 2020 01:23:33 +0000 (11:23 +1000)]
tools: record: allow for an output file without --o

  libinput record touchpad.yml /dev/input/eventX
or just
  libinput record touchpad.yml
are simpler invocations and since we're quite limited in what we can record
(i.e. only device files) we can just check the argument list to figure out
whether there is something to record to.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab: revamp the bug template a bit
Peter Hutterer [Sun, 15 Mar 2020 22:59:35 +0000 (08:59 +1000)]
gitlab: revamp the bug template a bit

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools: add a libinput analyze command with the per-slot-delta subcommand
Peter Hutterer [Thu, 12 Mar 2020 01:53:22 +0000 (11:53 +1000)]
tools: add a libinput analyze command with the per-slot-delta subcommand

I've been using this script ever since libinput record was available, might as
well ship it with libinput so I don't have to remember where it lives.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools: fix a typo in a man page
Peter Hutterer [Thu, 12 Mar 2020 01:02:57 +0000 (11:02 +1000)]
tools: fix a typo in a man page

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools: record: fix dmi recording
Peter Hutterer [Mon, 9 Mar 2020 00:16:04 +0000 (10:16 +1000)]
tools: record: fix dmi recording

Processing os-release in the same buffer that the dmi modalias used caused the
dmi to be recorded as 'dmi: "VERSION_ID=31"'. The cause for that was simply
that the dmi modalias was read but not printed until after the os-release
information was processed.

Fix this two-fold: rearrange that each part now reads and prints in
one go, and rename the buffers so we don't re-use them.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agolibinput 1.15.3 1.15.3
Peter Hutterer [Fri, 6 Mar 2020 03:23:38 +0000 (13:23 +1000)]
libinput 1.15.3

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotouchpad: only reduce the slot count for ALPS serial touchpads
Peter Hutterer [Thu, 27 Feb 2020 04:48:28 +0000 (14:48 +1000)]
touchpad: only reduce the slot count for ALPS serial touchpads

We're getting too many regressions on other devices for this feature and only
ALPS touchpads need it (it's a kernel driver bug). So let's limit this to
those devices only.

For example, synaptics serial touchpads don't keep the fake fingers and slot
states in sync when going from two to three fingers, causing an erroneous slot
downgrade. See
https://gitlab.freedesktop.org/libinput/libinput/issues/434#note_419912
That interferes with this code but fixing it is hard and anyway,
synaptics touchpads don't need the slot count drop.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agoquirks: rename the alps touchpad quirk to note it's a serial TP quirk
Peter Hutterer [Thu, 27 Feb 2020 05:27:46 +0000 (15:27 +1000)]
quirks: rename the alps touchpad quirk to note it's a serial TP quirk

This quirk only applies to serial ALPS touchpads, so let's name it
accordingly.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotouchpad: add a note to the synaptics touch restore feature
Peter Hutterer [Thu, 27 Feb 2020 04:46:10 +0000 (14:46 +1000)]
touchpad: add a note to the synaptics touch restore feature

We have code in place to handle the quirky transition from two to three
fingers (where one slot ends and another one starts). We do not handle the
same issue when transitioning from three to two fingers.

This is a note only because it hasn't mattered so far, at least until
eb6ef9fe70635e7c91e from #408. And it doesn't matter anymore now either
because that code is now only called for ALPS devices.

https://gitlab.freedesktop.org/libinput/libinput/issues/434#note_419912

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotest: fix a coverity complaint
Peter Hutterer [Mon, 2 Mar 2020 02:51:15 +0000 (12:51 +1000)]
test: fix a coverity complaint

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: drop the distribution "flavor" in favor of using the name
Peter Hutterer [Wed, 26 Feb 2020 03:23:09 +0000 (13:23 +1000)]
gitlab CI: drop the distribution "flavor" in favor of using the name

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: split the task to run on a VM out from the host system
Peter Hutterer [Tue, 25 Feb 2020 23:56:50 +0000 (09:56 +1000)]
gitlab CI: split the task to run on a VM out from the host system

No functional changes here, it just makes the actual task more generic

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: drop the distro name from the VM jobs
Peter Hutterer [Tue, 25 Feb 2020 23:49:53 +0000 (09:49 +1000)]
gitlab CI: drop the distro name from the VM jobs

This changes rarely and it doesn't carry a lot of information anyway, at least
compared to the jobs that are specifically designed to build on various
distributions.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: update to latest ci-templates
Peter Hutterer [Mon, 24 Feb 2020 09:09:15 +0000 (19:09 +1000)]
gitlab CI: update to latest ci-templates

Removes the special distro "flavor" handling for arch and it gives us nicer
warnings for VM failures.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: run the kvm test suite without libwacom
Peter Hutterer [Mon, 24 Feb 2020 04:29:10 +0000 (14:29 +1000)]
gitlab CI: run the kvm test suite without libwacom

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotest: disable a bunch of tests relying on libwacom
Peter Hutterer [Mon, 24 Feb 2020 05:57:05 +0000 (15:57 +1000)]
test: disable a bunch of tests relying on libwacom

Some of these may have a non-libwacom solution but let's be honest, you
shouldn't be skipping libwacom if you rely on tablets to be precise.

Fixes #436

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: pass the MESON_ARGS through to the VM as well
Peter Hutterer [Mon, 24 Feb 2020 05:09:11 +0000 (15:09 +1000)]
gitlab CI: pass the MESON_ARGS through to the VM as well

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: mark the template file as yaml file for vim
Peter Hutterer [Mon, 24 Feb 2020 04:25:58 +0000 (14:25 +1000)]
gitlab CI: mark the template file as yaml file for vim

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: don't run meson test on the scan-build job
Peter Hutterer [Fri, 21 Feb 2020 00:37:56 +0000 (10:37 +1000)]
gitlab CI: don't run meson test on the scan-build job

Unfortunate side-effect of this: scan-build would store the logs in the build
dir, only for them to be immediately wiped by meson test. And that never
generated the scan-build warnings.

So this job was complaining about (minor) issues for a while, they just never
made it to the GUI as CI failures.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools: constify the optarg handling of seats
Peter Hutterer [Fri, 21 Feb 2020 00:28:56 +0000 (10:28 +1000)]
tools: constify the optarg handling of seats

This shuts up scan-build complaining about memory leaks in libinput
debug-events (needs the right combination of --device option and eventually
triggering usage()) and saves us a bunch of unnecessary allocations.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotest: remove double-assignment to a variable
Peter Hutterer [Thu, 20 Feb 2020 08:15:19 +0000 (18:15 +1000)]
test: remove double-assignment to a variable

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: don't push to wayland web on scheduled jobs
Peter Hutterer [Thu, 20 Feb 2020 23:44:22 +0000 (09:44 +1000)]
gitlab CI: don't push to wayland web on scheduled jobs

We have a set of scheduled jobs to rebuild images and clean out old
containers, but since they're largely unsupervised (i.e. not in response to a
MR) we don't want to update the official documentation - just in case
something goes wrong.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools: replay: mkdir /etc/libinput if it doesn't exist yet
Peter Hutterer [Sun, 23 Feb 2020 23:58:24 +0000 (09:58 +1000)]
tools: replay: mkdir /etc/libinput if it doesn't exist yet

Where we're replaying a device with quirks, those quirks will be placed into
/etc/libinput/local-overrides.quirks. For that to work, /etc/libinput needs to
exist so let's make it where required.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools: record: fix fallback os-release file handling
Peter Hutterer [Fri, 21 Feb 2020 01:41:19 +0000 (11:41 +1000)]
tools: record: fix fallback os-release file handling

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: rename the custom build jobs
Peter Hutterer [Thu, 20 Feb 2020 03:31:33 +0000 (13:31 +1000)]
gitlab CI: rename the custom build jobs

The distro we're running on is a side-effect, it's more important to see the
bit that describes what the job actually does.

And while we're there, shuffle the hierarchy a bit for less duplication.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: use a separate variable for the template list
Peter Hutterer [Thu, 20 Feb 2020 03:25:40 +0000 (13:25 +1000)]
gitlab CI: use a separate variable for the template list

Just because I feel more comfortable with having this code in python than in
the templates.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: don't hard-code the arch/alpine versions
Peter Hutterer [Thu, 20 Feb 2020 03:20:53 +0000 (13:20 +1000)]
gitlab CI: don't hard-code the arch/alpine versions

We only have one each and they're not really versions anyway but now that it
is all generated through templates, let's be consistent with the rest of the
CI script.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: generate the various default-builds through templating
Peter Hutterer [Thu, 20 Feb 2020 02:48:16 +0000 (12:48 +1000)]
gitlab CI: generate the various default-builds through templating

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: generate the VM tests through the templates as well
Peter Hutterer [Thu, 20 Feb 2020 02:08:48 +0000 (12:08 +1000)]
gitlab CI: generate the VM tests through the templates as well

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: generate the CI script from a template
Peter Hutterer [Thu, 20 Feb 2020 01:57:44 +0000 (11:57 +1000)]
gitlab CI: generate the CI script from a template

All the distro-specific stuff is the same template anyway, so let's generate
this (like we already do in libevdev and the ci-templates).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: add a comment to explain one of the jobs
Peter Hutterer [Thu, 20 Feb 2020 01:36:23 +0000 (11:36 +1000)]
gitlab CI: add a comment to explain one of the jobs

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: whitespace fixes for better visual alignments
Peter Hutterer [Thu, 20 Feb 2020 01:22:32 +0000 (11:22 +1000)]
gitlab CI: whitespace fixes for better visual alignments

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>