Bug 477748

Summary: Feature to set raw sample rate and raw suppress rate for graphic tablets
Product: [Applications] systemsettings Reporter: Raghavendra kamath <raghu>
Component: kcm_tabletAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: wishlist CC: aleixpol, info, josh, natalie_clarius, nate, nicolas.fella
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
URL: https://gitlab.freedesktop.org/libinput/libinput/-/issues/225
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Raghavendra kamath 2023-11-30 05:38:16 UTC
SUMMARY
On wayland tablet kcm there is no option to set sample rate and supress rate. Supress and sample rate determine if the data coming from the tablet need to be smoothed out or not. Some artist prefer to change these settings so the data from the tablet can be controlled either to smooth things out or to have unfiltered raw response.

Currently in addition lack to editing pressure curve there is no way to set these two options.


STEPS TO REPRODUCE
1. Open graphic tablet settings in the systemsetting in wayland. 
2. Try to set raw sample rate and supress rate
3. Compare this to tablet kcm in xorg 

Note: this is not a wishlist item this can be considered a regression as tablet kcm in previous plasma 5 releases had these feature but now it is not there.
Comment 1 Nate Graham 2023-11-30 19:33:01 UTC
It is a wishlist item since it's a new requested feature in the Drawing Tablet KCM. The Wacomtablet KCM may already have the feature, but it needs to be written for the Drawing Tablet KCM too.
Comment 2 Raghavendra kamath 2023-11-30 19:43:36 UTC Comment hidden (spam)
Comment 3 Nate Graham 2023-11-30 19:46:27 UTC Comment hidden (spam)
Comment 4 Nicolas Fella 2023-12-03 18:15:24 UTC
Unlike on X11 there is no suppression of events by default on Wayland, the application always receives all incoming events.

What's the use case for artificially suppressing events?
Comment 5 David REVOY 2023-12-04 17:08:45 UTC
Hi, 

As for the use case, consider a device like a Ms Surface Pro 3, or an old Tablet PC. Sometimes these types of devices have a fairly high resolution digitiser, but a slow way of processing all the events of the tablet (could be the input connection in the device, or a slow CPU, not sure). In any case, the result is a visible lag, which can be seen in the distance between the moving cursor and the actual pen tip.  This sometimes happens when all the events are sent to the screen for rendering, and it feels like a "hardware event bottleneck". Some paint programs can also be slow to render brush strokes.

 In this case, event suppression (trimming or filtering/removing duplicates) may be useful to improve performance.

Personally, I always keep them to a minimum with xsetwacom because I have good hardware on my main workstation and I prefer to get the most coordinate/event out of my digitizers:  
xsetwacom --set "$tabletstylus" Suppress 0 # data pt.s filtered, default is 2, 0-100 (old 4)
xsetwacom --set "$tabletstylus" RawSample 1 # data pt.s trimmed, default is 4, 1-20 (old 1)

I only increased these values a little on my old laptop or my Surface Pro 3. The gain is not dramatic as far as I can tell; and if you set a higher value than the default of X11 (4 Rawsample and 2 Suppress), I remember that you quickly damage the quality of the brush stroke (visible segment between coordinates when drawing fast large spirals on the canvas).
Comment 6 David REVOY 2023-12-04 17:20:46 UTC
Here is a personal opinion about terms like "Suppress" and "RawSample": I found them hard to understand. Just an idea, but in case of a GUI I would prefer something simpler like a single slider with 5 positions (or 3?) from Quality (=no even suppression) to Performance (=many). 
Eg: 

Performance            Quality
|------|------|------|------[]
Comment 7 Raghavendra kamath 2023-12-04 17:41:09 UTC
Suppress and sample can be used to reduce too much sensitivity for some people this helps in reducing small the wiggle in line. It averages the data to give a smoother points.
Comment 8 Joshua Goins 2024-07-29 17:44:39 UTC
This is decided upstream (see https://gitlab.freedesktop.org/libinput/libinput/-/issues/225) and there's nothing we can do until the libinput maintainers accept having an option to disable smoothing explicitly.

To break down the situation: libinput performs *some* smoothing depending on the pen type. For AES pens they disable smoothing automatically for example (https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/512) and they are adding devices explicitly to the no-smoothing list as users report them. In the future if Peter decides maybe that's too much, and adds an API for it we can re-open this. But currently there's nothing we can do.