Commit graph

405 commits

Author SHA1 Message Date
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
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
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
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
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
bcd9b4d3ca Update the README and the graphs showing libinput in the stack
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-15 14:18:46 +10:00
Peter Hutterer
3251ba2af0 touchpad: add a tool to measure the touchpad fuzz
Well, I say "measure" but really at this point it just reads the
properties/axes and then does it's best to auto-generate a hwdb entry that
matches the user's hardware and sets a fuzz value on the device. Ideally this
reduces the number of hand-holding required in bugzillas. There are plenty of
things that can go wrong, so our fallback is still to throw up our hands and
point to the documentation.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-15 13:51:33 +10:00
Peter Hutterer
56721a3ef4 doc: fix typo
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-14 09:27:39 +10:00
Peter Hutterer
b1efbd41b1 doc: update pointer acceleration doc with the fixed graphs
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-11 11:49:39 +10:00
Peter Hutterer
119b6d924c doc: add two more items I need for trackpoint bugs
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-03 16:08:25 +10:00
Peter Hutterer
0561f68160 doc: drop doc for POINTINGSTICK_CONST_ACCEL, no longer in use
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-03 15:49:40 +10:00
Peter Hutterer
d8bd650540 Expose a custom acceleration profile
This adds a third profile to the available profiles to map device-specific
speed to an acceleration factor, fully defined by the caller.

There has been a consistent call for different acceleration profiles in
libinput, but very little specifics in what actually needs to be changed.
"faster horses" and whatnot (some notable exceptions in e.g. bug 101139).
Attempts to change the actual acceleration function will likely break things
for others.

This approach opens up the profile itself to a user-specific acceleration
curve. A caller can set an acceleration curve by defining a number of points
on that curve to map input speed to an output factor. That factor is applied
to the input delta.

libinput does relatively little besides mapping the deltas to the
device-specific speed, querying the curve for that speed and applying that
factor. The curve is device-specific, the input speed is in device units/ms.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-26 14:48:37 +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
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
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
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
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
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
2ab233857d touchpad: handle a palm down in the tapped state
We expected the first event after TAPPED to be a finger down. If that finger
has been recognised as palm, the finger state isn't TOUCH_BEGIN so we get an
invalid state in our FSM.

  libinput bug: 0: invalid tap event TAP_EVENT_PALM in state TAP_STATE_TAPPED

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-07 11:07:54 +10:00
Peter Hutterer
d25aa301b1 doc: more references to libinput-record
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-01 12:19:44 +10:00
Peter Hutterer
4072db4c38 doc: add a section to the tools page for record/replay
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-01 11:50:46 +10:00
Peter Hutterer
3a3fd645c4 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>
2018-02-13 15:58:48 +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
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
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
ac1748ef4d debounce: handle a timeout in MAYBE_SPURIOUS state
Sequences to trigger:
- spurious debouncing is enabled
- release a button in IS_DOWN state -> RELEASE_DELAYED
- short timeout triggers RELEASE_WAITING

If a button press now comes before the long timeout expires, we transition to
MAYBE_SPURIOUS where the long timeout may expire. In that case we should
transition to pressed state again.

Reported-by: Vicente Bergas <vicencb@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-22 08:44:30 +10:00
Peter Hutterer
46eab97538 touchpad: work palm detection into the tap state machine
Unlike the already-existing thumb detection, a touch may be labelled palm at
any time, not just during the initial touch down. This requires full
integration into the tap state machine to unwind properly. For most states, a
palm detection simply ignores the finger and reverts to the most recent state.

One exception is the case of two fingers down, one finger up followed by the
remaining finger detected as a palm finger. This triggers a single-finger tap
but with timestamps that may be from the wrong finger. Since we're within a
short tap timeout anyway this should not matter too much.

The special state PALM_UP is only handled in one condition (DEAD). Once a
touch is a palm we basically skip over it from then on. If we end up in the
DEAD state after a button press we still need to handle the palm up events
accordingly to be able to return to IDLE. That transition also requires us to
have an accurate count of the real fingers down (palms don't count) so we need
a separate nfingers_down counter for tapping.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-20 11:31:56 +10:00
Peter Hutterer
de994d135e evdev: add new debouncing code
The current debouncing code monitors events and switches on when events are
too close together. From then on, any event can be delayed.

Vicente Bergas provided an algorithm that avoids most of these delays:
on a button state change we now forward the change without delay but start a
timer. If the button changes state during that timer, the changes are
ignored. On timer expiry, events are sent to match the hardware state
with the client's view of the device. This is only done if needed.

Thus, a press-release sequence of: PRP sends a single press event, a sequence of
PRPR sends press and then the release at the end of the timeout. The timeout
is short enough that the delay should not be noticeable.

This new mode is called the 'bounce' mode. The old mode is now referred to as
'spurious' mode and only covers the case of a button held down that loses
contact. It works as before, monitoring a button for these spurious contact
losses and switching on. When on, button release events are delayed as before.

The whole button debouncing moves to a state machine which makes debugging a
lot easier. See the accompanying SVG for the diagram.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-20 09:55:05 +10:00
Peter Hutterer
c67b74b45e doc: add a FAQ regarding "please add a configuration option"
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-08 21:42:16 +10:00
Peter Hutterer
b15b66616e doc: update test suite page for ninja and other recent changes
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-02 10:38:54 +10:00
Peter Hutterer
fb467dce8f doc: quote all paths in the doxygen file
https://bugs.freedesktop.org/show_bug.cgi?id=103532

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-01 14:54:59 +10:00
Peter Hutterer
940658e1b7 tablet: print what capability is missing when rejecting a device
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-10-26 11:01:29 +10:00
Peter Hutterer
3b0f1d767a doc: add a section for tablet mode switches
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-09-29 08:13:44 +10:00
Peter Hutterer
35e411a2c6 doc: add another item to the FAQ
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-09-29 08:13:00 +10:00
Peter Hutterer
1acfaa9018 doc: update the GNOME stack graph
These days it's mutter that controls the input devices, not g-s-d.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-09-28 08:43:38 +10:00
Peter Hutterer
77890ecc8f tablet: always enable the no-proximity-out quirk on HUION tablets
And instead disable it when we do get a proximity out.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2017-09-21 12:27:46 +10:00
Peter Hutterer
1962c6f2db tablet: add a quirk for the HUION PenTablet that doesn't send proximity out events
Could be fixed in the kernel, but these tablets are effectively abandoned and
fixing them is a one-by-one issue. Let's put the infrastructure in place to
have this fixed once for this type of device and move on.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Yay-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2017-09-20 09:30:06 +10:00
Peter Hutterer
00272cfbb1 Add support for LIBINPUT_IGNORE_DEVICE
The recommended way to have libinput ignore specific devices so far was to
remove the ID_INPUT* properties from the device. That may also affect other
pieces of the stack that need access to this device.

For the niche case of a device that should only be ignored by libinput but
otherwise be treated normally by the system, we now support the
LIBINPUT_IGNORE_DEVICE property.

If the property is set to "0", it's equivalent to being unset. This gets
around some technical limitations in udev where unsetting a property is
impossible via a hwdb entry.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-08-23 14:56:51 +10:00
Peter Hutterer
55d1bb1217 pointer: add button debouncing
Some devices have worn-out switches or just cheap switches that trigger
multiple button events for each press. These can be identified by unfeasably
short time deltas between the release and the next press event. In the
recordings I've seen so far, that timeout is 8ms.

We have a two-stage behavior: by default, we do not delay any events but we
monitor timestamps. The first time a bouncing button is detected we switch to
debounce mode. From then on, release events are delayed slightly to check for
subsequent button events. If one occurs, the releas and press are filtered. If
none occurs, the release event is passed to the caller.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-26 00:21:46 +10:00
Peter Hutterer
87b5682824 filter: add a custom trackpoint accelerator
Switch to a pure factor with a max scaled after a function. The offset is just
0 now (will be removed eventually). Both are determined with a function based
on a linear/exponential regression of a sample set of data pairs.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-20 11:53:01 +10:00
Ming-Yang Lu
5dc330bdea touchpad: add upper edge into exclusion zone
This reduces unexpected cursor moves when placing the thumb near the border
of trackpoint buttons and upper edge of touchpad.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-10 09:33:24 +10:00
Peter Hutterer
930714a094 doc: update the soname, remove the warning
The soname will remain fixed now, we're going through all the trouble of
having a proper map file so that we don't have to bump it all the time.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-05 11:13:31 +10:00
Peter Hutterer
9b738d0071 doc: fix a few typos
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-05 11:13:31 +10:00
Peter Hutterer
696778cc78 doc: move the autotools instructions into their own section
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-05 11:13:31 +10:00
Peter Hutterer
7b98f8ef47 doc: expand on the meson build instructions
https://bugs.freedesktop.org/show_bug.cgi?id=101686

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-05 09:53:13 +10:00