Bug 103086 - Detect pressure offset on proximity out as well
Summary: Detect pressure offset on proximity out as well
Status: RESOLVED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: libinput (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
: 103978 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-10-04 00:30 UTC by Peter Hutterer
Modified: 2017-12-14 05:43 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
evemu recording from a pressure offset on proximity out (20.33 KB, text/plain)
2017-10-04 00:30 UTC, Peter Hutterer
Details

Description Peter Hutterer 2017-10-04 00:30:52 UTC
Created attachment 134653 [details]
evemu recording from a pressure offset on proximity out

If the user taps too quickly on proximity in, the first event may have the real pressure already, negating the pressure offset detection. On release, we drop down to an almost-nil pressure offset and never release the tip (until out of proximity).

It may be possible to detect this automatically by looking at the last pressure value before the proximity out event and fixing things for the second proximity in. Probably needs a lower threshold than the up to 20% we use on the way in, and some sort of heuristic to average across several events before the proximity out.
Comment 1 Peter Hutterer 2017-11-30 04:46:17 UTC
*** Bug 103978 has been marked as a duplicate of this bug. ***
Comment 2 Jehan 2017-12-01 19:14:18 UTC
Hi!

Just wanted to add a small detail: on bug 103978, you gave me this link: https://wayland.freedesktop.org/libinput/doc/latest/tablet-support.html#tablet-pressure-offset

The link says it happens with worn-out tools. For info, this is a brand new pen (Wacom Pro Pen 2 bought just 2 weeks ago and the issue appeared from the start).

It probably won't change the fix, but I just wanted to note that this does not only happen with old pens.
Moreover there are no issues with the same pen/tablet on X, only with Wayland.
Comment 3 Peter Hutterer 2017-12-04 04:25:32 UTC
It happens most frequently with worn-out tools but that doesn't rule out that it can happen with new pens. The pressure offset in your pen is really small and the pressure drops 837, 714, 352, and then hovers below 10.

This is in the kernel data though, I'm suprised X behaves differently - unless you're using the wacom driver. CC-ing Jason - do we have something there that takes this offset into account?
Comment 4 Jehan 2017-12-04 15:42:17 UTC
(In reply to Peter Hutterer from comment #3)
> It happens most frequently with worn-out tools but that doesn't rule out
> that it can happen with new pens. The pressure offset in your pen is really
> small and the pressure drops 837, 714, 352, and then hovers below 10.
> 
> This is in the kernel data though, I'm suprised X behaves differently -
> unless you're using the wacom driver. CC-ing Jason - do we have something
> there that takes this offset into account?

I'm using whatever comes by default in Fedora 27 when setting GNOME on X.
In any case that works well in X, no similar problem related to pen pressure. Tested and approved (and hopefully it'll stay that way!).
Comment 5 Jason Gerecke 2017-12-04 18:14:24 UTC
(In reply to Peter Hutterer from comment #3)
> It happens most frequently with worn-out tools but that doesn't rule out
> that it can happen with new pens. The pressure offset in your pen is really
> small and the pressure drops 837, 714, 352, and then hovers below 10.
> 
> This is in the kernel data though, I'm suprised X behaves differently -
> unless you're using the wacom driver. CC-ing Jason - do we have something
> there that takes this offset into account?

I ran into an issue like this with one of our new "Pro Pen 3D" pens: I'd occasionally get non-zero pressure values out of the tablet when hovering. This caused some confusion when looking through the evemu-record logs, but didn't seem to impact X.

The xf86-input-wacom driver has a click pressure threshold that defaults to 1.32%* of full-scale pressure. The values in the attached log fall under this threshold, which is likely why there's no observed issue in X.


* 27/2047 for the pedantic
Comment 7 Peter Hutterer 2017-12-14 05:43:28 UTC
commit 61bdc05fb0f84303f97daaba6ae6b49c976dbfbf
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Dec 8 12:35:11 2017 +1000

    tablet: set the tip-up pressure threshold to 1%


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.