Commit graph

4176 commits

Author SHA1 Message Date
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
Peter Hutterer
e11bad41f5 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>
2020-03-16 08:35:43 +10:00
Peter Hutterer
927a7c0745 tools: fix a typo in a man page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-12 11:02:57 +10:00
Peter Hutterer
850925910f 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>
2020-03-09 10:20:49 +10:00
Peter Hutterer
a1c8909337 libinput 1.15.3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-06 13:23:38 +10:00
Peter Hutterer
cd5af1a4f6 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>
2020-03-05 16:35:53 +10:00
Peter Hutterer
c7f06b0bdd 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>
2020-03-05 16:35:53 +10:00
Peter Hutterer
cd574ed5ef 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
eb6ef9fe70 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>
2020-03-05 16:35:53 +10:00
Peter Hutterer
7b94955634 test: fix a coverity complaint
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-02 12:51:15 +10:00
Peter Hutterer
f657d83428 gitlab CI: drop the distribution "flavor" in favor of using the name
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-26 13:56:00 +10:00
Peter Hutterer
ebfb1e770e 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>
2020-02-26 13:56:00 +10:00
Peter Hutterer
dd8dcaaa94 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>
2020-02-26 13:56:00 +10:00
Peter Hutterer
5eb53418b3 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>
2020-02-24 19:46:05 +10:00
Peter Hutterer
712eb10aad gitlab CI: run the kvm test suite without libwacom
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-24 06:45:01 +00:00