After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 793828 - GIMP 2.9 does not correctly interpret "Threshold" wacom parameter in Linux
GIMP 2.9 does not correctly interpret "Threshold" wacom parameter in Linux
Status: RESOLVED OBSOLETE
Product: GIMP
Classification: Other
Component: General
2.9.8
Other Linux
: Normal normal
: ---
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2018-02-26 02:02 UTC by YAFU
Modified: 2018-05-24 19:13 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description YAFU 2018-02-26 02:02:00 UTC
OS: Kubuntu Linux (KDE) 18.04
Kernel: 4.15.0-10-generic
GIMP 2.9.9 from PPA repo
Wacom Draw Graphic tablet: Bus 002 Device 003: ID 056a:033b Wacom Co., Ltd 
Pen stylus set as "Screen" in GIMP.

Hello.
"Threshold" parameter determines how sensitive the tip of the pen should be in GUI software (buttons, sliders, tabs, etc.), but not within the canvas when draw. This is to avoid making changes to the GUI accidentally by just touching the tip with the interface. On canvas when one is drawing "Threshold" parameter should not interfere, but drawing on canvas with GIMP depends on "Threshold" value which is incorrect.
As an example I will use a very large value to prove it:

$ xsetwacom --set "Wacom Intuos S 2 Pen stylus" Threshold 1500

With that value in MyPaint the tip of the pencil is still very sensitive inside the canvas when drawing, but not very sensitive in GUI program, like in buttons or sliders. This is how it should work.

But in GIMP with that value, when you draw on the canvas it is not sensitive, you must press the tip a lot to draw. Then "Threshold" parameter is having influence within the canvas, which is incorrect.
Comment 1 Michael Schumacher 2018-02-26 08:28:23 UTC
Is this documented somewhere? The name of this parameter strikes me as pretty generic for such a selective behavior.
Comment 2 YAFU 2018-02-26 10:23:56 UTC
Hello Michael.
I'm not sure if this is well documented, but I think MyPaint has the right behavior on how this should work.
I recently acquired Wacom Draw graphics tablet, my first Wacom tablet. With the first uses I quickly noticed my first inconvenience, I made many accidental mistakes when trying to configure the options in GUI of all the softwares when barely making almost imperceptible contact with the tip. The very sensitive tip is good for drawing on canvas, but very sensitive tip can be a headache when you configure user interface. So I quickly started looking for how to change the pressure sensitivity of Wacom tablet in Linux. There is a "PressureCurve" parameter, but this generally only has effect on canvas, not on the user interface. So thanks to God I found the existence of "Threshold" parameter, this allows me to adjust the sensitivity of the tip in user interface, while I can adjust the behavior of the sensitivity on canvas by setting correctly "PressureCurve" parameter. Even some programs (MyPaint, Krita) have their own dialogue to adjust pressure curve on canvas:
https://www.davidrevoy.com/article182/calibrating-wacom-stylus-pressure-on-krita

What softwares do not have is how to adjust the pressure sensitivity in user interface, and that could be solved if GIMP copies to MyPaint the behavior of Threshold "parameter.
For canvas you can configure everything with "PressureCurve".

I feel comfortable with "Threshold" parameter in 400 for GUI, so that's not good for canvas in GIMP.

So please, you consider this. Thank you.
Comment 3 Jehan 2018-02-26 14:08:46 UTC
Hello,

This is weird to say that threshold has to be only useful for specific GUI use-case. At first, it makes no sense. And I can't find any reference on the web which says so. But I can understand the issue, and it's true that since the pressure curve can already handle a pressure threshold, that makes double usage.
So actually maybe it makes sense. :-)

I'll try to get some input from Wacom experts.
Comment 4 Michael Schumacher 2018-02-26 14:29:57 UTC
The xsetwacom man page (https://linux.die.net/man/1/xsetwacom) states this:

"Threshold level
    Set the minimum pressure necessary to generate a Button event for the stylus tip, eraser, or touch. The pressure levels of all tablets are normalized to 2048 levels irregardless of the actual hardware supported levels. This parameter is independent of the PressureCurve parameter. Default: 27, range of 0 to 2047."


I have no idea if painting in GIMP is accompanied by a button event for styluses (i.e. I have no idea how this whole tablet device handling works at all :)
Comment 5 Jehan 2018-02-26 15:20:02 UTC
Answer from Jason Gerecke, Wacom developer:

> There is no single "right" answer. Some situations (e.g. shading)
> benefit from not having threshold applied so that the faintest
> strokes are registered. In other situations (e.g. inking/line work)
> the threshold can be useful over the canvas.

> Not sure what "most" applications do by default, or if they offer
> global/brush-specific settings to let the user choose whether to
> use/ignore the threshold. Would be interesting to compare with
> Photoshop for obvious reasons.
Comment 6 Jehan 2018-02-26 15:35:50 UTC
Other than the software already tested in this report, anyone has tested other software? Even proprietary software like Photoshop, as proposed by Jason?

If anyone could test and tell us how any other software handle the threshold, this would be helpful.

Also, as Jason notes, in some cases, having the threshold in canvas may still be useful. Maybe this could be a tool option for paint tools allowing to follow or not the threshold value of the device, allowing even more flexibility and easy switch?
Comment 7 Michael Schumacher 2018-02-26 15:43:21 UTC
As mentioned before, the behavior on the canvas can be configured with pressure curves (including those in GIMP's own dynamics).
Comment 8 YAFU 2018-02-27 02:29:14 UTC
As I had said before, this is my first Wacom tablet, and I am surprised that not many people find it very annoying to have default low threshold value as 27 for GUI configurations. This has brought me many headaches in all the programs (GIMP, Krita, Blender). I have made accidental mistakes all the time. Just curious, Maybe my Wacom Draw is more sensitive than other models?

>As mentioned before, the behavior on the canvas can be configured with pressure >curves (including those in GIMP's own dynamics).

That's true, for example if I wanted in MyPaint that pencil to be less sensitive in Canvas, I could configure this curve:
https://imgur.com/a/M97BN

and it works well. Anyway I have not had the need to do it, I feel that sensitivity is correct on canvas with default curve anyway.

On the contrary for GIMP, when I have configured Threshold value 400 that for me is comfortable for GUI configuration, I have not been able to configure from PressureCurve parameter a suitable curve to make more sensitive the pencil on canvas. It always start to draw on canvas when pressure reaches configured threshold value. It seems that threshold value is always mandatory, does not matter the sensitivity curve that is chosen. If so, while threshold interferes with canvas as it does in GIMP, there is no way to configure a higher pressure sensitivity with the curves than the chosen threshold value. Canvas must not take into account threshold value. But I do not know if that is possible and I do not know how MyPaint does it. Krita is having the same behavior as GIMP. I have chatted on Krita IRC channel with Dmitry Kazakov (nick: dmitryK|log) and I have discussed the problem and also talked about this report of GIMP. He did not have much time available, and he made some comments based on some quick research he made:
dmitryK|log: "I've just checked, threshold value is the value starting from which the drives sends us the TabletPress event"..."we start a line as soon as the driver sends us this event"... "and I'm not sure we can even access this internal Threshold value using X11 API"

YAFU: "do you have any idea about how MyPaint is able to avoid Threshold parameter on canvas?"
dmitryK|log: "I guess it just ignores all the TabletPress and Tablet Release events and starts painting as soon sees some non-zero pressure"
dmitryK|log: "the only thing we can do is to ignore these events and use raw pressure value to trigger painting. But I'm a bit suspicios about how it would work together with other driver features, like click+press mode (if it actually exists on Linux)"

I do not know if it's going to be possible, but in my opinion it would be ideal to be able to independently configure the level of pressure for GUI and the sensitivity on canvas. I hope that you can find the way.
Comment 9 Martin Renold 2018-03-06 20:43:07 UTC
MyPaint's brush engine is "always on", always in mid-stroke. With every motion event it will calculate the shape and spacing of zero-opacity dabs. If a pressure axis is present it will mostly ignore button up/down events.

Instead, the undo engine is able to quickly and seamlessly split an undo step in mid-stroke. It will enforce a new undo step every couple of seconds and discard steps that didn't affect the canvas.
Comment 10 GNOME Infrastructure Team 2018-05-24 19:13:40 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/1317.