Commit graph

3030 commits

Author SHA1 Message Date
Peter Hutterer
fb8a5b040a test: replace a strcmp with streq
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-18 14:36:31 +10:00
Peter Hutterer
358acb5747 test: remove double check for empty queue
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-18 14:36:31 +10:00
Davide Depau
5feaa5f00c evdev: don't suspend keyboard on ThinkPad X1 Yoga 1st in tablet mode
When the X1 Yoga is in tablet mode, one capacitative touch button (windows
key, sends KEY_LEFTMETA) and two side volume buttons are accessible on the
front. The key event comes through the internal keyboard that we disabled in
tablet mode so it stops working.

Luckily the Yoga physically disables the "main" keyboard when in tablet mode,
so all we have to do is skip our code to disable the keyboard and the keys are
working again.

https://bugs.freedesktop.org/show_bug.cgi?id=103749

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-18 14:36:31 +10:00
Sean Lanigan
5aec854ac3 Add Dell XPS13 L322X touchpad quirks
Signed-off-by: Sean Lanigan <sean@lano.id.au>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-17 10:08:29 +10:00
Peter Hutterer
ea52b0d575 Revert "Add Dell XPS13 L322X touchpad quirks"
The current match doesn't capture all L322X devices, the 'pn' element of
the dmi modalias can read 'pnXPSL322X' or 'pnDellSystemXPSL322X'.
Reverting in favour of the following patch.

This reverts commit 69fe467fba.

https://bugs.freedesktop.org/show_bug.cgi?id=104990
2018-04-17 10:06:22 +10:00
Peter Hutterer
08d85350cb test: add a test for a touchscreen with out-of-range axes
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-16 17:04:46 +10:00
Peter Hutterer
108b85cae0 doc: add a description of the internal architecture
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-16 15:14:23 +10:00
Peter Hutterer
b2fb2adefa Remove some duplicate empty lines
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-16 15:14:23 +10:00
Peter Hutterer
8a223e739b Drop the libinput-list-devices and libinput-debug-events compat scripts
Added in 1.8, let's drop them for 1.11

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-13 14:58:46 +10:00
Peter Hutterer
e428e5e87a meson: only run the selinux restore script on meson < 0.43
Meson handles this now, see meson commits 1826872 and follow-up c63aa037.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-13 14:58:46 +10:00
Sean Lanigan
69fe467fba Add Dell XPS13 L322X touchpad quirks
https://bugs.freedesktop.org/show_bug.cgi?id=104990

Signed-off-by: Sean Lanigan <sean@lano.id.au>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-13 11:15:04 +10:00
Peter Hutterer
e9c53e09cf doc: add a section on what happens when a bug was resolved
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-13 10:45:09 +10:00
Peter Hutterer
b0a0627ae2 evdev: add a run-time check to avoid re-using model flags
Only runs on the LIBINPUT_MODEL_* flags, the ID_INPUT_TRACKBALL flag is an
exception.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-13 09:31:45 +10:00
Peter Hutterer
f37c1dc66a evdev: remove duplicate MODEL entry in the model parsing
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-13 09:30:33 +10:00
Peter Hutterer
23614f7551 debounce: disable debouncing on the Logitech K400
This is an external keyboard+touchpad but not recognised as touchpad by the
kernel so it's in mouse emulation mode. Double-taps are sent with impossibly
close timestamps and filtered out by the debouncing code. Since this isn't a
real button that can wear out anyway, let's just disable debouncing on this
device.

https://bugs.freedesktop.org/show_bug.cgi?id=105974

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-13 09:29:36 +10:00
Peter Hutterer
3651495798 doc: expand the "reporting bugs" page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-12 14:18:09 +10:00
Peter Hutterer
3ec8eb7f30 tools: fix switch case-statement indentation
We don't indent the 'case FOO:' lines in libinput

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-12 11:59:46 +10:00
Peter Hutterer
7525aea272 evdev: return an error if the profile change failed
If we get to this point, we've already ruled out invalid arguments and this
shouldn't really fail, so let's reply with UNSUPPORTED instead.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-12 11:45:58 +10:00
Peter Hutterer
fde4255f29 evdev: break up a long line
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-12 11:45:55 +10:00
Tim Richardson
dd6059aefc evdev: fix duplicated flag value
edit: Luckily there's no overlap between the users of those two flags so this
didn't trigger any bugs.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-12 08:48:22 +10:00
Peter Hutterer
e8cb7e4523 Revert "udev: add the P50 to the T450 jumping motion quirks"
Apparently this negatively affects scrolling behavior.

https://bugs.freedesktop.org/show_bug.cgi?id=105022#c38

This reverts commit ab55302ef8.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-10 08:55:56 +10:00
Peter Hutterer
8eb41b432e doc: axis overrides need to go to systemd, not libinput
And remove the double-slash in the error message pointing here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-10 08:00:35 +10:00
Peter Hutterer
6964047a67 doc: debugging touchpad pressure/size ranges is interactive
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-09 10:51:40 +10:00
Peter Hutterer
1531c9dc88 test: call K_OFF when run on the vt
Slight disadvantage: this breaks Ctrl+C to cancel the test suite. Still
potentially better than injecting random events into your vt.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-04-06 10:35:36 +10:00
Peter Hutterer
a59ce1c0c4 tools: fix man page for debug-events
click method is 'buttonareas', not just 'buttons'

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-06 08:18:33 +10:00
Peter Hutterer
24963d4e45 Fix a doxygen link for the get_default_matrix call
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-06 08:18:33 +10:00
Peter Hutterer
928bad9104 touchpad: don't process state for a touch in TOUCH_NONE
If a touch is in TOUCH_NONE, there is nothing to see here, please move along.

In the case of bug 105696, we were accessing the speed.exceeded_count of a
touch that was released previously, erroneously detecting a speed-based thumb.
The sequence was:
- touch down in slot 0, speed.exceeded_count is reset to 0
- move touch until exceeded_count is greater than our threshold
- touch up in slot 0
- touch down in slot 1 [1]
- touch down in slot 2 (more than 25mm away)
- we counted the slot 0 speed.exceeded_count, labeling the slot 2 touch as
  speed-based thumb

[1] peculiar behavior only observed on this device, usually slots get re-used
at the first opportunity so having an inactive slot followed by higher slots
being used is unusual.

https://bugs.freedesktop.org/show_bug.cgi?id=105696

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-05 13:59:12 +10:00
Peter Hutterer
794391cb51 touchpad: log the touch size thresholds if we're using them
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-05 11:05:14 +10:00
Nandor Han
23d543b711 udev: validate input devices during cold-plug
During libinput initialization a list of existing input devices is
retrieved from udev. This can lead to a situation where libinput can
end up processing un-configured devices because of the race generated
by udev events and libinput startup.
Sequence example:
weston - start
udev - device 1 added
weston - get a list of input devices
weston - process device 1 -- undefined behavior
udev - device 1 added - finalized

The problem was found because of incorrect touchscreen association
when in a dual monitor system the secondary touchscreen was
incorrectly associated with output one since udev didn't finish the
device initialization and WL_OUTPUT was missing.

To avoid this situation we skip un-configured devices during libinput
initialization, relying on udev to send events when devices are
fully configured.

Note: due to the peculiarities of udev_device_get_is_initialized(), the
input device is still processed if the call fails. If there are no udev
rules defined for the device, it will never be reported as initialized,
but this is not a problem, because all input devices handled by libinput
must have some udev properties set, therefore they always have rules.

Signed-off-by: Nandor Han <nandor.han@ge.com>
[Pekka: change log to debug, unref device]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-05 09:38:36 +10:00
Peter Hutterer
a660f487fa doc: expand on the palm detection documentation a bit
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-03 17:50:42 +10:00
Peter Hutterer
93dfd0fa54 udev: add T450s trackpoint range
From https://bugs.freedesktop.org/show_bug.cgi?id=103947

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-23 14:17:33 +10:00
Peter Hutterer
cf445f99dc udev: add trackpoint range for the T440s
Measured at 200 sensitivity because that's what systemd sets for us

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-23 13:38:07 +10:00
Peter Hutterer
f2b1eed976 evdev: point users to the trackpoint documentation for missing ranges
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-23 13:38:07 +10:00
Peter Hutterer
8dff0dfe02 evdev: add another debug message for the trackpoint sensitivity
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-23 13:38:07 +10:00
Peter Hutterer
238ffd3227 udev: add the T440p to the T450 jumping motion quirks
On slow finger motion, this device also sends a bunch of events with only
pressure updates, followed by a massive coordinate jump. Enable the quirk so
we skip that jump. This is for RMI4 and PS/2, RMI4 is confirmed in the bug
below, let's assume PS/2 has that issue too.

https://bugs.freedesktop.org/show_bug.cgi?id=105640

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-23 13:38:07 +10:00
Peter Hutterer
75aee30919 test: add a script to check for leftover litest rules
An aborted test run can sometimes leave udev rules as detritus. Test for that
so we don't get test case failures triggered by those rules.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-23 12:41:23 +10:00
Peter Hutterer
48d6861e74 CODING_STYLE: add exception for for (int i=0, ...) declarations
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-23 10:32:30 +10:00
Peter Hutterer
9d7f48b66a udev: add trackpoint range for Lenovo X280
https://bugs.freedesktop.org/show_bug.cgi?id=105485

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-23 10:17:52 +10:00
Peter Hutterer
419db83dad tablet: add missing space in an error message
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-23 10:17:52 +10:00
Peter Hutterer
1e9925735a test: reliably sort the udev rules
This guarantees the device rules have a static order between test runs.
Previously and in some cases, the temporary file name could affect the order
of the udev rules - let's not do that.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-23 10:17:52 +10:00
Peter Hutterer
ce80e40006 test: move all the _setup() functions into a special section
This way we can loop through them instead of having to add them manually.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-23 10:17:52 +10:00
Peter Hutterer
3f5ff113a8 touchpad: only keep low-pressure fingers alive for 2+-slot touchpads
Regression introduced by 3979b9e16a, bug 105258.
With that commit, we only ended real touches when we had less than nslots fake
fingers down. i.e. tripletap on a 2 slot touchpad would not end the
first/second touch even if the pressure goes below the threshold. e.g. Lenovo
x270 needs this, see https://bugs.freedesktop.org/attachment.cgi?id=137672, it
dips below the pressure threshold for the first slot and ends the second slot
in the same frame as the third finger is detected. Fun times.

Anyway, this breaks semi-mt touchpads, another fine category of devices,
because some of those can detect hovering fingers at low pressure, see bug
105535. Because semi-mt devices are generally garbage, we treat them as
single-touch devices instead. So whenever two fingers are down, we treat both
as above the pressure threshold, even when they're physicall hovering.

Fix this by making the x270 fix conditional on at least 2 slots.

https://bugs.freedesktop.org/show_bug.cgi?id=105535

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-21 14:08:06 +10:00
Peter Hutterer
4937f63a1d test: drop the * from the Lid Switch test device udev rule match
This is the cause of the random test case failures. Because the rule for this
device would also match on the Surface3 lid switch test device it comes down
to whatever mkstemps() picked as the unique characters. When the Surface3
sorted later, everything worked, otherwise it would fail.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-21 14:08:06 +10:00
Peter Hutterer
ab59264bb3 test: fix vert axis printing on error
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-21 10:18:45 +10:00
Peter Hutterer
ab55302ef8 udev: add the P50 to the T450 jumping motion quirks
On slow finger motion, this device also sends a bunch of events with only
pressure updates, followed by a massive coordinate jump. Enable the quirk so
we skip that jump.

https://bugs.freedesktop.org/show_bug.cgi?id=105022

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-20 15:32:01 +10:00
Peter Hutterer
e5cc1131b2 meson: point users to disabled documentation when dot/doxygen is missing
Especially dot is hard to find for some users, so provide the solution to
their problems right there in the error message.

And because users are likely to just copy/paste, remove the disable-libwacom
option. Save them from themselves...

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-20 15:32:01 +10:00
Peter Hutterer
4ff5f02d9c tools: touchpad-pressure: init the lo/hi values correctly
From https://bugs.freedesktop.org/show_bug.cgi?id=105535

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-20 15:32:01 +10:00
Peter Hutterer
8b6d799510 tools: libinput-record: print the mouse and pointingstick udev properties
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-20 13:51:31 +10:00
Peter Hutterer
a1ba6186e7 tools: libinput-record: print a progress bar when recording to a file
To let users know something is happening.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-19 14:24:15 +10:00
Peter Hutterer
056a5eb64a tools: libinput-record: print a comment when the device is in a neutral state
Common problem: some touch sequence does something to confuse libinput but it
cannot easily be captureed. The result is a long sequence of touche that need
to be picked apart and isolated.

Print an easy-to-search  for message in the evdev output that signals that the
device touch state is now neutral (i.e. no finger down). Same can be achieved
by searching for BTN_TOOL_FINGER but that provides false positives for
switching between one and two fingers.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-19 14:24:15 +10:00