platform/upstream/libinput.git
3 years agotools/record: print a header as first line
Peter Hutterer [Mon, 22 Feb 2021 04:52:16 +0000 (14:52 +1000)]
tools/record: print a header as first line

To make the file format easier to detect

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agoFix worng quirk name in doc
yuri1969 [Fri, 19 Feb 2021 21:08:55 +0000 (22:08 +0100)]
Fix worng quirk name in doc

The doc mentioned 'AttrTouchPressureRange' quirk but `src/quirks.c` defines
'AttrPressureRange' instead. This led to unknown quirk name errors.

Signed-off-by: yuri1969 <1969yuri1969@gmail.com>
3 years agotools/record: fix outdated comment
Peter Hutterer [Thu, 18 Feb 2021 21:12:17 +0000 (07:12 +1000)]
tools/record: fix outdated comment

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agotools/record: de-inline our functions
Peter Hutterer [Thu, 18 Feb 2021 04:28:12 +0000 (14:28 +1000)]
tools/record: de-inline our functions

Let's leave this up to the compiler, the usual side-effect of inline (compiler
doesn't complain about an unused static function) doesn't apply here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agotools/record: correct the evdev data format in the man page
Peter Hutterer [Thu, 18 Feb 2021 22:44:23 +0000 (08:44 +1000)]
tools/record: correct the evdev data format in the man page

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agomeson.build: consolidate all man pages
Peter Hutterer [Wed, 17 Feb 2021 23:47:14 +0000 (09:47 +1000)]
meson.build: consolidate all man pages

They all use the same configure_file() process, so let's do them all in a
loop.

Exceptions are the test-suite man page.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agomeson.build: drop the dummy config data and use copy: true instead
Peter Hutterer [Wed, 17 Feb 2021 23:39:46 +0000 (09:39 +1000)]
meson.build: drop the dummy config data and use copy: true instead

We require the meson version this was introduced in, so let's use it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agotest: add test cases for 2/3 finger movement after drag-lock
satrmb [Tue, 16 Feb 2021 10:13:29 +0000 (11:13 +0100)]
test: add test cases for 2/3 finger movement after drag-lock

Same as after a tap, just with a short drag between tap and 2/3 finger movement.
Also fixes a finger coord typo in one of the previously added test cases.

Signed-off-by: satrmb <10471-satrmb@users.noreply.gitlab.freedesktop.org>
3 years agolibinput 1.16.902 1.16.902
Peter Hutterer [Tue, 16 Feb 2021 03:10:18 +0000 (13:10 +1000)]
libinput 1.16.902

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agotest: add test cases for 2/3 finger movement after tap
Peter Hutterer [Mon, 15 Feb 2021 07:48:34 +0000 (17:48 +1000)]
test: add test cases for 2/3 finger movement after tap

We have two behaviors here:
- tap + 2fg -> scrolling
- tap + 1fg move + 2f down -> dragging

Let's document this. The 3fg case only has one situation, so let's test that.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agotest: drop the needless base event conversion
Peter Hutterer [Mon, 15 Feb 2021 08:00:18 +0000 (18:00 +1000)]
test: drop the needless base event conversion

This was just there to avoid unused variable warnings but the simpler approach
to that is to just not assign a variable in the first place.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agotest: print the event type on mismatch
Peter Hutterer [Mon, 15 Feb 2021 07:34:34 +0000 (17:34 +1000)]
test: print the event type on mismatch

We already have a helper function for this, let's use it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agodoc: update the docs with a note regarding multifinger dragging
Peter Hutterer [Mon, 15 Feb 2021 07:06:34 +0000 (17:06 +1000)]
doc: update the docs with a note regarding multifinger dragging

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agogitlab CI: move the no-libwacom test suite into its own stage
Peter Hutterer [Mon, 15 Feb 2021 01:49:30 +0000 (11:49 +1000)]
gitlab CI: move the no-libwacom test suite into its own stage

Easier to spot visually in the GUI that way

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agotest: fix a few missing or wrong drag-lock timeouts
satrmb [Fri, 12 Feb 2021 13:35:53 +0000 (14:35 +0100)]
test: fix a few missing or wrong drag-lock timeouts

These had no consequences apart from occasional "system is too slow" messages,
because the test suite's shorter tap timeout is just barely long enough
for drag-lock, and/or because litest_assert_button_event waits for an event
anyway.

Signed-off-by: satrmb <10471-satrmb@users.noreply.gitlab.freedesktop.org>
3 years agotouchpad: permit only one finger on the touchpad at the start of a tap-drag
satrmb [Fri, 12 Feb 2021 11:09:07 +0000 (12:09 +0100)]
touchpad: permit only one finger on the touchpad at the start of a tap-drag

This only affects the actual dragging part of the tap-and-drag interaction;
n-finger tap-and-drag is supposed to be performed with a n-finger tap
followed by a 1-finger drag.
Allowing a second finger in the middle of a drag is still necessary for a
finger swap, which users may need in long-distance drags, especially when
drag-lock is disabled.

Signed-off-by: satrmb <10471-satrmb@users.noreply.gitlab.freedesktop.org>
3 years agotouchpad: stretch the tap-and-drag timeout a bit depending on finger count
satrmb [Wed, 23 Sep 2020 09:53:55 +0000 (11:53 +0200)]
touchpad: stretch the tap-and-drag timeout a bit depending on finger count

Some users reported problems triggering multi-finger tap-and-drag,
with reliability decreasing as the finger count increased.
This is plausible because they may shift towards moving the whole hand
up and down, which obviously takes more time than just a finger.

Signed-off-by: satrmb <10471-satrmb@users.noreply.gitlab.freedesktop.org>
3 years agodoc/user: generate the required package list for the CI distributions
Peter Hutterer [Mon, 15 Feb 2021 02:38:55 +0000 (12:38 +1000)]
doc/user: generate the required package list for the CI distributions

Use yq to extract the package list from the CI configuration, then dump that
into the user docs. This provides the long-requested commands to install all
dependencies without the maintenance effort or risk of going stale.

Note that we are *not* building this in the CI, it's just not needed.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agogitlab CI: add a job to make sure we're running all test suites
Peter Hutterer [Fri, 12 Feb 2021 03:05:57 +0000 (13:05 +1000)]
gitlab CI: add a job to make sure we're running all test suites

Only needs to run when meson.build or the CI script update

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agotest: drop the custom group names
Peter Hutterer [Fri, 5 Feb 2021 04:51:02 +0000 (14:51 +1000)]
test: drop the custom group names

The group names are forced by check (they are called suite names there) but
for our test suite they provide very little benefit. Much easier to just
use the filename a test is in as group name.

This removes the pure substring match for --filter-group, it's now fnmatch
only. group names are short enough that the typing isn't an issue and we don't
want to run tests twice (e.g. 'pad' is also in 'touchpad').

This patch caused #574 until it got fixed in d838e3a3a4c

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agoutils: add a trunkname() function to extract the trunk of a filename
Peter Hutterer [Fri, 5 Feb 2021 04:36:16 +0000 (14:36 +1000)]
utils: add a trunkname() function to extract the trunk of a filename

/path/to/foo.bar returns "foo"

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agogitlab CI: make the test suite names a list
Peter Hutterer [Fri, 12 Feb 2021 03:03:44 +0000 (13:03 +1000)]
gitlab CI: make the test suite names a list

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agotest: use motion events to check the "system is too slow" message
Peter Hutterer [Fri, 12 Feb 2021 00:24:43 +0000 (10:24 +1000)]
test: use motion events to check the "system is too slow" message

Using buttons for this test can trigger debounce warnings instead (in
addition?) to the warning we actually check for. Let's use motion events
instead and double the loop while we're at it so we have double the chance of
triggering at least one warning.

Fixes #574 for unknown reasons

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agotest: wrap the litest user data into a struct
Peter Hutterer [Thu, 11 Feb 2021 21:55:21 +0000 (07:55 +1000)]
test: wrap the litest user data into a struct

litest itself requires the libinput user_data to be set to its own context
struct (see close_restricted). A test that needs its own user_data must not
override this struct - if the context is accessed during libinput_dispatch()
we'll get memory corruption.

See #574

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agotest: move a helper function close to its caller
Peter Hutterer [Thu, 11 Feb 2021 23:29:24 +0000 (09:29 +1000)]
test: move a helper function close to its caller

This is a custom log function for one single test, let's move it next to that
test.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agogitlab CI: run the scan-build analysis jobs in script
Peter Hutterer [Thu, 11 Feb 2021 21:28:18 +0000 (07:28 +1000)]
gitlab CI: run the scan-build analysis jobs in script

after_script ignores any exit status so we can't actually fail the job here

Fixes #573

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agotools/record: remove a useless assignment
Peter Hutterer [Thu, 11 Feb 2021 21:21:34 +0000 (07:21 +1000)]
tools/record: remove a useless assignment

It's overwritten a few lines south of here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agotest: init an array to zero to silence scan-build
Peter Hutterer [Thu, 11 Feb 2021 21:19:40 +0000 (07:19 +1000)]
test: init an array to zero to silence scan-build

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agotools/record: add some curly braces
Peter Hutterer [Thu, 11 Feb 2021 21:20:27 +0000 (07:20 +1000)]
tools/record: add some curly braces

list_for_each is just a fancy for loop but it looks weird without braces.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agotests: drop the duplicate test for pointer event conversion
Peter Hutterer [Thu, 11 Feb 2021 05:42:12 +0000 (15:42 +1000)]
tests: drop the duplicate test for pointer event conversion

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agotest: don't set the log handler 10 times
Peter Hutterer [Thu, 11 Feb 2021 05:31:12 +0000 (15:31 +1000)]
test: don't set the log handler 10 times

Once is enough, we don't need to set it inside the loop.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agogitlab CI: rename the VM stage "test-suite"
Peter Hutterer [Fri, 5 Feb 2021 04:51:02 +0000 (14:51 +1000)]
gitlab CI: rename the VM stage "test-suite"

A much more sensible name than "vm"

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agototem: separate X/Y resolution from touch size in discriminator
наб [Tue, 9 Feb 2021 12:52:20 +0000 (13:52 +0100)]
totem: separate X/Y resolution from touch size in discriminator

Ref: https://gitlab.freedesktop.org/libinput/libinput/-/commit/bf4277623f7c24286b9f1e4b3ace51fbb5bb6a98#note_793589
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
3 years agototem: fix suspension-as-addition and resumption-as-removal in interface
наб [Tue, 9 Feb 2021 12:50:57 +0000 (13:50 +0100)]
totem: fix suspension-as-addition and resumption-as-removal in interface

Ref: https://gitlab.freedesktop.org/libinput/libinput/-/commit/bf4277623f7c24286b9f1e4b3ace51fbb5bb6a98#note_793592
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
3 years agoquirks: add pressure ranges for the Dell Latitude E5510 TouchPad
Gablegritule [Mon, 8 Feb 2021 22:11:06 +0000 (22:11 +0000)]
quirks: add pressure ranges for the Dell Latitude E5510 TouchPad

The default setting makes the "Dell Latitude E5510 TouchPad" too sensitive and
consequently difficult to use.

Note that the the size of the TouchPad is detected to be higher than it is
(the side-bars are half out of the TouchPad), see
https://github.com/systemd/systemd/pull/18493 for the hwdb overrides for this
device.

Signed-off-by: Gablegritule <guillet.gabriel@laposte.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agoCreate /etc/libinput on install
Peter Hutterer [Wed, 3 Feb 2021 00:19:20 +0000 (10:19 +1000)]
Create /etc/libinput on install

Users that need to create the local-overrides.quirks are sometimes hesitant to
do so because /etc/libinput doesn't exist by default. Let's create it on
install.

Related #568

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agotouchpad: disable the pressure axes wherever the resolution is nonzero
Peter Hutterer [Thu, 4 Feb 2021 22:35:10 +0000 (08:35 +1000)]
touchpad: disable the pressure axes wherever the resolution is nonzero

The kernel/udev set the pressure resolution to nonzero to indicate the value
is in a known scale (units/g). We use that information to disable the
pressure axis on such devices - real pressure cannot be translated to
contact size.

For the kernel patch see:
https://www.spinics.net/lists/linux-input/msg71237.html

Fixes #569

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agotest: don't require root to list tests
Peter Hutterer [Fri, 5 Feb 2021 01:21:47 +0000 (11:21 +1000)]
test: don't require root to list tests

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agoquirks: reword the requirements section in the quirks README
Peter Hutterer [Tue, 2 Feb 2021 23:36:29 +0000 (09:36 +1000)]
quirks: reword the requirements section in the quirks README

Change the wording from "these will fail" to "this must be followed" which is
easier to understand. And add the requirement for uppercase hex numbers as
enforced since c412924003b3154.

Related #568

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agodoc/user: expand the explanations on how to submit a merge request
Peter Hutterer [Wed, 3 Feb 2021 04:50:23 +0000 (14:50 +1000)]
doc/user: expand the explanations on how to submit a merge request

I keep answering this in bug reports, much easier to just have a link to
copy/paste.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agodoc/user: some whitespace fixes
Peter Hutterer [Wed, 3 Feb 2021 04:15:22 +0000 (14:15 +1000)]
doc/user: some whitespace fixes

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agoquirks: improve the README
Peter Hutterer [Tue, 2 Feb 2021 01:54:14 +0000 (11:54 +1000)]
quirks: improve the README

Make the headers valid markdown and reword/reformat a few other things
to make it clearer and easier to read.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agolibinput 1.16.901 1.16.901
Peter Hutterer [Mon, 1 Feb 2021 09:14:10 +0000 (19:14 +1000)]
libinput 1.16.901

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agoDell touchpad was too sensitive with default settings
Gary Wolfe [Mon, 25 Jan 2021 13:25:13 +0000 (08:25 -0500)]
Dell touchpad was too sensitive with default settings

The touchpad for the Dell Inspiron 15R N5110 was too sensitive with default settings, leading to excessive movement when lifting finger.

Fixes #565

Signed-off-by: Gary Wolfe <avidgamefan@yahoo.com>
3 years agotools: add a tool to analyze the finger count from a recording
Peter Hutterer [Sun, 24 Jan 2021 22:17:21 +0000 (08:17 +1000)]
tools: add a tool to analyze the finger count from a recording

Given a libinput recording, print the timestamps of any finger changes, i.e.
which slots are currently logically down. For example:

Timestamp | Rel time |     Slots     |
--------------------------------------
 0.000000 |  +0.000s | + |   |   |   |
 0.454631 |  +0.454s |   |   |   |   |
 5.065401 |  +4.610s | + |   |   |   |
 6.140281 |  +1.074s | + | + |   |   |
 7.410377 |  +1.270s |   | + |   |   |
 7.420200 |  +0.009s |   |   |   |   |
11.233108 |  +3.812s | + | + |   |   |
11.850206 |  +0.617s |   |   |   |   |
13.827740 |  +1.977s | + |   |   |   |
14.704027 |  +0.876s | + | + |   |   |
16.050577 |  +1.346s | + |   |   |   |
16.905186 |  +0.854s |   |   |   |   |

This data is available with the per-slot-delta tool but the output here is
more compressed, making it easier to detect stuck fingers. Pressure
thresholds are not currently supported.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agotools/record: print the wall clock time every few seconds
Peter Hutterer [Mon, 25 Jan 2021 07:22:04 +0000 (17:22 +1000)]
tools/record: print the wall clock time every few seconds

For long-running recordings it's useful to know what the actual time was when
a particular event occured. A user can simply check the clock or system logs
for the time and thus know which portion of the recording to focus on.

Let's print the time into the recording, every 5 seconds (aligned at the 5,
10, 15s marks) or, if no events occured in the last 5 seconds, before the next
event. This granularity should be enough to identify the interesting parts of
a recording.

Let's print this as a comment until we have a use-case that requires parsing
this data.

The timer is the simplest approach, it just repeats at a fixed 5 seconds
interval from startup. There may be time drift, we can fix that if needed.

Fixes #560

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agotools/record: use a pointer to the libinput fd poll entry
Peter Hutterer [Mon, 25 Jan 2021 07:12:12 +0000 (17:12 +1000)]
tools/record: use a pointer to the libinput fd poll entry

No functional changes, this makes the code slightly more readable, especially
once we start adding more "special" fds.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agotools/record: use a pointer to the signalfd poll entry
Peter Hutterer [Mon, 25 Jan 2021 07:05:00 +0000 (17:05 +1000)]
tools/record: use a pointer to the signalfd poll entry

No functional changes, this makes the code slightly more readable, especially
once we start adding more "special" fds.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agotools/record: narrow the scope of two variables
Peter Hutterer [Mon, 25 Jan 2021 06:30:22 +0000 (16:30 +1000)]
tools/record: narrow the scope of two variables

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agotools/record: initialize all pollfds in the same loop
Peter Hutterer [Mon, 25 Jan 2021 05:56:03 +0000 (15:56 +1000)]
tools/record: initialize all pollfds in the same loop

Minor tidying up the code, set the default values for all fds in the same loop
instead of having it split to wherever the fd is created.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agoUse python black for all pyhon file formatting
Peter Hutterer [Mon, 25 Jan 2021 03:12:25 +0000 (13:12 +1000)]
Use python black for all pyhon file formatting

Let's enforce a consistent (and verifiable) style everywhere.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agodoc: fix IRC channel name
Jonas Ådahl [Thu, 28 Jan 2021 07:32:03 +0000 (08:32 +0100)]
doc: fix IRC channel name

It said #wayland-devel, but it's #wayland.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
3 years agomodify macro streq/strneq for check one null pointer
weizhixiang [Fri, 8 Jan 2021 06:16:54 +0000 (14:16 +0800)]
modify macro streq/strneq for check one null pointer

Signed-off-by: weizhixiang <1138871845@qq.com>
Minor modifications applied by Peter Hutterer <peter.hutterer@who-t.net>

3 years agoquirks: disable pressure on the Lenovo Yoga 9i touchpad
Peter Hutterer [Thu, 14 Jan 2021 02:55:30 +0000 (12:55 +1000)]
quirks: disable pressure on the Lenovo Yoga 9i touchpad

This touchpad is a true pressurepad and the pressure axis gives us physical
pressure down. Using it as contact size gives flaky touch detection, so let's
just disable the axis until we do something with that value.

Fixes #562

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agodoc/user: list the known package repositories for libinput from git
Peter Hutterer [Thu, 7 Jan 2021 01:26:01 +0000 (11:26 +1000)]
doc/user: list the known package repositories for libinput from git

Because dnf install is a lot easier than building from git where one just
wants to test the latest libinput.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agocheck return value for libudev/udev_device_get_action
weizhixiang [Wed, 6 Jan 2021 09:46:14 +0000 (17:46 +0800)]
check return value for libudev/udev_device_get_action

Signed-off-by: weizhixiang <1138871845@qq.com>
3 years agogitlab CI: use Fedora 33
Peter Hutterer [Mon, 4 Jan 2021 00:25:43 +0000 (10:25 +1000)]
gitlab CI: use Fedora 33

This requires the latest CI templates for the updated mkosi fixes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agogitlab CI: fix flake8 complaints
Peter Hutterer [Mon, 4 Jan 2021 01:15:51 +0000 (11:15 +1000)]
gitlab CI: fix flake8 complaints

tools/libinput-measure-fuzz.py:212:15:
 F523 '...'.format(...) has unused arguments at position(s): 1

But the E741 is better turned off in general:
  tools/libinput-measure-fuzz.py:319:29: E741 ambiguous variable name 'l'

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agotreewide: fix typos
Torstein Husebø [Thu, 27 Aug 2020 17:52:34 +0000 (19:52 +0200)]
treewide: fix typos

Signed-off-by: Torstein Husebø <torstein@huseboe.net>
3 years agodoc: somewhat document the write_open for lid switches
Peter Hutterer [Wed, 16 Dec 2020 00:47:58 +0000 (10:47 +1000)]
doc: somewhat document the write_open for lid switches

Not a full documentation but slightly more information than before. This is
too niche to document it fully, we're only using it on one device anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agodoc/user: document that we're only using internal devices for DWT
Peter Hutterer [Tue, 15 Dec 2020 05:46:50 +0000 (15:46 +1000)]
doc/user: document that we're only using internal devices for DWT

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agoMatch all Surface (Pro/Laptop/Book) devices.
Blaž Hrastnik [Tue, 15 Dec 2020 03:39:23 +0000 (12:39 +0900)]
Match all Surface (Pro/Laptop/Book) devices.

Signed-off-by: Blaž Hrastnik <blaz@mxxn.io>
3 years agotouchpad: increase the jump detection interval to 30ms
Peter Hutterer [Wed, 25 Nov 2020 03:26:16 +0000 (13:26 +1000)]
touchpad: increase the jump detection interval to 30ms

On serial touchpads it's common enough that frames slow down tofrom the usual
12ms to 24ms. That's too close to our 25ms cutoff so if we have a minor delay,
we end up missing out on jump detection.

Fixes #541

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agogitlab CI: don't allow VM test failures
Peter Hutterer [Wed, 9 Dec 2020 11:18:58 +0000 (21:18 +1000)]
gitlab CI: don't allow VM test failures

The VM runs are much more reliable now and where they do fail, they can be
retriggered.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agotest: plug a leak in the tablet smoothing test
Peter Hutterer [Mon, 14 Dec 2020 08:57:31 +0000 (18:57 +1000)]
test: plug a leak in the tablet smoothing test

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agotest: plug a memleak in a quirks test
Peter Hutterer [Wed, 9 Dec 2020 11:21:24 +0000 (21:21 +1000)]
test: plug a memleak in a quirks test

Introduced in 56f4af51eca4ceec30e382d0d7c9972a57fd1aa2

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agoquirks: add quirk for Dell XPS 15 9500 touchpad
Jef Driesen [Mon, 7 Dec 2020 19:28:45 +0000 (20:28 +0100)]
quirks: add quirk for Dell XPS 15 9500 touchpad

The Dell XPS 15 9500 has a large touchpad without any visible markers
for the touchpad buttons. Since the ModelTouchpadVisibleMarker quirk is
enabled by default for all Dell touchpads, the middle button area ends
up too small. Disable the quirk again for this specific model.

Fixes #545

Signed-off-by: Jef Driesen <jefdriesen@telenet.be>
3 years agotest: add a test for model quirk overrides
Peter Hutterer [Mon, 7 Dec 2020 23:58:16 +0000 (09:58 +1000)]
test: add a test for model quirk overrides

Related to #545

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agotablet: disable smoothing for AES devices
Peter Hutterer [Wed, 7 Oct 2020 23:47:36 +0000 (09:47 +1000)]
tablet: disable smoothing for AES devices

Data in
https://gitlab.freedesktop.org/libinput/libinput/-/issues/225#note_379034
suggests that AES devices have lower noise than the older EMR
devices, so let's try disabling it for those devices.

We can't directly get the AES devices in libinput unless we want to add a
whole bunch of quirks for the various vid/pid combinations. But we can get
that info from libwacom, primarily because we know that libwacom will list all
known AES pens for any device. So we can check for one that we know of (0x11)
and if it's in the list, the tablet is an AES tablet.

Setting the history size to 1 means we never do any actual smoothing.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agoudev: update rules to handle bind/unbind events
Peter Hutterer [Wed, 18 Nov 2020 01:07:02 +0000 (11:07 +1000)]
udev: update rules to handle bind/unbind events

Summary: we expect add, change or remove but kernel 4.12 added bind and
unbind. These events were previously discarded by udevd. Our rules should
handle any event *but* remove, so update as suggested in the announce email
linked below.

For a longer explanation, see the system 247rc2 announcement
https://lists.freedesktop.org/archives/systemd-devel/2020-November/045570.html

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agogitlab CI: check commits/CI template generation before spinning up containers
Peter Hutterer [Mon, 23 Nov 2020 03:19:48 +0000 (13:19 +1000)]
gitlab CI: check commits/CI template generation before spinning up containers

If either of those fails, no point in trying to generate containers.
And move the MR check down to the deploy stage where it belongs.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agogitlab CI: use ci-fairy generate-template --verify
Peter Hutterer [Mon, 23 Nov 2020 03:16:14 +0000 (13:16 +1000)]
gitlab CI: use ci-fairy generate-template --verify

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agogitlab CI: use the CI-fairy image
Peter Hutterer [Mon, 23 Nov 2020 03:13:09 +0000 (13:13 +1000)]
gitlab CI: use the CI-fairy image

This removes the need to pull a docker image for each of those stages.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agogitlab CI: add curl to the debian image
Peter Hutterer [Mon, 16 Nov 2020 03:25:09 +0000 (13:25 +1000)]
gitlab CI: add curl to the debian image

The coverity job on debian needs curl.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agogitlab CI: generate the package lists from the config.yaml
Peter Hutterer [Wed, 11 Nov 2020 05:07:34 +0000 (15:07 +1000)]
gitlab CI: generate the package lists from the config.yaml

The string list is getting too confusing.

This gets rid of the separate packageset for qemu. That packageset only
differed by adding valgrind, we can just keep that in the same list.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agogitlab CI: update to latest templates
Peter Hutterer [Tue, 10 Nov 2020 23:08:52 +0000 (09:08 +1000)]
gitlab CI: update to latest templates

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agogitlab CI: remove unused custom ubuntu install script
Peter Hutterer [Wed, 11 Nov 2020 23:34:33 +0000 (09:34 +1000)]
gitlab CI: remove unused custom ubuntu install script

Looks like this has been obsolete since
4df2ac731ff3ae420081b3e243fc2cec636bdfd6 where it stopped passing in the
packages.

And a bug caused the template to checked the "version" against "ubuntu", so
the script hasn't actually been included in any job anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agogitlab CI: update Ubuntu to current distros
Peter Hutterer [Sun, 8 Nov 2020 21:50:08 +0000 (07:50 +1000)]
gitlab CI: update Ubuntu to current distros

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agogitlab CI: rename FREEBSD_PKGS to FREEBSD_PACKAGES for consistency
Peter Hutterer [Wed, 11 Nov 2020 01:18:30 +0000 (11:18 +1000)]
gitlab CI: rename FREEBSD_PKGS to FREEBSD_PACKAGES for consistency

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agogitlab CI: switch the coverity job to Debian stable
Peter Hutterer [Wed, 11 Nov 2020 01:16:06 +0000 (11:16 +1000)]
gitlab CI: switch the coverity job to Debian stable

coverity doesn't work with gcc 10, it fails with "invalid GNU version
number: 201". F31 is about to be EOL but we can't use to F32 or later.

So let's switch to debian stable instead, that one will stick around for a bit
longer.

Debian packages are the same as the Ubuntu packages

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agogitlab CI: Fedora only needs git-core, not git
Peter Hutterer [Wed, 11 Nov 2020 01:12:17 +0000 (11:12 +1000)]
gitlab CI: Fedora only needs git-core, not git

The other lines are just for indentation to match up

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agogitlab CI: use a template for the various ci-fairy jobs
Peter Hutterer [Tue, 10 Nov 2020 23:13:20 +0000 (09:13 +1000)]
gitlab CI: use a template for the various ci-fairy jobs

And switch to python:alpine, an image that is tiny and sufficient for the job
we want.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agogitlab CI: switch to the vmctl script
Peter Hutterer [Sun, 8 Nov 2020 21:18:32 +0000 (07:18 +1000)]
gitlab CI: switch to the vmctl script

See ci-templates commit acda94e139030dc2caa058118956225e55bbec5f, it replaces
vm interactions with vmctl start/stop/exec and sets up an ssh config for the
hostname 'vm'.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agogitlab CI: pass MESON_ARGS down to the wayland-web job
Peter Hutterer [Tue, 10 Nov 2020 07:40:40 +0000 (17:40 +1000)]
gitlab CI: pass MESON_ARGS down to the wayland-web job

Now that we're firing the wayland website generation as trigger, we're
automatically passing down the variables to the pipeline. Let's pass down
something sensible, we already had one issue with our space-separated
'build dir' and let's not require more than absolutely necessary to build
the docs.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agotools: print the AttrEventCodeEnable and AttrInputPropEnable/Disable quirks
Peter Hutterer [Tue, 10 Nov 2020 03:32:26 +0000 (13:32 +1000)]
tools: print the AttrEventCodeEnable and AttrInputPropEnable/Disable quirks

Introduced in e3c4ff3 and e882bd02

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agoFix a few coverity complaints
Peter Hutterer [Tue, 10 Nov 2020 03:09:00 +0000 (13:09 +1000)]
Fix a few coverity complaints

All minor:
- execdir does not need initialization, it's not used until written to
- 'newest' could be NULL
- zalloc(-1) confuses coverity
- 't' is never used in that test

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agoFix the termination of the readlink result
Peter Hutterer [Tue, 10 Nov 2020 04:25:31 +0000 (14:25 +1000)]
Fix the termination of the readlink result

nread is the number of bytes put into the buffer, let's terminate it there
instead of one byte over. This only worked because execdir was initialized to
zero.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agogitlab CI: update the comments
Peter Hutterer [Fri, 30 Oct 2020 00:44:23 +0000 (10:44 +1000)]
gitlab CI: update the comments

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agogitlab CI: update to latest ci-templates
Peter Hutterer [Fri, 30 Oct 2020 00:41:18 +0000 (10:41 +1000)]
gitlab CI: update to latest ci-templates

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agogitlab CI: remove a now-unused VERSION variable
Peter Hutterer [Fri, 30 Oct 2020 00:38:47 +0000 (10:38 +1000)]
gitlab CI: remove a now-unused VERSION variable

This became obsolete with FDO_DISTRIBUTION_VERSION being autogenerated by
templates.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agogitlab CI: trigger the wayland website pipeline directly
Peter Hutterer [Tue, 27 Oct 2020 05:49:58 +0000 (15:49 +1000)]
gitlab CI: trigger the wayland website pipeline directly

See the documentation here:
https://docs.gitlab.com/ee/ci/multi_project_pipelines.html#trigger-a-pipeline-when-an-upstream-project-is-rebuilt

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agodoc/user: update the timer offset warning for the new "too slow" message
Peter Hutterer [Thu, 22 Oct 2020 05:10:38 +0000 (15:10 +1000)]
doc/user: update the timer offset warning for the new "too slow" message

Related #533

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agoevdev: reduce the "your system is slow" warning to 5 per hour
Peter Hutterer [Thu, 22 Oct 2020 04:59:03 +0000 (14:59 +1000)]
evdev: reduce the "your system is slow" warning to 5 per hour

Two cases where this can happen: system is currently slow and delaying events,
n which case we'll get a burst and it'll show up in the log files anyway. Or
the system is generally slow and we get these warnings all the time. In the
latter case, let's not spam the log.

Fixes #533

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agoquirks: add quirk for Dell Precision 7550/7750 touchpad
Scott Jann [Mon, 3 Aug 2020 05:03:59 +0000 (00:03 -0500)]
quirks: add quirk for Dell Precision 7550/7750 touchpad

Signed-off-by: Scott Jann <sjann@knight-rider.org>
3 years agoquirks: switch the models with missing buttonpad to use the new attr
Peter Hutterer [Fri, 23 Oct 2020 01:01:57 +0000 (11:01 +1000)]
quirks: switch the models with missing buttonpad to use the new attr

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agoquirks: add AttrInputPropEnable and Disable
Peter Hutterer [Fri, 23 Oct 2020 00:38:14 +0000 (10:38 +1000)]
quirks: add AttrInputPropEnable and Disable

The latter requires libevdev 1.10 but since that'll take a while to filter
into our various CI systems, let's make it conditional.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agoquirks: add AttrEventCodeEnable as counterpoint to the disable one
Peter Hutterer [Thu, 22 Oct 2020 23:14:33 +0000 (09:14 +1000)]
quirks: add AttrEventCodeEnable as counterpoint to the disable one

Currently unused, but let's get this in because we may need this very soon for
broken tablets.

Enabling EV_ABS axes requires an absinfo struct - we default to a simple 0-1
axis range for those as the most generic option. Anything more custom will
need more custom treatment when we need it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agoevdev: localize two variables during quirks handling
Peter Hutterer [Fri, 23 Oct 2020 02:54:54 +0000 (12:54 +1000)]
evdev: localize two variables during quirks handling

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agoevdev: quirks_get_tuples can deal with a NULL quirks
Peter Hutterer [Fri, 23 Oct 2020 02:53:35 +0000 (12:53 +1000)]
evdev: quirks_get_tuples can deal with a NULL quirks

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
3 years agotools/debug-events: rework touch event printing
Peter Hutterer [Tue, 20 Oct 2020 23:06:16 +0000 (09:06 +1000)]
tools/debug-events: rework touch event printing

Previously, touch up events did not contain the slot number which makes the
logs ambiguous (e.g. see the one in #532). Fix that, and since doing so would
require extra conditions anyway get rid of the current with/without coords
function and just handle it all inside one function instead.

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