Wacom Pressure broken with Qt applications

Bug #762938 reported by Animtim
92
This bug affects 12 people
Affects Status Importance Assigned to Milestone
Release Notes for Ubuntu
Invalid
Undecided
Unassigned
koffice
Invalid
Undecided
Unassigned
koffice2 (Ubuntu)
Invalid
Undecided
Unassigned
Natty
Invalid
Undecided
Unassigned
Oneiric
Invalid
Undecided
Unassigned
pencil (Ubuntu)
Invalid
Undecided
Unassigned
Natty
Invalid
Undecided
Unassigned
Oneiric
Invalid
Undecided
Unassigned
qt4-x11 (Ubuntu)
Fix Released
High
Chase Douglas
Natty
Fix Released
High
Chase Douglas
Oneiric
Fix Released
High
Chase Douglas

Bug Description

SRU Justification:

Impact: Wacom tablet users rely on pressure information for drawing in applications like Krita and Pencil. When the multitouch Qt patches were added to Natty, they disabled the pressure support. This is a fairly major regression of functionality.

How Addressed: The multitouch patch disabled XInput 1.x support in favor of XInput 2.1 support. According to the original patch developer, Denis Dzuybenko, this was likely an oversight due to how the patch was developed. After re-enabling XInput 1.x support, pressure data from Wacom tablets began working, and touch input functioned normally.

Patch: http://bazaar.launchpad.net/~kubuntu-packagers/qt/ubuntu/revision/173

Test Case: Install krita or pencil and try to draw with a wacom tablet. See it not work. Install the updated package. Try again. See it work. Note: This test case requires specialized hardware to execute.

Regression Potential: Minimal. This patch merely re-enables lost functionality. The only concern is whether this will disrupt the XInput 2.1 multitouch functionality, but in theory it should not and testing shows this to be the case.

-----

I've noticed Wacom pressure is broken with QT applications only: it works with gimp and Mypaint,
but not in Krita or Pencil (I'm using Krita git-master development version, so I couldn't make a report on Krita package but it is concerned too.. I installed Pencil just to confirm it happens also with a package from the repository, and it's almost the only other pressure-sensitive drawing QT application I know ).
Some idea: I reported this bug to Krita developers, one of them thinks it may be caused by some "Ubuntu specific" modifications for tablet-pc, as it doesn't happen on a Debian with the same version of KDE+QT+linuxwacom…

TEST CASE: Install krita or pencil and try to draw with a wacom tablet. See it not work. Install the updated package. Try again. See it work. Note: This test case requires specialized hardware to execute.

Related branches

Revision history for this message
Animtim (animtim) wrote :
Revision history for this message
Cyrille Berger (moi-cberger) wrote :

To be specific, the patch would be kubuntu_28_xi2.1.patch (patch which comes from a branch that is not judge of sufficient quality for Qt4.8...) and a first try could be to update to a more recent version of it: http://qt.gitorious.org/+qt-developers/qt/multipoint-touch/trees/4.7-with-xinput2.1/

Revision history for this message
Daniel (k-launchpad-sdiz-net) wrote :

I have subscribed the dev who had committed the guilty patch.

tags: added: regression-release
Changed in koffice:
status: New → Invalid
Changed in qt4-x11 (Ubuntu Natty):
importance: Undecided → High
Changed in qt4-x11 (Ubuntu):
importance: Undecided → High
milestone: none → oneiric-alpha-1
Changed in qt4-x11 (Ubuntu Natty):
milestone: none → natty-updates
Revision history for this message
Scott Kitterman (kitterman) wrote :

I've uploaded a test package that drops the patch in question to my PPA:

https://launchpad.net/~kitterman/+archive/ppa/?field.series_filter=natty

qt4-x11 is a long build, so don't expect it to be available immediately, but once it's built, I would appreciate it if someone who is having this problem would check and see if removing the patch solves the problem.

Revision history for this message
Animtim (animtim) wrote :

I confirm adding your PPA solve the bug! :)

Changed in koffice2 (Ubuntu):
status: New → Invalid
Changed in koffice2 (Ubuntu Natty):
status: New → Invalid
Changed in pencil (Ubuntu):
status: New → Invalid
Changed in pencil (Ubuntu Natty):
status: New → Invalid
description: updated
Revision history for this message
Scott Kitterman (kitterman) wrote :

I've been running the PPA packages on my laptop as well and it looks like there is no ill effect from dropping the patch on a normal laptop either.

Revision history for this message
Scott Kitterman (kitterman) wrote :

I've uploaded this for review by ubuntu-sru. They will have to decide if it goes in or not. Ultimately I think that fixing the regression trumps delivering the new feature promised by the patch. Perhaps the uTouch developers will come up with an alternative solution that fixes the regression without dropping the feature, but if they don't then I believe this should go in.

There is another pending qt4-x11 SRU, so it's appropriate that that one be verified and moved to natty-updates before this one is accepted, so there is a bit of time for them to look into it.

Changed in qt4-x11 (Ubuntu):
status: New → Fix Committed
Changed in qt4-x11 (Ubuntu Natty):
status: New → Fix Committed
Revision history for this message
Alberto3d (alberto3d-1984) wrote :

The patch update don't fix the bug in my kubuntu 11.04 with Bamboo

Revision history for this message
Scott Kitterman (kitterman) wrote :

Alberto3d: Then please file a separate bug for that issue.

Revision history for this message
Chase Douglas (chasedouglas) wrote :

To best resolve this issue, we need a recording of the input events from the device. Then anyone can play back the events to debug the issue. Can someone who has this bug perform the steps listed at https://wiki.ubuntu.com/Multitouch/Testing/uTouchEvEmu#Debugging.

When recording, skip steps 3, 4, and 9. Switching to a VT should not be necessary for wacom tablets, and we need someone to test how it works when interacting with an application.

Thanks!

Revision history for this message
Sven Langkamp (sven-langkamp) wrote :

device.record is empyt after recording.

Revision history for this message
Alexei (alexei0) wrote :

I have this problem too since upgrading to 11.04 which is a royal pain in the * when developing a tablet application in QT. The tablet is working fine as can be confirmed by using gtk apps so I don't think recording input events will be useful at all. This might be caused by an old issue - it used to be that QT had the names 'stylus', 'pen', and 'eraser' hardcoded into it. If the devices are called something else then QT just processes pen and eraser as mouse events hence no pressure information.

Ubuntu 9.04 renamed the wacom devices and broke the tablet events on QT but this could be fixed by rewriting the names using HAL. 10.10 worked fine but I have a mongrel of an installation.

If this is the cause then https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/721471 is a duplicate bug.

Revision history for this message
Scott Kitterman (kitterman) wrote : Re: [Bug 762938] Re: Wacom Pressure broken with QT applications

@Alexi: No. This is a poorly designed patch at fault. Please try the package
from my PPA while we work on getting this sorted out.

Revision history for this message
Alexei (alexei0) wrote :

@Scott: your PPA works and I have pressure sensitivity again in QT :).

Ubuntu 11.04, 64bit. HP TM2 tabletPC.

Revision history for this message
Chase Douglas (chasedouglas) wrote :

Hi Alexei,

We need a recording so developers who don't have wacom tablets can reproduce the problem. I have read through the patch in question multiple times (I originally pushed it into Ubuntu too), and I have no clue yet how it is causing issues. There are many variables at play here, and getting a recording of the input device is essential to helping us develop and fix and verify that it is working properly.

I see that Sven has had trouble recording the input device. This may occur if the X synaptics or wacom input modules are used. Please confirm with input module you are using by attaching /var/log/Xorg.0.log.

Thanks!

Revision history for this message
Sven Langkamp (sven-langkamp) wrote :
Revision history for this message
Chase Douglas (chasedouglas) wrote :

Sven,

Your tablet is using the X wacom input module, which upon further inspection appears to grab the evdev device node. This is why the device.record file was empty when you tried to record the events.

I will attach two new wacom input module packages (one amd64, one i386) that do not grab the evdev device node. This should not cause any issues, and it will allow you to record the events. Please install the appropriate package and repeat the steps outline in comment #11.

Thanks!

Revision history for this message
Chase Douglas (chasedouglas) wrote :
Revision history for this message
Chase Douglas (chasedouglas) wrote :
summary: - Wacom Pressure broken with QT applications
+ Wacom Pressure broken with Qt applications
Revision history for this message
Shaved Wookie (shavedwookie) wrote :

Looks like we have a snag.

Both Animtim and I get the same problem. With the PPA, wacom returns strange results. You can see this in Krita, in the way that every stroke drawn doesn't start where the stylus actually is, but from some point to the top left corner (presumably 0,0) to the point where the stylus first makes contact. It's very odd, and yet it can be fixed instantly by purging the PPA. Strokes drawn with another device, like the mouse are not affected.

Revision history for this message
Shaved Wookie (shavedwookie) wrote :

I'm currently running Ubuntu natty using trunk Krita, although Animtim says it's the same with the packaged version 2.3.3.

Revision history for this message
klerfayt (klerfayt-deactivatedaccount) wrote :

switching to VT records something

Revision history for this message
Giovanny Arce (giovannyarce) wrote :

This affects me too.

Revision history for this message
Chase Douglas (chasedouglas) wrote :

klerfayt,

Thanks for providing a recording of your device. To use the recording I also need the device.prop file. Please follow the instructions in comment #11 to generate the file and then attach it to this bug report.

Thanks!

Revision history for this message
klerfayt (klerfayt-deactivatedaccount) wrote :
Changed in qt4-x11 (Ubuntu):
milestone: oneiric-alpha-1 → oneiric-alpha-2
Revision history for this message
Chase Douglas (chasedouglas) wrote :

The XInput 2.1 multitouch patch disabled XInput 1.x support, which tablet support depends on. The usage of both XInput versions simultaneously should not be a problem, and a fix to the multitouch patch to allow this appears to work properly for both tablet and multitiouch test cases.

I have requested a merge review of the changes.

I have also uploaded a test version of the package to ppa:utouch-team/unstable with version 4.7.3-1ubuntu4~test1. Once it has built, please test it out to verify it works properly.

Thanks!

Changed in qt4-x11 (Ubuntu):
status: Fix Committed → In Progress
Changed in qt4-x11 (Ubuntu Natty):
status: Fix Committed → In Progress
Changed in qt4-x11 (Ubuntu):
assignee: nobody → Chase Douglas (chasedouglas)
Changed in qt4-x11 (Ubuntu Natty):
assignee: nobody → Chase Douglas (chasedouglas)
Revision history for this message
Animtim (animtim) wrote :

Hi Chase,

I've just tried your ppa:utouch-team/unstable (on Natty), unfortunately it doesn't fix the bug, still no pressure in Krita.

(Of course I first did ppa-purge ppa:kitterman/ppa , as his fix worked for some time until some system update on May 31 where it started to have a different bug making it unusable (as Shaved Wookie reported).

Revision history for this message
klerfayt (klerfayt-deactivatedaccount) wrote :

Excuse the dumb question, but what exactly should be version 4.7.3 ? Only packages that I see being version "1.7.3" in Synaptic are related to xpilot: xpilot-ng/-ng-nlient-sdl/-ng-client-x11/-ng-common/-ng-server/-ng-utils

All qt4 stuff is version 4.7.2 still

Revision history for this message
klerfayt (klerfayt-deactivatedaccount) wrote :

typo in previous comment:

being version "1.7.3" <-- should be --> being version "4.7.3"

oops ;)

Revision history for this message
Chase Douglas (chasedouglas) wrote :

Animtim,

Please attach your Xorg.0.log file.

I am guessing you don't have xserver-xorg-input-evdev installed. Note that in 11.04, the xserver-xorg-input-wacom input module has been moved to universe. This means it is no longer officially supported by Canonical, and it is not installed by default. Qt only understands the pressure data coming from the xserver-xorg-input-wacom input module, so you need to manually install it and log out and back in before pressure will start working.

Revision history for this message
Chase Douglas (chasedouglas) wrote :

klerfayt,

Please test the Oneiric qt packages available in ppa:utouch-team/unstable. You can see the package online at:

https://launchpad.net/~utouch-team/+archive/unstable/+packages

Revision history for this message
Scott Kitterman (kitterman) wrote :

@Chase: Main/Universe isn't relevant to this discussion.

Revision history for this message
klerfayt (klerfayt-deactivatedaccount) wrote :

>Please test the Oneiric qt packages available in ppa:utouch-team/unstable.

What packages? I added this ppa in Friday and everything qt4 related is still version 4.7.2

Revision history for this message
Animtim (animtim) wrote :

Chase,

here is the file you asked for. I hope it'll help you find what is going wrong.
Also I do have xserver-xorg-input-evdev and xserver-xorg-input-wacom installed, that's not the problem.

Revision history for this message
Chase Douglas (chasedouglas) wrote :

Animtim, klerfayt,

I had only pushed the fix to the Oneiric series of the ppa, but to make it easier I have pushed it to the natty series as well. Once it finishes building, please upgrade to the qt4-x11 packages with version 4.7.2-0ubuntu6.2~utouch2. Hopefully with this version of the qt libraries and xserver-xorg-input-wacom pressure should work again.

Revision history for this message
Animtim (animtim) wrote :

Chase,

I updated my qt4-x11 packages with your ppa, reboot, still no pressure sadly :(

Revision history for this message
klerfayt (klerfayt-deactivatedaccount) wrote :

I can confirm that pressure sensitivity has not been fixed.

Revision history for this message
Chase Douglas (chasedouglas) wrote :

There was a simple packaging error in the qt4-x11 package I pushed to ppa:utouch-team/unstable for Natty. I have uploaded a new version and verified that pressure is working in Pencil using the device recording attached to this bug. Please retest.

For reference, the qt4-x11 package version from the ppa that I tested was 4.7.2-0ubuntu6.2~utouch3.

Thanks!

Revision history for this message
Animtim (animtim) wrote :

Well, now it works exactly like with Scott Kitterman's ppa, that is in Krita there's pressure but there's a strange bug with ghost lines being drawn from the border of the canvas to thecursor. It worked right before, until some update that happened on MAy 31, since when there's this new bug. You can try with the Krita 2.3 package in the repository.

Revision history for this message
Chase Douglas (chasedouglas) wrote :

Animtim,

What you are seeing is that the Qt issue is fixed, but that there is likely an issue with either the X server or the wacom input module that is causing the cursor to jump to the corner at times. This should be filed as a separate bug. Please use "ubuntu-bug xserver-xorg-input-wacom" to file the new bug.

Changed in qt4-x11 (Ubuntu Oneiric):
status: In Progress → Fix Committed
Revision history for this message
klerfayt (klerfayt-deactivatedaccount) wrote :

>but that there is likely an issue with either the X server or the wacom input module that is causing the cursor to jump to the corner at times.

If that is true and the cursor "jumps" to the upper left corner, then why does nobody notice the "jump"? And furthermore, why isn't Mypaint affected?

Revision history for this message
Jean-Baptiste Mardelle (jb-kdenlive) wrote :

I am experiencing the same problem as animitim (stylus input seems to jump), and I confirm that the issue is related to the latest xserver-xorg-core.

Reverting to previous version:
apt-get install xserver-xorg-core=2:1.10.1-1ubuntu1

Solves the problem and pressure works fine with the qt version from utouch ppa (or the one from Scott Kitterman).

So I guess we have to open an issue against xserver-xorg-core...

Revision history for this message
Scott Kitterman (kitterman) wrote :

>So I guess we have to open an issue against xserver-xorg-core...

Yes. Please. Also, please subscribe me to the bug (or mention the number here).

Revision history for this message
Jean-Baptiste Mardelle (jb-kdenlive) wrote :

Ok, I opened a bug report for xserver-xorg-core here:
https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/799202

As you can see in my bug description, the problem only appears with touch sensitive devices using the utouch-team unstable ppa.

Revision history for this message
Animtim (animtim) wrote :

Thank you j-b-m for the xserver-xorg-core bug investigation and report.

description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qt4-x11 - 4:4.7.3-1ubuntu4

---------------
qt4-x11 (4:4.7.3-1ubuntu4) oneiric; urgency=low

  [ Chase Douglas ]
  * Re-enable tablet support (LP: #762938)
  * Fix touch end event handling for reentrancy (LP: #785433)
    - Updated kubuntu_28_xi2.1.patch with the fixes

  [ Didier Roche ]
  * debian/patches/a11y_qt_and_qml_backport.diff:
    - backport patches from 4.8 to 4.7 for Qt and QML a11y support
 -- Didier Roche <email address hidden> Thu, 23 Jun 2011 09:07:42 +0200

Changed in qt4-x11 (Ubuntu Oneiric):
status: Fix Committed → Fix Released
Revision history for this message
Chase Douglas (chasedouglas) wrote :
Revision history for this message
Chase Douglas (chasedouglas) wrote :
Revision history for this message
Chase Douglas (chasedouglas) wrote :
Revision history for this message
Chase Douglas (chasedouglas) wrote :
Revision history for this message
Richard Wonka (richard-wonka) wrote :

Might this be related to #790130? inkscape has magically lost pressure sensitivity recently...

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted qt4-x11 into natty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in qt4-x11 (Ubuntu Natty):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
klerfayt (klerfayt-deactivatedaccount) wrote :

>Please test and give feedback here.

Removed all custom repos, enabled natty-proposed, did full upgrade and restarted. I've lost track of what is what, but at the moment in Krita:

1) pressure sensitivity works

2) Intuos button presses do not "jump" the cursor

3) problem with diagonal lines appearing while drawing has not gone away

4) sometimes stylus input is skipped (very rarely, I don't notice a pattern how or why that might happen)

Revision history for this message
Scott Kitterman (kitterman) wrote :

Being fixed. No release note needed.

Changed in ubuntu-release-notes:
status: New → Invalid
tags: added: verification-done
removed: verification-needed
Revision history for this message
Scott Kitterman (kitterman) wrote :

That sounds right for this bug
 Marking verification-done.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qt4-x11 - 4:4.7.2-0ubuntu6.2

---------------
qt4-x11 (4:4.7.2-0ubuntu6.2) natty-proposed; urgency=low

  * Update kubuntu_28_xi2.1.patch
    - Fix touch end event handling, LP: #785433
    - Re-enable Wacom pressure handling, LP: #762938
 -- Chase Douglas <email address hidden> Thu, 23 Jun 2011 11:23:20 -0700

Changed in qt4-x11 (Ubuntu Natty):
status: Fix Committed → Fix Released
Revision history for this message
Animtim (animtim) wrote :

Hey! I've just tried Oneiric Alpha2, freshly installed/updated
Now in Krita there is NO STROKE AT ALL (not just no pressure, or strange diagonal lines... no stroke at all)

Weird thing is that it works in Pencil (but Pencil only use pressure sensors from wacom, while Krita use all features available)

But I'm sure it's not a Krita issue as it doesn't happen on other distros.
(and tested with "old" 2.3.3 from official repository, as with build master from git, same issue.)

Revision history for this message
Animtim (animtim) wrote :

Additional infos:
The report above was with a Graphire4.

So in Oneiric, with a Graphire4, it's impossible to paint in Krita.
With Intuos3, stylus can draw strokes with pressure but still produce weird parasite diagonal strokes that prevent from using it.

Revision history for this message
Animtim (animtim) wrote :

Sorry for last comments, actually the remaining bug is probably in xserver-xorg-core
(as reported in bug #799202 , pressure in Krita works fine using xserver-xorg-core 2:1.10.1-1ubuntu1 , but after updating it
to 2:1.10.1-1ubuntu1.1 it doesn't work right anymore…)

So this bug here in qt4-x11 is fixed indeed, thank you for this.

Magnes (magnesus2)
no longer affects: unity
no longer affects: mypaint
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.