Commit graph

3158 commits

Author SHA1 Message Date
Peter Hutterer
c81809d0aa test: remove created directories too
If we created it, remove it again. No change because we're not adding any of
the directories yet.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-08 13:47:33 +10:00
Peter Hutterer
4738c5cde5 test: make litest_copy_file copy normal files too
Make the tempfile creation dependent on whether the required template is
present. Currently unused, this is just prep work for future patches.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-08 13:47:33 +10:00
Peter Hutterer
845e912527 udev: remove duplicate Chromebook Falco hwdb entry
We can expand the first one and re-use it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-08 13:47:33 +10:00
Peter Hutterer
66d8c79e16 COPYING: change a cgit to a gitlab URL
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-06 11:17:54 +10:00
Peter Hutterer
1c325e988f tools: drop the publish-doc tool
libinput docs must be pushed to wayland's web git repository now

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-06 11:15:38 +10:00
Daniel Stone
94dba68f96 doc: Fix URLs for GitLab, HTTPS
The GitLab migrations means that bugs should now be reported there
rather than Bugzilla. Though the repository is still available via
anongit, cloning through GitLab allows use of HTTPS.

All freedesktop.org URLs are also preferentially served over HTTPS
rather than unsecured HTTP.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2018-06-05 11:07:16 +01:00
Peter Hutterer
483123d490 filter: cap trackpoint scale factor at 1.0
Otherwise we scale up lower-resolution trackpoints' movements, resulting in a
jumpy cursor.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-05 10:45:07 +10:00
Peter Hutterer
07eefba84b udev: the IBM X41 Tablet must not disable the keyboard in tablet mode
https://bugs.freedesktop.org/show_bug.cgi?id=106799

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-05 10:44:53 +10:00
Peter Hutterer
3b9c665357 libinput 1.11.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-04 10:16:55 +10:00
Peter Hutterer
2744870daa doc: point at --verbose for libinput debug-events
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-04 09:21:20 +10:00
Peter Hutterer
f82e77830f doc: improve the 'tools' page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-04 09:20:15 +10:00
Peter Hutterer
085a33d545 Revert "udev: copy the trackpoint sensitivity directly from sysfs"
The lenovo compact keyboard with trackpoint has a sensitivity of 5, which
causes the trackpoint range to be 0. This in turn causes inf/NaN during
pointer acceleration as we divide by 0 and makes the cursor go unpredictably
somewhere it probably shouldn't be.

This is part of a wider problem in that the current sensitivity handling
doesn't work well for values well below the default of 128. Any such values
are scaled up to multiples of pixels instead of just working as-is.

Reverting the automatic sensitivity parsing, any systemd udev property set to
change the sensitivity increases it, so we don't run into this bug.

https://bugzilla.redhat.com/show_bug.cgi?id=1583324

This reverts commit a4036a33ca.
2018-06-04 08:44:11 +10:00
Peter Hutterer
d62118ac56 evdev: don't allow a trackpoint range of 0
https://bugzilla.redhat.com/show_bug.cgi?id=1583324

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-04 08:44:05 +10:00
Peter Hutterer
54403466c8 doc: move the "Users" section to the top of the "pages" section
On the off-chance that someone actually looks at this page, let's put the
comment most at risk by a TLDR attention span at the top.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-01 13:17:13 +10:00
Peter Hutterer
a55693f87c udev: drop the JUMPING_SEMI_MT quirk, no-one uses it
Obsolete since 342bc51016 when we disabled MT on
all semi-mt touchpads.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-31 13:09:37 +10:00
Peter Hutterer
a9ef4ba1f3 udev: drop the custom firmware detection code in favor of a modalias
This was overengineered. The separation between the model quirks file and the
udev hwdb matches allowed for more complex firmware detection. Except we never
used it anywhere but on ALPS and there we can, thankfully, just get it from
the version number in the input_id field exposed in the modalias.

So let's drop this and use that match instead. We just need an extra udev rule
to match on ID_INPUT_POINTINGSTICKs so we can differ between ALPS touchpads
and ALPS trackpoints.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-31 13:09:33 +10:00
Peter Hutterer
cf6d7e8de3 libinput 1.10.902
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-30 09:42:06 +10:00
Peter Hutterer
9b1b87cadd touchpad: replace the hardcoded thumb threshold with a udev prop
LIBINPUT_ATTR_THUMB_PRESSURE_THRESHOLD now determines whether we do thumb
pressure detection or not. Much better than having a hardcoded default that
may or may not be correct on any given device.

This patch is likely to break thumb detection on some touchpads, the only
property so far is to restore the default of 100 for all Lenovo Thinkpad
touchpads. More rules are needed, we'll just wait until someone shouts.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-30 09:42:06 +10:00
Peter Hutterer
d3bb8b3374 Restore the old trackpoint pointer accel picture
Accidentally updated the wrong picture. This reverts part of commit
d6e5313497.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-30 09:42:06 +10:00
Peter Hutterer
f84b830c81 doc: update the touchpad pointer acceleration graphs
Part of d6e5313497 but I updated the wrong svg
in that commit.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-30 09:42:06 +10:00
Peter Hutterer
d376db0669 touchpad: make the dwt paired keyboard list a struct list
This removes the artificial 3 keyboard limit. If you have more internal
keyboards than that, something is wrong in your setup but that shouldn't stop
us from working. Or more specificially: this can happen easily when running
tests so let's not fail the test suite because we created a few hundred
keyboards.

We'll still throw out a log message though.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-30 09:42:06 +10:00
Peter Hutterer
bcbc873651 fallback: make the paired keyboard list a struct list
This removes the artificial 3 keyboard limit. If you have more internal
keyboards than that, something is wrong in your setup but that shouldn't stop
us from working. Or more specificially: this can happen easily when running
tests so let's not fail the test suite because we created a few hundred
keyboards.

We'll still throw out a log message though.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-30 09:42:06 +10:00
Peter Hutterer
d5c705a539 tablet: increase the proximity timeout during test runs
This is causing too many false positives and they're not easy to filter out.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-30 09:42:06 +10:00
Peter Hutterer
50d8bc722c udev: default to a trackpoint range of 160 for the new ALPS trackpoints
https://bugs.freedesktop.org/show_bug.cgi?id=106323

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-30 09:42:06 +10:00
Martin Wilck
c5bfa00760 udev: support firmware detection for pointing sticks
Add support for firmware detection on pointing stick devices. This
is needed for ALPS only at this time.

Signed-off-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-30 09:42:06 +10:00
Martin Wilck
198c53650a libinput-measure-trackpoint-range: minimum delta measurement
libinput-measure-trackpoint-range doesn't work well for ALPS
touchsticks that have minimum delta amplitude of ~8. Fix that
by analyzing min and max amplitude (radius) of the measured deltas,
and suggesting a high trackpoint range value if ALPS-typical behavior
is encountered. Also, suggest a different calibration procedure
to the user; rather then just calibrating quick movements, slow, gentle
movements should also be covered.

Signed-off-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-25 16:29:20 +10:00
Martin Wilck
c08f2f8988 libinput-measure-trackpoint-range: fix typo
Signed-off-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-25 16:26:45 +10:00
Peter Hutterer
41f880a217 test: fix udev prop test for apple touchpads
Clearly a copy/paste error.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-25 13:44:51 +10:00
Peter Hutterer
c71bb83cd9 test: fix udev rule for the gpio keys test device
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-25 11:35:13 +10:00
Peter Hutterer
7e6dd22ad5 udev: fix entry for Lenovo X280, missing dmi: prefix
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-24 11:19:07 +10:00
Peter Hutterer
6127a243d1 libinput 1.10.901 2018-05-22 11:13:27 +10:00
Chow Loong Jin
8e30b3069c Bump TRACKPOINT_DEFAULT_MAX_DELTA to 120
This raises the trackpoint speed limit to something more conducive to
long-distance moves.

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

Signed-off-by: Chow Loong Jin <hyperair@debian.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-21 14:59:06 +10:00
Peter Hutterer
2167c3af05 Merge branch 'wip/custom-pointer-accel-revert' 2018-05-21 12:19:30 +10:00
Peter Hutterer
fbd284ec14 Merge branch 'wip/touchpad-pointer-accel-v7' 2018-05-21 12:19:17 +10:00
Peter Hutterer
d6e5313497 filter: improve touchpad acceleration
This seems to give me roughly the same behaviour as macos does on the default
0 speed setting.

* Default speed is lower than before by around 30% [1]
* Acceleration kicks in much sooner (130mm/s vs 250mm/s before)
* Acceleration kicks in slower at lower speeds, so the change from 130mm/s to
  150mm/s is less than that of 320mm/s to 350mm/s
* The effect of the speed setting is a wide-range constant (de|ac)celeration
  [2], which means:
  * The unaccelerated baseline up until the threshold now changes with the
    speed setting
  * The threshold is now the same for all speeds
  * The range of the speed setting should now easily cover all desired device
    speeds.
  * Acceleration is steeper at higher speeds
* Deceleration was left as-is.

[1] This may or may not fix the jumping pointer issues caused by the previous
high defaults. When you have high default acceleration you move the finger
slower. This slow movement caused some touchpads (mostly seen on Lenovos) to
create pointer jumps. These weren't seen on synaptics previously because of a
combination of higher user finger speed (thus not triggering the bug) or just
not being as obvious (2px jump vs 10 px jump).

[2] The speed setting is actually a curve, the closer you get to 1.0 the more
difference you see between two different values. The curve's points are:
-1/0, 0/1, 1/5, so the resolution is closer for slow speeds. We still have
double resolution on the setting though so you'll find what you want.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-21 12:18:58 +10:00
Peter Hutterer
4c31a1a285 tools: debug-gui: add some extra targets for pointer acceleration testing
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-21 12:18:58 +10:00
Peter Hutterer
33162632cb Revert "Expose a custom acceleration profile"
This looked good on paper but clearly no-one (including myself) ever tested this
in a real-life situation or they would've noticed that the constant factor is
missing, causing a segfault on the first two-finger scroll event, touchpad
gesture or button scrolling.

Adding the constant factor makes the API much worse and the benefit is
unclear, so out of the window it goes. We can revisit this for libinput 1.12
but this isn't going to make the next release.

This reverts commit d8bd650540.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-21 12:15:25 +10:00
Peter Hutterer
eae33ffcf0 Revert "touchpad: allow custom profiles on touchpads"
This reverts commit f6d61dc314.
2018-05-21 12:09:20 +10:00
Peter Hutterer
c94b33768a test: fix the udev rule for the HP WMI hotkeys device
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-18 15:26:59 +10:00
Peter Hutterer
187e33f5da test: mark the thinkpad extrabuttons device as ID_INPUT_SWITCH
This is supposed to come from systemd on a real setup, but for our test setup
we want to pass the test suite even when the system itself doesn't set it.
2018-05-18 15:26:57 +10:00
Peter Hutterer
6adb336829 touchpad: remember the suspend reason
There are 4 possible cases why a touchpad suspends right now: lid switch,
tablet mode switch, sendevents disabled and sendevents disabled when an
external mouse is present.

But these reasons can stack up, e.g. a lid switch may happen while send events
is disabled, disabling one should not re-enable the touchpad. This patch adds
a bitmask to remember the reasons we're current suspended, resuming only
happens once all reasons are back to 0.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-18 12:05:02 +10:00
Peter Hutterer
a9d78e99ea touchpad: split the switch event handlers up
Because we register the handler separately (once for lid, once for
tablet-mode) the handler is called twice for the same event. This causes a
double-suspend of the touchpad, though it doesn't seem to have any real
effect.

Split it up so that each handler function only does one thing.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-18 12:05:02 +10:00
Peter Hutterer
6dcdfdd513 evdev: add three more Logitech K400-like devices to the debouncing quirk
And rename the model flag, no point in having separate flags here, we likely
have to add more devices over time.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-17 12:37:20 +10:00
Peter Hutterer
3d6ccb57be tools: ptraccel-debug: fail for a sequence without events
Found by scan-build, running ptraccel-debug --mode=sequence --nevents=5
would use garbage custom_deltas.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-16 16:24:06 +10:00
Peter Hutterer
ba922b59ef util: avoid potential integer overflow
If we need more than 1000 pairs, we have a problem...

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-16 14:23:12 +10:00
Peter Hutterer
7ad3dcf939 tools: libinput-record: fix leaking memory in the error cases
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-16 14:23:12 +10:00
Peter Hutterer
75e4ab05e4 utils: fix leak in kv_double_from_string()
We need to free 'pairs' here, do so by jumping to the error label.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-16 14:23:12 +10:00
Peter Hutterer
db2d16bfce tools: ptraccel-debug: switch to a mode enum
Fixes the dead code issue introduced in
822c97a1c2, print_accel was always
true so the rest of the code never got triggered.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-16 14:23:12 +10:00
Peter Hutterer
8178339b5b meson: add a 'coverity' option to fix the build
Coverity screwed up something so we can't submit builds right now, the
compilation units all fail. math.h pulls in a _Float128 type that coverity
cannot handle. So as a workaround, add an option to the build to avoid this
and remove it when the next version of coverity hopefully fixes this.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-16 14:23:12 +10:00
Peter Hutterer
2d11182689 test: assume Wacom devices are external touchpads
Same as the code itself does.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-16 11:58:14 +10:00