Bug 342641

Summary: [genius tablet] Jagged line endings with pressure-size dynamics / pressure levels problem
Product: [Applications] krita Reporter: Storm Engineer <storm.anthro>
Component: Tablets (tablet issues are only very rarely bugs in Krita!)Assignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: dimula73, halla
Priority: NOR    
Version: 2.9 Beta   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Demonstration of jagged line endings

Description Storm Engineer 2015-01-08 22:28:18 UTC
Whiteout sensor stabilizing/line ending smoothing my line endings will look jagged - instead of constant change in size, it goes in large steps.

This may be related to the fact that Krita seems to add my tablet three times. This happens in 2.8 as well since months at minimum.

Reproducible: Always

Steps to Reproduce:
1. Turn off smoothing/stabilizer for line endings/sensor
2. Enable pressure -> size dynamics
3. Draw a quick line, lifting up the stylus sharply at the end

Actual Results:  
Jagged line with size changing in big steps

Expected Results:  
Size changing relatively smoothly

Tablet: Genius MousePen i608x (The newer version with 2048 pressure levels)


Console output running Krita:

[storm@Camelot] (~) $ krita
isRunning -1 
################################### 
# Adding a tablet device: Genius MousePen i608X 
Device Type: "Stylus" 
# Building tablet axes remapping table: 
Abs X 0 -> 0 
Abs Y 1 -> 1 
# Axes limits data 
X:        0 20480 
Y:        0 15360 
Z:        0 0 
Pressure: 0 16 
Rotation: 34295672 0 
T. Pres:  0 0 
################################### 
# Adding a tablet device: Genius MousePen i608X 
Device Type: "Stylus" 
# Building tablet axes remapping table: 
Abs X 0 -> 0 
Abs Y 1 -> 1 
Abs Pressure 2 -> 2 
# Axes limits data 
X:        0 32767 
Y:        0 30720 
Z:        0 0 
Pressure: 0 2047 
Rotation: 72 259 
T. Pres:  0 0 
################################### 
# Adding a tablet device: Genius MousePen i608X 
Device Type: "Stylus" 
# Building tablet axes remapping table: 
Abs X 0 -> 0 
Abs Y 1 -> 1 
Abs Pressure 2 -> 2 
# Axes limits data 
X:        0 32767 
Y:        0 30720 
Z:        0 0 
Pressure: 0 2047 
Rotation: 0 0 
T. Pres:  0 0 


Output of xinput:

[storm@Camelot] (~) $ xinput
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Genius MousePen i608X                     id=8    [slave  pointer  (2)]
⎜   ↳ Genius MousePen i608X                     id=9    [slave  pointer  (2)]
⎜   ↳ Genius MousePen i608X                     id=10   [slave  pointer  (2)]
⎜   ↳ Genius MousePen i608X                     id=11   [slave  pointer  (2)]
⎜   ↳ Genius MousePen i608X                     id=12   [slave  pointer  (2)]
⎜   ↳ HID 04f3:0103                             id=14   [slave  pointer  (2)]
⎜   ↳ Mouse USB Laser Mouse                     id=15   [slave  pointer  (2)]
Comment 1 Storm Engineer 2015-01-08 22:29:31 UTC
Created attachment 90295 [details]
Demonstration of jagged line endings
Comment 2 Dmitry Kazakov 2015-01-09 10:56:48 UTC
Hi, Storm!

Here i get quite ok lines: http://pbrd.co/1xLR7vD

Could you please do two things:

1) Make a screenshot of the options you use (and a paintop preset name)
2) Generate a tablet event log for a single line like that
    https://answers.launchpad.net/krita-ru/+faq/2495

Then I could probably understand what is happening there.
Comment 3 Dmitry Kazakov 2015-01-19 11:30:55 UTC
Git commit eec114f5071d455d076e04ed0e39a536af8e8f5c by Dmitry Kazakov.
Committed on 19/01/2015 at 10:06.
Pushed by dkazakov into branch 'calligra/2.9'.

Add a workaround for broken Genius Tablet with partial pressure updates

If you have lines like in bug 342641, please add the following line into
your kritarc:

workaroundX11SmoothPressureSteps=3

After that restart Krita and you'll see a message like:

"WARNING: Workaround for broken tablet pressure reports
 is activated. Number of smeeth steps: 3"

The problem should go after that.

A  +66   -0    krita/ui/input/wintab/kis_incremental_average.h     [License: GPL (v2+)]
M  +22   -1    krita/ui/input/wintab/kis_tablet_support.h
M  +5    -0    krita/ui/kis_config.cc
M  +2    -0    krita/ui/kis_config.h
M  +14   -0    krita/ui/tests/kis_input_manager_test.cpp
M  +2    -0    krita/ui/tests/kis_input_manager_test.h

http://commits.kde.org/calligra/eec114f5071d455d076e04ed0e39a536af8e8f5c
Comment 4 Storm Engineer 2015-01-19 18:17:48 UTC
This helps, but still didn't get rid of it completely, even after upping steps from 3 to 5.

Actually I think this issue results from the fact that this tablet doesn't work properly under Linux/KDE in general, so perhaps it needs to be fixed on a system level first, and that may in fact fix the issues with Krita as well.
Comment 5 Halla Rempt 2015-02-02 19:05:57 UTC
Okay, then I think we can close this bug now.