Opened 9 years ago

Last modified 9 years ago

#4731 in-progress bug

Wacom causes erratic mouse cursor movement

Reported by: idefix Owned by: stippi
Priority: normal Milestone: R1
Component: Drivers/Mouse/USB Version: R1/alpha1
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

When you hold the Wacom pen in one position, you'll notice that the mouse cursor erratically moves a couple of pixels around one spot. In BeOS, Ubuntu and Windows this movement is a lot less, if not non-existent.

I noticed that the Linux Wacom driver uses a simple moving average filter to provide noise correction, so I hacked-up a patch that implements this in the Haiku driver.

Unfortunately this filter doesn't fix the erratic movements completely, so I decided to compare the 'raw' tablet data:

  • x-movement (BeOS on the left, Haiku on the right): 'raw' movement in x direction (BeOS)'raw' movement in x direction (Haiku)
  • y-movement (BeOS on the left, Haiku on the right): 'raw' movement in y direction (BeOS)'raw' movement in y direction (Haiku)

The horizontal gridlines represent the pixel-boundaries on my monitor.
You can see that the 'raw' movement is a lot bigger in Haiku than in BeOS, but I have no idea where the cause of this difference lies.

Also note the difference in the time between two samples, between BeOS (left) and Haiku (right):

time between samples (BeOS)time between samples (Haiku)

Although this could have been caused by the different methods used to capture the data: to a file in BeOS, to the serial port in Haiku.

Attachments (9)

wacom_filter.patch (2.5 KB) - added by idefix 9 years ago.
patch implementing moving average filter in Wacom input_server addon
x-BeOS.png (16.6 KB) - added by idefix 9 years ago.
'raw' movement in x direction (BeOS)
x-Haiku.png (18.5 KB) - added by idefix 9 years ago.
'raw' movement in x direction (Haiku)
y-BeOS.png (19.4 KB) - added by idefix 9 years ago.
'raw' movement in y direction (BeOS)
y-Haiku.png (20.7 KB) - added by idefix 9 years ago.
'raw' movement in y direction (Haiku)
dt-BeOS.png (6.6 KB) - added by idefix 9 years ago.
time between samples (BeOS)
dt-Haiku.png (8.2 KB) - added by idefix 9 years ago.
time between samples (Haiku)
x (mov. avg.).png (20.2 KB) - added by idefix 9 years ago.
filtered x-movement of the cursor in Haiku, BeOS and Ubuntu
y (mov. avg.).png (23.7 KB) - added by idefix 9 years ago.
filtered y-movement of the cursor in Haiku, BeOS and Ubuntu

Download all attachments as: .zip

Change History (14)

Changed 9 years ago by idefix

Attachment: wacom_filter.patch added

patch implementing moving average filter in Wacom input_server addon

Changed 9 years ago by idefix

Attachment: x-BeOS.png added

'raw' movement in x direction (BeOS)

Changed 9 years ago by idefix

Attachment: x-Haiku.png added

'raw' movement in x direction (Haiku)

Changed 9 years ago by idefix

Attachment: y-BeOS.png added

'raw' movement in y direction (BeOS)

Changed 9 years ago by idefix

Attachment: y-Haiku.png added

'raw' movement in y direction (Haiku)

Changed 9 years ago by idefix

Attachment: dt-BeOS.png added

time between samples (BeOS)

Changed 9 years ago by idefix

Attachment: dt-Haiku.png added

time between samples (Haiku)

comment:1 Changed 9 years ago by stippi

Owner: changed from mmlr to stippi
Status: newassigned

Thanks! This is the way to go about this problem. I remember working on something similar in the Touchpad driver, and thinking this could be used to make the mouse work like a real mouse in the Wacom driver. Interested?

comment:2 Changed 9 years ago by stippi

Forgot to mention, Haiku seems to schedule a lot more interrupt transfers per second compared to BeOS. This is also the reason for the higher CPU usage when moving and USB mouse. I worked around this somewhat in the Mouse input_server add-on, but it seems to be a problem still.

comment:3 in reply to:  1 Changed 9 years ago by idefix

Replying to stippi:

Thanks! This is the way to go about this problem. I remember working on something similar in the Touchpad driver, and thinking this could be used to make the mouse work like a real mouse in the Wacom driver. Interested?

I'm sorry, but I don't think I understand you completely. Am I interested in what exactly? What similar thing? The filter? How would that make the Wacom mouse work like a real mouse?

comment:4 Changed 9 years ago by idefix

Finally got round to capture some data in Ubuntu (using xidump):

filtered x-movement of the cursor in Haiku, BeOS and Ubuntu
This image shows the filtered x-movement of the cursor in Haiku, BeOS and Ubuntu.

filtered y-movement of the cursor in Haiku, BeOS and Ubuntu This image shows the filtered y-movement of the cursor in Haiku, BeOS and Ubuntu.

The amplitude of the mouse-cursor movement in Ubuntu lies between those of BeOS and Haiku. Although the difference between Ubuntu and Haiku is a lot less in the y-movement than in the x-movement.

Changed 9 years ago by idefix

Attachment: x (mov. avg.).png added

filtered x-movement of the cursor in Haiku, BeOS and Ubuntu

Changed 9 years ago by idefix

Attachment: y (mov. avg.).png added

filtered y-movement of the cursor in Haiku, BeOS and Ubuntu

comment:5 in reply to:  4 Changed 9 years ago by idefix

Lets try that again...

Finally got round to capture some data in Ubuntu (using xidump):

filtered x-movement of the cursor in Haiku, BeOS and Ubuntu
This image shows the filtered x-movement of the cursor in Haiku, BeOS and Ubuntu.

filtered y-movement of the cursor in Haiku, BeOS and Ubuntu
This image shows the filtered y-movement of the cursor in Haiku, BeOS and Ubuntu.

The amplitude of the mouse-cursor movement in Ubuntu lies between those of BeOS and Haiku. Although the difference between Ubuntu and Haiku is a lot less in the y-movement than in the x-movement.

Note: See TracTickets for help on using tickets.