Bug 40169 - Coursor flipping after setting Coordinate Transformation Matrix on touch device
Summary: Coursor flipping after setting Coordinate Transformation Matrix on touch device
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: 7.4 (2008.09)
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
Depends on:
Reported: 2011-08-17 07:03 UTC by d.drusowitsch
Modified: 2018-12-13 22:25 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Description d.drusowitsch 2011-08-17 07:03:50 UTC
After changing the Coordinate Transformation Matrix of an input device the cursor 
start to jump around if you touch the screen. 

The feature seems to work for the most part but has this annoying behavior. 

I located the file where the transformation coefficients are processed. 
Maybe the problem lies here: xorg-server-1.10.3/dix/getevents.c:1077-... 


X.Org X Server 1.10.3
Release Date: 2011-07-08
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.39-gentoo-r2 i686 Gentoo

Module evdev: vendor="X.Org Foundation"
compiled for 1.10.3, module version = 2.6.0
Comment 1 Marcelo 2012-06-06 15:47:55 UTC
I have this problem too. However, the cursor also jumps when I'm dragging something using the touchscreen or when I'm drawing using the touchscreen. Single clicks do not work either. When I tap the screen, the cursor goes to the place where I touched the screen, but as soon as I release the finger the cursor jumps to some random position and the click is not registered.
My configuration is two 1920x1080 monitors physically placed one above the other. The bottom monitor has a touchscreen, the upper one does not.
I use the following xinput command:
xinput set-prop "Quanta OpticalTouchScreen" "Coordinate Transformation Matrix" 1 0 0 0 0.5 0.5 0 0 1

The coordinate transformation seems to take place correctly after the above command is issued, i.e., X understands that the touchscreen covers only the bottom monitor and not the entire desktop. However, the touchscreen becomes unusable because it's not possible to click anywhere by tapping and the random mouse movements that occur when dragging or drawing make it impossible to perform these actions using the touchscreen.
Comment 2 Marcelo 2012-06-06 16:09:36 UTC
This bug seems to be the same as bug #50664.
Comment 3 Marcelo 2012-06-06 18:18:55 UTC
Besides the above mentioned problems with the touchscreen after setting the coordinate transformation matrix, the mouse also starts to behave strangely. In many occasions, it behaves as if the left button was stuck down. Some examples:

1. In Libreoffice Calc, if I hover the mouse over the zoom control bar in the bottom right corner of Calc's window, the mouse grabs the zoom control by itself, without me clicking any button. If I move the mouse left and right, without ever touching its buttons, it drags the zoom control left and right.

2. In Libreoffice Calc, if I left-click a tab other than the currently selected one, the new tab is selected as expected, but the mouse behaves as if the clicked button had stuck. When I move the mouse after selecting another tab, the mouse cursor changes to the arrow with the little rectangle, as if it was dragging a cell.

3. In Chromium, if I right-click a link and left-click "Open link in new tab", the mouse behaves as if the left-click stuck. When I move the mouse after opening the new tab, the mouse cursor changes to the little hand grabbing a sheet, as if I was moving the clicked link.

4. In Chromium, if I middle-click a link to open it in a new tab and then left-click the newly opened tab, the mouse cursor changes to the cross with arrowed points (the move window cursor) and the window is restored, as if I had started to drag it and let it go right after.

5. In Handbrake, when a dialog opens, hovering the mouse over its text without pressing any button selects the text.
Comment 4 Yaroslav 2013-01-31 07:00:07 UTC
I have same issues as Marcelo with eGalax, 3M and BARQ touchscreens, which on late kernel versions may be used only with xorg's driver (evdev) 

Ubuntu tracker on Launchpad got similar thread, they got  sever uproposed fixes for various versions of x-server:

Comment 5 Sandeep 2013-10-22 17:06:04 UTC
The coordinate transformation matrix transforms the input coordinates, so if you set it incorrectly, it will behave incorrectly. Are you sure you set it to the right values?
Comment 6 Marcelo 2013-10-22 22:54:01 UTC
Well, I think it is set correctly, because after issuing the mentioned xinput command, X recognizes the correct area of the desktop as being covered by the touchscreen, instead of thinking it covers the entire desktop.  However, all those mentioned collateral effects come up. All this is mentioned in the original bug report.
Even if it was set incorrectly, the expected result would be the cursor going to incorrect positions on the desktop when you touch the screen, right? All these random jumps and weird behaviors are unexpected even if the coordinate transformation was done incorrectly.
Anyway, I described my desktop's geometry and the transformation matrix I've been using, you can verify it for yourself.
Comment 7 GitLab Migration User 2018-12-13 22:25:44 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/xserver/issues/416.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.