Several pointing device related problems occur when a touchscreen is installed

Bug #1005321 reported by Marcelo
54
This bug affects 10 people
Affects Status Importance Assigned to Milestone
xorg-server (Ubuntu)
Triaged
Medium
Canonical X.org

Bug Description

I'm running Kubuntu 12.04 64 bits on a Dell Inspiron One 2320, which has a touchscreen. Whenever the touchscreen is active, several weird problems related to the pointing device show up. 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.

Until now I haven't noticed similar problems with native KDE applications, except that in Kontact/KMail the mouse cursor image does not change according to the context (arrow cursor, text insertion cursor, etc.).

Besides, there are several other problems related to the touchscreen itself:

1. I can drag objects around the screen using the touchscreen, but I can't click anywhere. When I tap the touchscreen to click, the mouse cursor goes under my finger, but as long as I stop touching the cursor goes to some random place of the screen and the click is not registered.

2. While I'm dragging objects using the touchscreen or while I'm drawing in Gimp or Kolourpaint using the touchscreen, the mouse cursor keeps jumping down and going back to where my finger is. For example, if I'm drawing an horizontal line with my finger, what I really get on the screen is almost a filled in rectangle, because as I slide the finger to one side, the mouse jumps down drawing a vertical line and then goes back to my finger and keeps doing that while I'm sliding my finger horizontally. I get several vertical lines very close to each other. If I'm dragging a window horizontally, it keeps jumping down and up again while I'm sliding the finger horizontally on the touchscreen.

3. Multitouch does not work

After I got these results, I installed the following packages:
utouch and its dependencies
xinput-calibrator

They made no difference at all.

I then tried the following package:
xserver-xorg-input-tslib

After a reboot, this package disabled the touchscreen completely (?!) and that was how I found out that the problems with Libreoffice, Chromium, Handbrake and Kontact/KMail mentioned above were related to the touchscreen. All problems were gone, but no touchscreen either. Before I installed this package, xinput --list returned one device named "Quanta OpticalTouchScreen". After I installed the package, xinput --list shows two devices with exactly this name and the touchscreen stopped responding.

Then I removed the previous package and installed this one:
xserver-xorg-input-multitouch

Which made no difference at all. The system returned to the previous state, i.e., the touchscreen is responding but all the above mentioned problems are back.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: xorg 1:7.6+12ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-24.39-generic 3.2.16
Uname: Linux 3.2.0-24-generic x86_64
ApportVersion: 2.0.1-0ubuntu7
Architecture: amd64
Date: Sun May 27 20:25:09 2012
InstallationMedia: Kubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120423)
ProcEnviron:
 LANGUAGE=pt_BR
 PATH=(custom, user)
 LANG=pt_BR.UTF-8
 SHELL=/bin/bash
SourcePackage: xorg
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Marcelo (mmtsales) wrote :
bugbot (bugbot)
tags: added: kubuntu
Revision history for this message
Marcelo (mmtsales) wrote :

I've just found bug Bug #774938 and think that the erratic mouse cursor movement that I described right after "Besides, there are several other problems related to the touchscreen itself:" is related to that bug.
I use a dual monitor configuration and I'm using coordinate transformation matrix to restrict the touchscreen to one of my monitors. I use two 1920x1080 monitors positioned one above the other. The bottom monitor has a touchscreen, but the upper monitor does not. Without modifying the coordinate transformation matrix, X thinks that the touchscreen covers the entire desktop. I use the following command to restrict the touchscreen to the bottom monitor:
xinput set-prop "Quanta OpticalTouchScreen" "Coordinate Transformation Matrix" 1 0 0 0 0.5 0.5 0 0 1

Before this command is executed, I can click by tapping the touchscreen and can drag itens or draw using the touchscreen without the mouse jumping to the bottom of the screen, but the position where X thinks I'm touching does not correspond to the actual position on the screen, since X thinks the touchscreen covers the entire desktop and not only the bottom monitor. After I run the xinput command, X interprets the touches at the right positions, but all those collateral effects take place.

However, the problems mentioned in items 1 to 5 in the beginning of the bug report (and many others mouse related problems) always happen, no matter xinput was ran or not. They go away if I install the package xserver-xorg-input-tslib, but then the touchscreen is disabled ("xinput list" then lists two touchscreen devices with the same name, but the touchscreen does not respond)

Is there any test I can do to provide more info that could help to solve this issue?

Revision history for this message
Marcelo (mmtsales) wrote :

It seems this patch is related to this problem:
http://patchwork.freedesktop.org/patch/5024/

Revision history for this message
Marcelo (mmtsales) wrote :

This other bug is probably the same issue:
https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/767315

Some of the info provided by its reporter may be useful.

Revision history for this message
Marcelo (mmtsales) wrote :

A correction: despite what I said at the end of the report, the problems mentioned in items 1 to 1 in the beginning of the bug report do not occur before running xinput. All problems occur only after the coordinate transformation matrix is modified.
There are bugs reported in freedesktop.org's bugzilla about the mouse and touchscreen erratic behaviors when a coordinate transformation matrix is modified with xinput:
https://bugs.freedesktop.org/show_bug.cgi?id=40169
https://bugs.freedesktop.org/show_bug.cgi?id=50664

Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks for chasing the issue around upstream, even though it's not yet clear what the source of the trouble is. Let us know if you find the specific patch(es) at fault.

affects: xorg (Ubuntu) → xorg-server (Ubuntu)
Changed in xorg-server (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Zachary Salzbank (zsalzbank) wrote :

I was able to resolve the cursor jumping issue in 12.04 by using the attached patch. It is originally from:

https://bugs.freedesktop.org/show_bug.cgi?id=49347

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "cursor_jump_patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Luca De Cicco (ldecicco) wrote :

Is there any ETA for the application of this patch?

Revision history for this message
Christopher Hrabia (c-hrabia) wrote :

I have taken a look into the code of 12.10 and it seems that something like the patch above (a bit different) is now upstream, but I am still suffering under this problem after the use of coordinate transformation matrix. I tried to change the source in the way of 12.04 with applied patch. Compilation is fine, but make install damages my whole desktop configuration. I was only able to fix this by reinstalling all desktop related packages. I would assume that "make install" overrides some configuration files or something like this. Can someone help me out, how to fix this in 12.10.

Thanks!

Revision history for this message
Chris MacGregor (chris-launchpad-net-cybermato) wrote :

The solution for the CTM problem (which is what causes the wacky cursor jumping) is this patch, which was accepted into upstream on 19 Nov 2012; it is not yet in quantal-proposed, but I was able to rebuild xorg-server-1.13.0 (from 12.10) with this patch and the problem went away:

http://<email address hidden>/msg33742.html

There is another version of the patch floating around somewhere if you want to fix 12.04.

Revision history for this message
Cédric Dufour (cdufour-keyword-ubuntu-086000) wrote :

Thanks Chris for that pointer!

Applying the mentionned patch solves the pointer jerkiness issue when applying the "Coordinates Transformation Matrix" to my Atmel maXTouch touchscreen.

I attach the corrected patch which can be added to the current Quantal 'xserver-xorg-core' (1.13.0-0ubuntu6.1) source (in debian/patches and debian/patches/series)

Cheers

Revision history for this message
Yaroslav Sterkhov (ellanteres) wrote :

https://launchpad.net/ubuntu/+source/xorg-server/2:1.13.0-0ubuntu6.1/+build/4015022
last build still too old, so seem it doesn't contain this? e.t.a. for update?

Bryce Harrington (bryce)
Changed in xorg-server (Ubuntu):
assignee: nobody → Canonical X.org (canonical-x)
Revision history for this message
Brandon Istenes (bistenes) wrote :

Is there any way I can add a bounty to this bug? It's been seven years since it was filed and it makes LibreOffice Calc more or less unusable for anyone with a touchscreen device.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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