Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
The kernel fuzz handling is buggy, especially when we want to rely on the fuzz
value for our hysteresis. But since this is a hw property and (at least
sometimes) set by the driver, we can't make this a pure libinput hwdb set
either.
So our workaround is:
* extract the (non-zero) fuzz into a udev property so we don't lose it
* set the fuzz to 0 to disable the in-kernel hysteresis
* overwrite our internal absinfo with the property fuzz
This way we get to use the hw-specified fuzz without having the kernel muck
around with it. We also get to use the EVDEV_ABS_ values in 60-evdev.hwdb to
override a driver-set fuzz.
Two drawbacks:
- we're resetting the kernel fuzz to 0, this affects any other users of the
device node. That's probably a minor impact only.
- we can only save this in a udev property there's a risk of this information
getting lost when playing around with udev rules. That too should be a minor
issue.
https://bugs.freedesktop.org/show_bug.cgi?id=105303
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
If the fuzz is 0, assume we don't need hysteresis and use the wobble detection
code instead. If the fuzz is non-zero, enable it by default.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
We currently used 0.5mm on touchpads as hysteresis value. This causes pointer
movement delays, it is likely too high. Reduce it to a kernel-set fuzz value
(if any) and see how we go with that. On many touchpads, the fuzz is 8 which
would be closer to 0.2mm on e.g. a T440.
Note that the does some defuzzing anyway, but the response of that function is
nonlinear, e.g. for a fuzz of 8, the physical deltas map to:
phys 0..3 → delta 0
phys 4..7 → delta 1
phys 8..15 → delta 4, 5, 6, 7
phys 16..N → delta 16..N
In other words, we never see some logical deltas 2 and 3. While this shouldn't
matter given the average touchpad resolution, reducing the hysteresis margin
is likely to provide some better response. We never see values 8-15 either
which could be the cause of some pointer jumps we've been seeing.
see https://bugs.freedesktop.org/show_bug.cgi?id=105303
Devices with a fuzz of 0 have the hysteresis margin reduced to 0.25mm (from
0.5mm).
https://bugs.freedesktop.org/show_bug.cgi?id=105108
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
The hysteresis-returned point always differs from the current point, even if
the hysteresis kicks in. We need to compare to the hysteresis center.
And the returned point is only the new center if we exceed the margin,
otherwise the center stays as-is.
The touch_fuzz() test only succeeded for this because for the values we were
introducing jitter by, the kernel filtered out all the actual movement so
these paths weren't hit.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
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>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=104986
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
No need to hardcode Apple here, if we have a udev property for this, let's use
it.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Some of wacom's tablets, notably the Bamboo series, have a non-predictable
scheme of mapping the buttons to numeric button numbers in libwacom. Since we
promise sequential button numbers, we need to have those identical to
libwacom, otherwise it's impossible to map the two together.
Most tablets have a predictable mapping, so this does not affect the majority
of devices.
For the old-style bamboos, this swaps the buttons around with the buttons
being ordered vertically top-to-bottom in libwacom.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Jason Gerecke <jason.gerecke@wacom.com>
|
|
This changes the hysteresis region to an ellipse (usually a circle), where
previously it was a rectangle (usually square).
Using an ellipse means the algorithm is no longer more sensitive in some
directions than others. It is now omnidirectional, which solves a few
problems:
* Moving a finger in small circles now creates circles, not squares.
* Moving a finger in a curve no longer snaps the cursor to vertical
or horizontal lines. The cursor now follows a similar curve to the
finger.
https://bugs.freedesktop.org/page.cgi?id=splinter.html&bug=105306
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
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>
|
|
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>
|
|
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>
|
|
This state is used by the pre-processing of the touch states to indicate that
the touch point has ended and is changed to TOUCH_END as soon as that
pre-processing is finished.
Sometimes we have to resurrect a touch point that has physically or logically
ended but needs to be kept around to keep the BTN_TOOL_* fake finger count
happy. Particularly on Synaptics touchpads, where a BTN_TOOL_TRIPLETAP can
cause a touch point to end (i.e. 1 touch down + TRIPLETAP) but that touch
restarts in the next sequence. We had a quirk for this in place already, but
if we end the touch and then re-instate it with tp_begin_touch(), we may lose
some information about thumb/palm/etc. states that touch already had. As a
result, the state machines can get confused and a touch that was previously
ignored as thumb suddenly isn't one anymore and triggers assertions.
The specific sequence in bug 10528 is:
* touch T1 down
* touch T2 down, detected as speed-based thumb, tap state machine ignores
it
* frame F: TRIPLETAP down, touch T2 up
* frame F+1: touch T2 down in next frame, but without the thumb bit
* frame F+n: touch T2 ends, tap state machine gets confused because
that touch should not trigger a release
https://bugs.freedesktop.org/show_bug.cgi?id=105258
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
If we have more BTN_TOOL_*TAP fingers down than we have slots, ignore any
below-threshold pressure changes on the slots. When a touchpad only detects
two touches, guessing whether the third touch has sufficient pressure is
unreliable. Instead, always assume that all touches have sufficient pressure
when we exceed the slot number.
Exception: if all real fingers are below the pressure threshold, the fake
fingers are ignored too.
Related to https://bugs.freedesktop.org/show_bug.cgi?id=105258
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
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>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Accidentally committed in 2a378beab032d74277
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
When drawing on a tablet, the hand usually rests on the device, causing touch
events. The kernel arbitrates for us in most cases, so we get a touch up
and no events while the stylus is in proximity. When lifting the hand off in a
natural position, the hand still touches the device when the pen goes out of
proximity. This is 'immediately' followed by the hand lifting off the device.
When kernel pen/touch arbitration is active, the pen proximity out causes a
touch begin for the hand still on the pad. This is followed by a touch up when
the hand lifts which happens to look exactly like a tap-to-click.
Fix this by delaying the 'arbitration is now off' toggle, causing any touch
that starts immediately after proximity out to be detected as palm and
ignored for its lifetime.
https://bugs.freedesktop.org/show_bug.cgi?id=104985
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Currently unused, will be used in later patches
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Previously, on touch toggle (invoked by the tablet when a pen goes in
proximity) the touchpad cleared the state and ignored any events. Since we
ignore touches that we didn't see the touch begin for, this handled the cases
of a touch remaining after proximity out.
This code pre-dates palm detection, so let's take the bluetack off and instead
integrate it with proper palm detectino.
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
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
|
|
Makes debugging a bit easier when you know *which* touch was marked as palm,
etc.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Having this initialized and then changed later is more confusing that having
the trinary here in one line
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Found by coverity
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
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>
|
|
This tablet advertises tilt but doesn't actually have it. Let's rule out tilt
for all aiptek devices until someone complains.
Recording from: https://bugzilla.redhat.com/show_bug.cgi?id=1535755
Related to: https://bugs.freedesktop.org/show_bug.cgi?id=104911
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Some (?) Aiptek tablets have BTN_TOOL_PEN but aren't inclined to actually send
this on proximity in. This means we don't have a tool assigned and ignore the
events.
This patch piggy-backs on the already-existing proximity-out quirks. On the
first EV_SYN and if the tool is still NONE (i.e. no BTN_TOOL_* was received), we
pretend that we've earlier forced a proximity-out event for this tablet. This
causes the proximity-out quirk code to emulate a proximity in and we're off.
Hooray.
https://bugs.freedesktop.org/show_bug.cgi?id=104911
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Mouse and lens cursor tools are rare and the rotation calculation is quirky to
say the least. I don't have access to a non-Wacom mouse tool, so
until this changes, just disable those tools and wait for someone to shout.
This is a much easier fix than trying to figure out the correct generic
rotation calculation that may not be correct anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
If a tablet never sends a BTN_TOOL_foo, we never update the tool and we remain
on the 'none' tool.
Somewhat related to:
https://bugzilla.redhat.com/show_bug.cgi?id=1535755
https://bugs.freedesktop.org/show_bug.cgi?id=104911
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
When the device gets deleted in a non-neutral state, we need to release all
buttons, lift the tip up and send a proximity out event.
https://bugs.freedesktop.org/show_bug.cgi?id=104940
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Let's make sure all libevdev manipluations are done before we start
initializing anything based on the event codes.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
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>
|
|
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>
|
|
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>
|
|
We filter BTN_TOUCH in the caller, so this cannot happen here.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
We fall through to the default statement anyway
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
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>
|
|
So we don't have to have newline handling in the callers. This effectively
reverts 6ab2999be90331 "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>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Previously, touchpad deltas were converted to 1000-dpi normalized coordinates
and handled from there. This changed in bdd4264d6150f4a6248eec7e1fbf (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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|