Commit graph

4189 commits

Author SHA1 Message Date
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
Peter Hutterer
150f5dc801 doc: update the jumping cursor docs
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-22 09:34:22 +10:00
Peter Hutterer
d6eef77dd2 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>
2020-03-22 09:34:22 +10:00
Peter Hutterer
bf5229a601 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>
2020-03-21 23:02:13 +00:00
Peter Hutterer
33c98fed54 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 deadbf35c4 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>
2020-03-21 21:22:52 +10:00
Peter Hutterer
d80bbcb028 tools: record: drop quotes from os-release information
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-21 11:02:48 +10:00
Peter Hutterer
4d92ea116c 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>
2020-03-20 20:42:51 +10:00
Peter Hutterer
b35a32dd9d 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>
2020-03-20 16:10:11 +10:00
Benjamin Tissoires
09509c9de6 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>
2020-03-18 12:21:52 +01:00
Benjamin Tissoires
8674bfc9d1 ci: use ci-fairy to generate the template, not a custom script
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2020-03-18 12:16:12 +01:00
Benjamin Tissoires
e44d725525 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>
2020-03-18 10:28:06 +01:00
Benjamin Tissoires
4df2ac731f ci: use latest templates, and API
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2020-03-18 09:51:31 +01:00
Peter Hutterer
d0eb8d58a3 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>
2020-03-17 10:08:48 +10:00
Peter Hutterer
2b3fd5aa30 tools: record: use the right exit code when the output file is missing
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-16 16:21:04 +10:00
Peter Hutterer
6ed3a0b079 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>
2020-03-16 13:04:50 +10:00
Peter Hutterer
c48e5cf9a6 gitlab: revamp the bug template a bit
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-16 09:07:36 +10:00