very jumpy cursor with wacom-dkms

Bug #736500 reported by Timo Kluck on 2011-03-16
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Open Input Framework
Undecided
Unassigned
Xournal
Invalid
Undecided
Unassigned
xorg-server (Ubuntu)
Medium
Chase Douglas

Bug Description

I've tested the wacom-dkms module with my HP tm2 convertible tablet. Touch input and multi-touch are working great. However, pen input is very shaky. It seems as if every now and then, a wrong y-coordinate is registered. See the attached screenshot.

My device info is in this bugreport: https://bugs.launchpad.net/utouch-grail/+bug/662957. Please let me know if you need more info.

Related branches

Timo Kluck (tkluck) wrote :
Chase Douglas (chasedouglas) wrote :

Hi Timo,

Please attach a copy of your Xorg.0.log file. The files in the previous report do not show any wacom hardware.

Thanks!

Timo Kluck (tkluck) wrote :

I attached Xorg.0.log

I just did some extra testing: the erratic behaviour only occurs when moving the stylus horizontally, and disappears entirely when I apply maximal pressure. Some mixup of the axis / overflow?

Chase Douglas (chasedouglas) wrote :

The log file verifies that the X evdev input module is being used.

Timo, please follow these directions to generate a recording of your tablet: https://wiki.ubuntu.com/Multitouch/Testing/uTouchEvEmu#Debugging

Thanks!

Changed in utouch:
status: New → Invalid
Changed in xserver-xorg-input-evdev (Ubuntu):
status: New → Incomplete
importance: Undecided → Medium
Timo Kluck (tkluck) wrote :

Here's the requested evemu properties and recording.

Timo Kluck (tkluck) wrote :
Changed in xserver-xorg-input-evdev (Ubuntu):
status: Incomplete → Triaged
Henrik Rydberg (rydberg) wrote :

The recording does not seem to exhibit the irregularities you mentioned. Perhaps it did not occur during this particular recording?

Timo Kluck (tkluck) wrote :

Thanks for having a look. I found out how to 'play' the recording. The old recording indeed doesn't show the weird behaviour, but the attached version does.

Timo Kluck (tkluck) wrote :

Just one more comment: at first I thought that it could be due to Xournal, because it has some weird event handling trying to work around xinput shortcomings. But I can also reproduce in the Gimp.

Henrik Rydberg (rydberg) wrote :

The wacom-pen2.record file seems fine here, and looking through the file, there is nothing special happening with the y axis (grep for "0003 0001" in the file). In other words, this might still be due to some other fu in your system.

Timo Kluck (tkluck) wrote :

Here's an xinput test recording. What strikes me as odd is that there are motion events with only an a[0] coordinate, and no a[1] coordinate. This seems related.

As far as I can interpret the wacom-pen2.record, it also seems odd that an x-axis event is not always followed by a y-axis event, like here:

# three axes:
E: 1300806474.170028 0003 0000 10634
E: 1300806474.170034 0003 0001 7989
E: 1300806474.170035 0003 0018 96
E: 1300806474.170037 0000 0000 0
# three axes:
E: 1300806474.178061 0003 0000 10649
E: 1300806474.178069 0003 0001 7988
E: 1300806474.178070 0003 0018 95
E: 1300806474.178072 0000 0000 0
# what is happening here?
E: 1300806474.186009 0003 0000 10666
E: 1300806474.186026 0000 0000 0
E: 1300806474.194010 0003 0000 10683
E: 1300806474.194028 0000 0000 0

Henrik Rydberg (rydberg) wrote :

The evdev protocol only sends changes, so this is perfectly normal.

Timo Kluck (tkluck) wrote :

Hendrik, do you have any ideas as to where the problem may be? I can imagine that the problem is over for you when it is not in evdev, but for me it is not! :-)

As far as I can tell now, gdk_event_get_coords() returns garbage y coordinates exactly when these events occur. Some layer between evdev and the application should be keeping state to be able to return correct coordinates, and this is probably what is going wrong. Which layer is this? Is it X, GDK, or should the application (Gimp, Xournal) do this?

Henrik Rydberg (rydberg) wrote :

The name is Henrik.

The fact that the problem does not show up in the a different desktop setting means the problem seems to be related to something else, possibly simpler to fix. That is good news. I would recommend trying the next level now, X. Try logging into a safe mode session and see if the problem persists.

Timo Kluck (tkluck) wrote :

Sorry Henrik for my miss-spelling your name. Thanks for your help, I'll see what I can find out and report the bug elsewhere if needed.

Chase Douglas (chasedouglas) wrote :

There are a few things that I could imagine cause this behavior in natty, but like Henrik I can't reproduce this bug either.

You wouldn't happen to be running any other gesture or input-related programs like easystroke, would you?

Timo Kluck (tkluck) wrote :

Chase: I'm running cellwriter. I will try to disable it and see what happens.

My girlfriend has a different Wacom tablet, so I will see if I can reproduce this with her hardware, too. I will also try a live-usb (+utouch ppas). I'll post my results here when I've gotten round to it.

One more thought: is 'use xinput' enabled in your copy of Xournal? When I disable it, the problems disappear (but there is no pressure-sensitivity then, so this is no real workaround).

Timo Kluck (tkluck) wrote :

I can reproduce this problem on a fresh daily live-usb with only xournal and ppa:utouch-team/unstable as extra software. I uninstalled xserver-xorg-input-wacom to make the evdev driver take over.

I can reproduce it both with my tablet's built-in wacom, and with my girlfriend's Bamboo Pen&Touch. I attached her device's properties in case it is of any use.

Please let me know if there's anything I can do to help track this down.

Timo Kluck (tkluck) wrote :

This trivial patch to xournal is a workaround. The surrounding code (a function called 'fix_xinput_coordinates') suggests that this bug has existed (in xinput? gdk?) for some time already. It just manifests itself slightly differently with these new packages, which makes Xournal's workaround fail.

I will submit this patch to Xournal.

Changed in xserver-xorg-input-evdev (Ubuntu):
status: Triaged → Invalid
Chase Douglas (chasedouglas) wrote :

Timo,

For some reason, I can now reproduce the bug. What I have verified is that the XInput 1.x events look to be generated properly. However, they are likely only now being sent without all the valuators set in every input event. This is a change in the X server 1.10. The protocol has always said this was a possibility, but it never actually did this until now.

I haven't read all the code for this yet, but I will review your patch as a starting point. If I had to guess, I'd say the bug lies in the gtk+ xinput 1.x code. I was only able to reproduce the issue in gimp when I set the preferences for the wacom device so that it would be used in windowed mode. I have also been able to confirm the bug in xournal when using XInput (and possibly also when not discarding core pointer events).

Timo Kluck (tkluck) wrote :

Chase: thanks for looking into this again. I also had to explicitely configure the Wacom device in the Gimp. One would also do so in a real use case, for the pressure sensitivity.

Your guess about where the bug could be sounds reasonable. Let me know if there is anything I can help you with.

Chase Douglas (chasedouglas) wrote :

After reviewing code some more, I believe the issue lies in the X server. With the addition of masked valuators, you could have an event that has an X and Pressure value changes, but not a Y value change. The following is the axis mapping:

0: X
1: Y
2: Pressure

In XI 1.x, the protocol sends a range of changed values. If axis 0 and 2 change, 1 has to be sent with it. Since Y didn't change, axis 1 is being sent with a value of 0. It needs to send the previous value in this case.

The good news is that the fix shouldn't be too difficult. I will probably get to it early next week.

affects: xserver-xorg-input-evdev (Ubuntu) → xorg-server (Ubuntu)
Changed in xorg-server (Ubuntu):
assignee: nobody → Chase Douglas (chasedouglas)
milestone: none → ubuntu-11.04
status: Invalid → In Progress
tags: added: patch
Chase Douglas (chasedouglas) wrote :

Timo,

I have uploaded a new xorg-server package to the utouch-team/unstable ppa (version 1.10.0-0ubuntu3~utouch1). I have verified that it fixes xournal usage when playing back the attached recording.

I'm going to unlink the upstream Xournal bug because it is really about a different issue. You can create a new bug against just the Xournal Ubuntu package and link it with the upstream bug there if you like.

Thanks for your help!

Changed in xournal:
importance: Unknown → Undecided
status: Unknown → New
status: New → Invalid
Chase Douglas (chasedouglas) wrote :

Upstream has accepted the patches for the fix, and I've added the patches to the ubuntu xserver packaging tree for inclusion in the next upload.

Changed in xorg-server (Ubuntu):
status: In Progress → Fix Committed
milestone: ubuntu-11.04 → ubuntu-11.04-beta-2
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xorg-server - 2:1.10.0-0ubuntu3

---------------
xorg-server (2:1.10.0-0ubuntu3) natty; urgency=low

  [ Bryce Harrington ]
  * patches/111_armel-drv-fallbacks.patch: Always fallback to -fbdev,
    not just when no other X driver matches. (Thanks jcristau)

  [ Chase Douglas ]
  * Fix jumpy cursor in XI 1.x applications.
    (LP: #736500)
    - Added 218_getValuatorEvents_cleanup.patch
    - Added 219_xi1_handle_noncontinuous_valuator_data.patch
 -- Bryce Harrington <email address hidden> Thu, 31 Mar 2011 23:58:07 -0700

Changed in xorg-server (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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