← Back to team overview

ubuntu-x-swat team mailing list archive

[Bug 774938] Re: Erratic cursor movement when using "Coordinate Transformation Matrix"

 

** Description changed:

  SRU Justification:
  ==================
  In previous releases of xserver-xorg-input-evdev there was an option to invert and/or swap axes. This allowed for simple screen rotation support. In the latest version of the module in Ubuntu, this option has been deprecated in favor of the server-side input coordinate transformation matrix support. See https://wiki.ubuntu.com/X/InputCoordinateTransformation for details. Unfortunately, the XInput 2.1 changes caused the input coordinate transformation matrix support to cause erratic pointer behavior. Without a fix, users cannot reliably use a rotated touchscreen.
  
  The fix involves maintaining and using the proper previous states of the
  X and Y event coordinates when performing the input coordinate
  transformation. If one coordinate is updated but not the other, the
  other's previous untransformed coordinate must be used to compute the
  correct new transformed coordinates. Then, the new transformed
  coordinates must be compared to the previous transformed coordinates to
  see if they should be reported to the client. Unchanged values are not
  reported in some XI 1.x and 2.x events. The current X server conflates
  the previous untransformed and previous transformed values and ends up
  calculating the new transformed values incorrectly.
  
- To reproduce, use xinput to set a new coordinate transformation matrix
- with a rotation. For example, use a 90 degree turn by setting the input
- coordinate transformation matrix to 0 -1 1 1 0 0 0 0 1. See the above
- wiki page for details on how to set the matrix. Then, try to touch the
- touchscreen and move the cursor. The cursor will jump arround
- erratically when moving in pure horizontal or pure vertical motions.
+ TEST CASE:
+ To reproduce, use xinput to set a new coordinate transformation matrix with a rotation. For example, use a 90 degree turn by setting the input coordinate transformation matrix to 0 -1 1 1 0 0 0 0 1. See the above wiki page for details on how to set the matrix. Then, try to touch the touchscreen and move the cursor. The cursor will jump arround erratically when moving in pure horizontal or pure vertical motions.
  
  The risk of regression is minimal because the only time the fix will
  cause a change is when the transformation matrix has been modified from
  the identity matrix to a matrix including some amount of rotation. The
  patch was also tested in the xorg-edgers ppa for a few weeks before it
  was even uploaded to Oneiric.
  
  Original Bug Report:
  ====================
  
  When using something like `xinput set-float-prop $INPUTDEV "Coordinate
  Transformation Matrix" 0.0 -1.0 1.0 1.0 0.0 0.0 0.0 0.0 1.0` to match
  the coordinates of a touchscreen/tablet to a rotated (transformed)
  screen, the cursor moves around erratically.
  
  From the original report of david-dklevine (https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/742567/comments/32):
  when a horizontal or vertical drag is performed the cursor jumps wildly - it appears to jump between what it should be according to the coordinate transformation and what it would be if x=0 and y=1 (that is if the second line of the matrix was the identity). With a diagonal drag or a touch the cursor appears where it should be.
  
  In addition to the Cando Multi Touch Panel reported at
  https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-
  evdev/+bug/742567/comments/32, it also affects me with a AsusTek, Inc.
  MultiTouch(TTI) (on Asus EeePC T101MT)
  
  lsb_release -rd
  Description:	Ubuntu 11.04
  Release:	11.04
  
  $ apt-cache policy xserver-xorg-input-evdev
  xserver-xorg-input-evdev:
    Installed: 1:2.6.0-1ubuntu12
    Candidate: 1:2.6.0-1ubuntu12
    Version table:
   *** 1:2.6.0-1ubuntu12 0
          500 http://gd.tuwien.ac.at/opsys/linux/ubuntu/archive/ natty/main amd64 Packages
          100 /var/lib/dpkg/status

-- 
You received this bug notification because you are a member of Ubuntu-X,
which is subscribed to xorg-server in Ubuntu.
https://bugs.launchpad.net/bugs/774938

Title:
  Erratic cursor movement when using "Coordinate Transformation Matrix"


References