Commit graph

2919 commits

Author SHA1 Message Date
Mario Di Raimondo
c4fc98731d Fix Apple Magic Trackpad sensitivity
https://bugs.freedesktop.org/show_bug.cgi?id=103572

Signed-off-by: Mario Di Raimondo <mario.diraimondo@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit f47eb2d796)
2018-03-07 10:39:48 +10:00
Konstantin Kharlamov
3efd7c82aa touchpad: add wobbling detection
The details are explained in comment in the code. That aside, I shall
mention the check is so light, that it shouldn't influence CPU
performance even a bit, and can blindly be kept always enabled.

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

Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
(cherry picked from commit 400aadd53a)
2018-03-02 14:04:08 +10:00
Konstantin Kharlamov
5f4d975861 touchpad: remove the code for disabling hysteresis
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
(cherry picked from commit e8dffbd73a)
2018-03-02 14:04:07 +10:00
Peter Hutterer
298b28d7f1 touchpad: move the hysteresis into its own substruct
Prep work for the wobbling detection patch

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
(cherry picked from commit e43bd4ae3a)
2018-03-02 14:04:06 +10:00
Peter Hutterer
68949fc5c5 touchpad: don't do speed-based thumb detection on single-touch or semi-mts
Because life is too short for this

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 39b806089c)
2018-03-02 14:03:57 +10:00
Peter Hutterer
25d1fbbf00 meson: add the 221 version to the libsystemd dependency
The sd-bus interface we're using wasn't public until 221.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 8353eeb5a8)
2018-03-02 14:03:40 +10:00
Peter Hutterer
5c86ba7580 libinput 1.10.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-02-28 10:03:22 +10:00
Peter Hutterer
c5c6cc13be tools: fix inverse up/down threshold handling in measure touch-size
https://bugs.freedesktop.org/show_bug.cgi?id=105264

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 5b29be3998)
2018-02-28 08:48:08 +10:00
Peter Hutterer
70258657b0 tools: fix option parsing in libinput measure
Missing '+' in the optstring caused it to evaluate all options. If any
argument was passed to a subcommand, libinput-measure would throw an error and
exit.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 59550ed21c)
2018-02-28 08:48:03 +10:00
Peter Hutterer
596a03a0fa touchpad: only begin fake touches when we have at least one finger down
If a single-touch touchpad drops below the pressure threshold in the same
frame where a fake finger is added, we begin a fake touch here. The subsequent
loop ends this fake touch because real_fingers_down is 0.

This causes the tapping code to have a mismatch of how many fingers are down
because it never sees the touch begin event for that finger.

https://bugs.freedesktop.org/show_bug.cgi?id=105160
(cherry picked from commit 01a633b6eb)
2018-02-28 08:47:44 +10:00
Maxin B. John
71fe2b6ef4 libinput-measure-touchpad-tap: use /usr/bin/env to invoke python3
Tweak this python scripts to use '/usr/bin/env python3'

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 920debffd7)
2018-02-28 08:47:35 +10:00
Peter Hutterer
fc78cdc4bb udev: fix segfault when resuming before assigning a seat
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 63880d6e1b)
2018-02-28 08:47:32 +10:00
Quentin Glidic
0fcbb58d97 meson: Fix absolute libdir case in install script
If libdir is an absolute path (which means it’s outside of prefix) we
would wrongly add the prefix to it in the install script. Just pass the
correct libdir from Meson directly thanks to join_paths() magic.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit b2b5cdaf61)
2018-02-28 08:47:29 +10:00
Quentin Glidic
c726f37ebd meson: Fix bindir usage in install script
Since the install script cannot know the correct bindir, just pass it
from Meson directly.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 0843fa8e5e)
2018-02-28 08:47:27 +10:00
Peter Hutterer
3d4712d10a evdev: add a quirk to disable debouncing on the MS Nano Transcievers
A set of wireless devices that can scramble the timestamps, so we get
press/release within 8ms even though I doubt the user is capable of doing
this. Since they're generally good quality anyway, let's just disable
debouncing on those until someone complains and we need something more
sophisticated.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 3a3fd645c4)
2018-02-28 08:47:07 +10:00
Peter Hutterer
076c7b6c00 evdev: fail before open_restricted if the devnode doesn't exist
https://bugzilla.redhat.com/show_bug.cgi?id=1536633
https://bugzilla.redhat.com/show_bug.cgi?id=1539046
https://bugzilla.redhat.com/show_bug.cgi?id=1539783
https://bugzilla.redhat.com/show_bug.cgi?id=1540662
https://bugs.freedesktop.org/show_bug.cgi?id=104278

Debugged-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit cb186abc17)
2018-02-28 08:46:53 +10:00
Peter Hutterer
1b21a4317d libinput 1.10.0 2018-02-13 11:28:58 +10:00
Peter Hutterer
cbb4ec1e3e tablet: don't set rotation on a tool if we don't have ABS_Z
Rotation on a tool can either ABS_Z or in the case of the mouse/lens tools a
combination of ABS_TILT_X/Y. The code assumes that if the rotation on a stylus
(not mouse/lense) changes, we need to fetch it from ABS_Z. This happens on the
very first event from the tablet, proximity in invalidates all axes so we can
send the current state to the caller.

On libwacom-recognized tablets we never set the rotation bit on the stylus, so
that's all fine. On tablets without libwacom support, the stylus may have a
rotation bit copied because we have it set thanks to mouse+tilt on the tablet.
When that first event is handled, we try to access ABS_Z. On tablets without
ABS_Z like Aipteks, we go boom.

Fix this by checking for ABS_Z during tablet init, if we don't have that axis
then never set the rotation bit on the tool. That's the only axis where we
need this, all other axes have a single cause only and thus the tablet bits
are accurate anyway.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-02-09 12:18:35 +10:00
Peter Hutterer
76cda659b7 test: add a missing proximity timeout in a tip up test
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-02-07 10:06:29 +10:00
Peter Hutterer
2872cb4dec tablet: remove obsolete BTN_TOUCH case
We filter BTN_TOUCH in the caller, so this cannot happen here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-02-07 10:06:29 +10:00
Peter Hutterer
5ec1dcbfb4 tablet: drop unnecessary switch case statements
We fall through to the default statement anyway

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-02-07 10:06:29 +10:00
Peter Hutterer
95242ceb4b libinput 1.9.902
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-02-06 19:32:56 +10:00
Peter Hutterer
64c73d7ae6 timer: change the timer offset warning to a client bug
This looks like a libinput bug (well, it does say "libinput bug" on the
package) but it hasn't been that for a long time. The cause is almost always
insufficient motivation to call libinput_dispatch() by the caller, or at least
not doing it with the celerity libinput demands (and deserves, if I may say
so).

Up-, down- or side-grade it to a client bug, so the outrage can be
directed elsewhere, preferably away from me. And add a section to the
documentation, just in case someone actually reads this stuff.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
2018-02-06 19:29:26 +10:00
Peter Hutterer
d4b76be18b evdev: log all evdev_msg_* on one line
So we don't have to have newline handling in the callers. This effectively
reverts 6ab2999be9 "test: detect linebreaks in log messages".

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-02-06 19:29:26 +10:00
Peter Hutterer
bb431ae20d evdev: whitespace fix
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-02-05 17:50:15 +10:00
Peter Hutterer
b8bef106c0 test: swap KEY_POWER for KEY_VOLUMEUP on the switch key routing test
If there's anything that listens for KEY_POWER it will likely shut down or
suspend the host. Since it doesn't matter whether we're really testing for
KEY_POWER or just any other key, let's just switch it and avoid one headache.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-02-05 17:49:04 +10:00
Peter Hutterer
394f343e70 test: don't abort for timer offset errors during valgrind runs
Too easy to trigger with the short button debouncing offsets

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-02-01 16:52:02 +10:00
Peter Hutterer
7175cafe78 test: inhibit nasty keys and switches during test runs
Having the system suspend or shutdown halfway through a test run is a tad
annoying. So let's talk to logind and tell it to inhibit the various keys
we're testing.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-02-01 16:52:02 +10:00
Peter Hutterer
39fa810b58 test: fix udev rule for hp wmi hotkeys test device
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-02-01 14:13:24 +10:00
Peter Hutterer
dccc23a77f fallback: remove unused DEBOUNCE_TIME setting
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-01-23 15:28:09 +10:00
Peter Hutterer
0ac4a14861 libinput 1.9.901
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-01-22 09:08:43 +10:00
Peter Hutterer
59d62ff234 circleci: update to use Ubuntu 17.10
17.04 is EOL, and this means we can drop our meson-from-build section too

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-01-19 09:24:47 +10:00
Peter Hutterer
a2a54586eb circleci: use meson configure rather than mesonconf
This broke with meson 0.44 and results in an error:
RuntimeError: Could not determine how to run Meson. Please file a bug with details.

See https://github.com/mesonbuild/meson/issues/2761

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-01-19 09:05:44 +10:00
Peter Hutterer
937e60319b touchpad: drop the double normalization
Previously, touchpad deltas were converted to 1000-dpi normalized coordinates
and handled from there. This changed in bdd4264d61 (1.6)
when the filter functions started taking device coordinates instead. Since
then, we used to convert the device delta to normalized coordinates, then
(often immediately) convert back to device coordinates, albeit for equal x/y
resolution. This isn't necessary, we can just convert the device coordinates
to x/y-equal resolution device coordinates and pass those on.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-01-10 12:21:01 +10:00
Peter Hutterer
f5a9e38c90 touchpad: don't disable the hysteresis unless a finger is down
On the very first event, the last_motion_time set by tp_begin_touch is not yet
set because we are called before the pressure-based touch detection takes
effect. And any event timestamp is more than 80ms after a zero timestamp,
causing the hysteresis to always be disabled.

https://bugs.freedesktop.org/show_bug.cgi?id=98839#c74

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-01-09 13:47:42 +10:00
Peter Hutterer
932911d229 path: if the udev device is never initialized, bail
2000ms should be enough, if that fails let's bail completely.

Related to: https://bugs.freedesktop.org/show_bug.cgi?id=104278

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-01-09 13:47:42 +10:00
Peter Hutterer
613ecda1cb test: collect test case failures and print them on each fd
When running the test suite in full fork mode, the error messages are in the
quite verbose output and searching for them is annoying. Work around this by
opening a pipe to each subprocess and writing the failed test cases to that
pipe. When all tests have finished, print the messages to stdout. This way the
failures are always the last thing printed by the test suite.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-01-09 13:47:42 +10:00
Peter Hutterer
43de03a08c tablet: break up a long line
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-12-18 14:41:14 +10:00
Peter Hutterer
4da9d51b67 touchpad: remove duplicate if condition
This was never true, we for the first part 3 lines above and return early. So
if we get here, it's always false.

commit aa87d2b25b added the new condition above, so since then this code
was inactive and can be removed.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-12-18 14:16:26 +10:00
Peter Hutterer
61bdc05fb0 tablet: set the tip-up pressure threshold to 1%
Some pens keep sending small amounts of pressure even when the tip is up. This
isn't always a sign of the pens worn out, it also happens on the new Pro Pen
3D models.

The X driver uses a default threshould of ~1.3% to paper over this, let's do
the same with a 1% threshold. This threshold only applies to pens that don't
already have a pressure offset anyway.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-12-08 12:59:58 +10:00
Peter Hutterer
1c8636923b fallback: send key events out immediately upon receiving them
Commit db3b6fe5f7 "fallback: change to handle the state at EV_SYN time"
introduced regressions for two types of event sequences.

One is a kernel bug - some devices/drivers like the asus-wireless send a key
press + release within the same event frame which now cancels out and
disappears into the ether. This should be fixed in the kernel drivers but
there appear to be enough of them that we can't just pretend it's an outlier.

The second issue is a libinput bug. If we get two key events in the same frame
(e.g. shift + A) we update the state correctly but the events are sent in the
order of the event codes. KEY_A sorts before KEY_LEFTSHIFT and our shift + A
becomes A + shift.

Fix this by treating key events as before db3b6fe5f7 - by sending them out
as we get them.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-12-08 10:09:26 +10:00
Greg V
8adfac3975 Include stdarg.h where variadic functions are used
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-12-01 09:31:42 +10:00
Greg V
01917805fa meson.build: add missing udev dependencies and linux/input.h includes
Almost everything requires libudev because libinput.h pulls it in. Make this
an explicit dependency.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-12-01 09:29:31 +10:00
Peter Hutterer
0b8372962b tools: print the device in all measure tools
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-30 14:26:43 +10:00
Peter Hutterer
01da0ec1cb doc: more and more documentation about hwdb updates
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-30 10:21:15 +10:00
Peter Hutterer
d1146930da tools: print out the device used for measuring the trackpoint range
Suggested in https://bugs.freedesktop.org/show_bug.cgi?id=103947#c2

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-29 14:16:03 +10:00
Peter Hutterer
ac9c3f53b9 doc: update the pointer acceleration page for the 1.9 trackpoint accel
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-29 12:47:25 +10:00
Peter Hutterer
c727ee7f23 doc: add a doc for trackpoints 2017-11-29 12:11:46 +10:00
Peter Hutterer
ac1d5082fe tools: clarify PermissionError in measure-trackpoint-range
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-29 12:11:46 +10:00
Peter Hutterer
1b54b726f0 tools: fix dashes in man page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-27 13:04:33 +10:00