Commit graph

4248 commits

Author SHA1 Message Date
Peter Hutterer
a014df1081 test: semi-fix the switch_suspend_with_touchpad test
This used to do nothing, now at least it does the same thing as the
corresponding keyboard test. It merely tests the switch going on/off while a
touchpad is present, so short of an unexpected error message or a crash this
test doesn't actually test for any specific behavior.

Fixes #502

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-08-03 15:24:45 +10:00
Diego Abad A
0e7beaa058 FIX: typo on building documentation
Signed-off-by: Diego Abad <dabada83@gmail.com>
2020-07-27 08:37:10 -05:00
Peter Hutterer
13c3b008d0 libinput 1.15.902
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-27 15:36:24 +10:00
Peter Hutterer
b74f03301b gitlab CI: build an rpm package to verify the installed file list
This is not a package intended for, it's a job to fail when we accidentally
change the file list. An rpmbuild job like this was what detected
f15da0f108.

The spec file resembles the Fedora one but has BuildRequires removed (we rely
on the container for that).

The same task could be achieved by keeping a file list and comparing the
installed tree but since I had the rpm spec file already, let's use that for
now.

This requires meson 0.55 which hit F32 yesterday.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-22 10:47:22 +10:00
Peter Hutterer
813a458352 gitlab CI: remove a bunch of trailing spaces
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-22 10:47:22 +10:00
Peter Hutterer
ac91d8df3b touchpad: disable jump detection on the Lenovo X1 Gen6 touchpad
This touchpad has firmware that seems to buffer events. In the words of the
reporter:

  In usage, it feels like motions vary between smooth and choppy; slow
  movements are smooth and quick movements are choppy. It's as if the
  touchpad aggregates quick movements and sends one big movement instead
  of sending discrete events. To make the movement more natural, the
  events preceding the jump should be of higher magnitude and the jump
  less pronounced, but that's just not how the touchpad works, it seems.

In the actual event data this looks exactly like a pointer jump: small
movements, one big one, then small ones again. If we filter that large
movement out we prevent the user from moving quickly.

There's no way to detect this or work around this, so let's add a quirk that
disables the jump detection for this device.

Fixes #506

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-15 21:58:52 +00:00
Peter Hutterer
d6c6c40fda quirks: correct modalias for the Lenovo X1 Gen6
From commit 74e20e0ae0, bug report
https://bugzilla.redhat.com/show_bug.cgi?id=1565692

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-15 21:58:52 +00:00
Peter Hutterer
b9ec408872 evdev: drop the check for tablet vs joystick
libwacom has been unsetting ID_INPUT_JOYSTICK for known tablets since 2015
(libwacom 0.12) so this comment is outdated. And the input-id udev builtin
never labels something as tablet *and* joystick. Which means: systemd sets
either tablet or joystick. For tablets that are known to libwacom the joystick
bit gets corrected and we only see the tablet bits.

Tablets unknown to libwacom remain as joysticks and are ignored but that's the
behavior we had anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-15 03:24:44 +00:00
Peter Hutterer
eededbeb7f evdev: fix the check for tablet vs joystick
A device may have ID_INPUT_JOYSTICK and ID_INPUT_KEY in which case it would
still get added, despite being a joystick device. Make sure we check only the
tablet and joystick bits - where a device has the joystick bit set but not the
tablet one we ignore it.

Note that this check will get removed in the next commit anyway, it's just
here to make tracking the change easier in the history (and figuring out where
potential regressions come from).

Fixes #415

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-15 03:24:44 +00:00
Peter Hutterer
c9ff7e78d9 libinput 1.15.901
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-15 09:36:48 +10:00
Peter Hutterer
c64d148372 test: rename the identifier in the 50-litest.conf
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-15 09:36:48 +10:00
Peter Hutterer
0ccf43600c test: fix the ABS_Y handling for the Protocol A test device
No effect on the test results because we never use ABS_Y anyway for multitouch
devices.

Fixes #505

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-09 09:50:49 +10:00
Peter Hutterer
912a457f18 tools: add missing linebreak in error message
Missing from a0643a9c98

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-08 13:25:12 +10:00
Peter Hutterer
2e25741061 test: grab the device before any lid or tablet mode switches
Putting an EVIOCGRAB on the device before sending those events means no-one
else sees those events - particularly upower. This means no-one else knows the
lid is on or off and thus we never blank the screen (or suspend/shut down but
those are inhibited anyway).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-07 18:51:33 +10:00
Peter Hutterer
86946342fb test: store the list of open file descriptors in the litest context
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-07 18:51:33 +10:00
Peter Hutterer
52d6398753 test: use litest_destroy_context() for test-suite contexts
Symmetrical to litest_create_context(), this allows us to store special data
in that context that we have access to during the tests.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-07 18:51:33 +10:00
Peter Hutterer
d78d662928 test: use context creation helper in the log tests
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-07 18:51:33 +10:00
Peter Hutterer
9bb8133486 test: inhibit shutdown and suspend while the tests are running
We test lid switch events which are independently handled by Upower. Let's
make sure nothing else can tell logind to suspend or shut down while we're
running.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-07 18:51:33 +10:00
Peter Hutterer
3403692ff0 tools: when running the test suite, start the debug-gui minimized
This allows us to run the option parsing test without getting interrupted by a
million debug-gui windows popping up for half a second.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-07 18:51:33 +10:00
Ryo Munakata
58d8344da9 Add quirk for Lenovo ThinkPad X1 Tablet (1st Gen)
Signed-off-by: Ryo Munakata <ryomnktml@gmail.com>
2020-07-03 22:18:05 +09:00
Peter Hutterer
04e612488a gitlab CI: hook up coverity
This requires the COVERITY_SCAN_TOKEN as listed on the project settings page
in coverity itself. The intention here is to run this as a scheduled job, with
the pipeline schedule itself controlling the branch name etc. This way we can
keep the gitlab CI simple enough and just check for COVERITY_SCAN_TOKEN
itself.

This job shouldn't ever fail unless coverity is down (we'll fix that then),
the results of the coverity run are sent to the user that owns the the
scheduled pipeline, i.e. me.

Because coverity does not currently work on F32 (invalid GNU version number:
101), we force this to run on F31.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-03 06:57:54 +00:00
Peter Hutterer
1ce05ca4a5 gitlab CI: drop custom scheduled handling, set FDO_FORCE_REBUILD instead
This is a leftover from pre-ci-templates days. Now that ci-templates handles
FDO_FORCE_REBUILD remove the custom handling and for the weekly rebuild just
set that variable to 1 in the scheduled pipeline itself.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-03 08:54:33 +10:00
Peter Hutterer
a0643a9c98 tools: change the error message for missing tools
Given that some people appear to not read until the "is not installed" part of
the error message, let's reduce the error message to just that part. This may
be confusing where a user mistypes the actual command but that happens rarely
compared to those that can't run libinput record because it's in a different
package.

Fixes #500

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-01 01:21:21 +00:00
Peter Hutterer
f15da0f108 meson.build: don't install the quirks in a further 'quirks' subdirectory
install_subdir() by default also copies the 'quirks' directory, resulting in
the quirks files being in <datadir>/libinput/quirks/*.quirks as opposed to the
previous <datadir>/libinput/*.quirks.

Fixes 727dc44b04

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-01 10:57:20 +10:00
Peter Hutterer
ad54c0c8b3 gitlab CI: move the MR check to the deploy stage
This gives the developer enough time to file an MR after pushing a branch.
Having this run in the first stage means we get false positives because no MR
has been filed yet when the job is run.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-06-30 10:43:44 +10:00
Peter Hutterer
401a80d8cf doc: don't ship the .doctree files with the documentation
They're build artifacts and not needed for the actual documentation. Tell
sphinx-build to generate those files in a custom directory that's not part
of the documentation.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-06-26 09:28:50 +10:00
John Rodriguez
c8e8c8fb4b Add quirks file for Sony Vaio Laptop
The file contains pressure overrides for the VPCEG series.
Signed-off-by: John Rodriguez <johrodri@optonline.net>
2020-06-17 13:33:08 +00:00
Peter Hutterer
727dc44b04 meson.build: use install_subdir() to install the quirks files
This removes the need to check whether the files were added in meson.build but
requires litest to traverse the source dir now.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-06-17 07:52:00 +00:00
Peter Hutterer
d724dc060b Replace strneq() with strstartswith() for variable prefixes
Leaving in-place all those where we know the length of the prefix, but
replacing all those where we were calling strlen on the prefix.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-06-17 07:52:00 +00:00
Peter Hutterer
bd1fcb9c6e utils: add strstartswith() and strendswith() utility functions
Modeled after Python's str.startswith() and str.endswith()

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-06-17 07:52:00 +00:00
Yariv Barkan
84b3b1731a quirks: fix Apple external trackpad v2 thresholds
The external Apple "Magic" trackpads, both the first and the second
generations, have pretty good built-in spurious touch filtering. For
these device models libinput's own filtering is not required. Using low
enough values such as 20:10 effectively disables libinput's filtering.

Signed-off-by: Yariv Barkan <oigevald+libinput@gmail.com>
2020-06-17 09:46:59 +03:00
Peter Hutterer
600a0334a7 gitlab CI: check merge requests for the allow collaboration checkbox
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-06-15 20:50:37 +10:00
Peter Hutterer
425950d3bc gitlab CI: use ci-fairy for commit message checks
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-06-15 20:14:39 +10:00
Peter Hutterer
9b3e0e8043 tools: per-slot-delta: if a NONE touch gets data, assume it's starting
If we have a recording that started after the touch down, let's start that
touch on the first x/y position update.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-06-04 10:43:33 +10:00
Peter Hutterer
9ecac89bab tools: per-slot-delta: construct the right InputEvent
d107d5 broke this tool because the InputEvent was our local datastructure,
which needed the evbit redirect.

Fixes d107d58cd2

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-06-04 10:43:33 +10:00
Peter Hutterer
4cf4aba3fb evdev: filter unreliable tablet mode switch events
If we know that the tablet mode switch is bogus anyway, filter the event and
don't pass it to the caller. They won't know whether it's bogus so the only
result we get here is buggy behaviour.

This is the simplest solution here, it filters the mode switch at the lowest
level and thus the caller won't know that the tablet even has a mode switch at
all. Where the device doesn't have any other switches it'll also lose the
switch capability.

This may cause issues in some niche cases where the event node only has
that one bit and we now disabled it leaving us with a zero-event bit device.
Shouldn't matter to callers, but let's see.

Fixes #491

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-06-03 22:32:56 +00:00
Peter Hutterer
8ee3b7a7f2 test: fix a bunch of checks for a given switch
The has_switch() function returns -1 if the device doesn't have the switch
capability - which is the same as "true" and how we used this so far. Fix the
checks.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-06-03 22:32:56 +00:00
Peter Hutterer
4058c43579 evdev: a device without any seat caps is an unhandled device
If we don't have any caps, assume the device is unhandled and ignore it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-06-03 22:32:56 +00:00
Peter Hutterer
84fda690bd fallback: add missing curly braces to match the coding style
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-06-03 22:32:56 +00:00
Peter Hutterer
fc7b8d7948 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>
2020-06-03 21:50:44 +00:00
Peter Hutterer
6e9477a86d 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>
2020-06-03 21:50:44 +00:00
Peter Hutterer
120d42812e touchpad: add touch state debugging to the palm and tap state debug logs
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-06-03 21:50:44 +00:00
Peter Hutterer
75ca6dcfa3 gitlab CI: alpine needs pip explicitly installed now
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-06-03 21:22:56 +10:00
Peter Hutterer
2a7ea444e3 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>
2020-06-02 01:07:01 +00:00
Evan Goode
034226d904 Allow the flat acceleration profile for touchpads
Signed-off-by: Evan Goode <mail@evangoo.de>
2020-05-27 06:21:00 +00:00
Peter Hutterer
0d06bfc4e2 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>
2020-05-26 05:11:01 +00:00
Hans de Goede
3618129496 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>
2020-05-22 04:06:40 +00:00
Peter Hutterer
ba68cdf67e 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>
2020-05-22 03:41:05 +00:00
Peter Hutterer
ba24c95b05 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>
2020-05-22 03:10:06 +00:00
Peter Hutterer
0b221c6c97 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>
2020-05-22 03:10:06 +00:00