Opened 15 years ago

Last modified 6 years ago

#4731 in-progress bug

Wacom causes erratic mouse cursor movement

Reported by: idefix Owned by: stippi
Priority: normal Milestone: R1
Component: Drivers/Input/HID/USB Version: R1/alpha1
Keywords: Cc:
Blocked By: Blocking:
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 15 years ago.
patch implementing moving average filter in Wacom input_server addon
x-BeOS.png (16.6 KB ) - added by idefix 15 years ago.
'raw' movement in x direction (BeOS)
x-Haiku.png (18.5 KB ) - added by idefix 15 years ago.
'raw' movement in x direction (Haiku)
y-BeOS.png (19.4 KB ) - added by idefix 15 years ago.
'raw' movement in y direction (BeOS)
y-Haiku.png (20.7 KB ) - added by idefix 15 years ago.
'raw' movement in y direction (Haiku)
dt-BeOS.png (6.6 KB ) - added by idefix 15 years ago.
time between samples (BeOS)
dt-Haiku.png (8.2 KB ) - added by idefix 15 years ago.
time between samples (Haiku)
x (mov. avg.).png (20.2 KB ) - added by idefix 15 years ago.
filtered x-movement of the cursor in Haiku, BeOS and Ubuntu
y (mov. avg.).png (23.7 KB ) - added by idefix 15 years ago.
filtered y-movement of the cursor in Haiku, BeOS and Ubuntu

Download all attachments as: .zip

Change History (15)

by idefix, 15 years ago

Attachment: wacom_filter.patch added

patch implementing moving average filter in Wacom input_server addon

by idefix, 15 years ago

Attachment: x-BeOS.png added

'raw' movement in x direction (BeOS)

by idefix, 15 years ago

Attachment: x-Haiku.png added

'raw' movement in x direction (Haiku)

by idefix, 15 years ago

Attachment: y-BeOS.png added

'raw' movement in y direction (BeOS)

by idefix, 15 years ago

Attachment: y-Haiku.png added

'raw' movement in y direction (Haiku)

by idefix, 15 years ago

Attachment: dt-BeOS.png added

time between samples (BeOS)

by idefix, 15 years ago

Attachment: dt-Haiku.png added

time between samples (Haiku)

comment:1 by stippi, 15 years ago

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 by stippi, 15 years ago

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.

in reply to:  1 comment:3 by idefix, 15 years ago

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 by idefix, 15 years ago

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.

by idefix, 15 years ago

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

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

by idefix, 15 years ago

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

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

in reply to:  4 comment:5 by idefix, 15 years ago

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.

comment:6 by waddlesplash, 6 years ago

Component: Drivers/Mouse/USBDrivers/Input/USB-HID

component -> USB-HID (new)

Note: See TracTickets for help on using tickets.