Tslib: mouse cursor moves in the opposite direction to selection box

touch screenxfcexorg

I'm using tslib/xf86-input-tslib on an ARM box with Debian 7. ts_calibrate and ts_test are working properly. The problems occur in Xfce. When I touch the screen and move the finger, I see, that mouse cursor is following my finger, but a selection box occurs with some offset to the Y-axis and then moves towards mouse cursor. My xorg.conf:

Section "InputDevice"
    Identifier "tslib"
    Driver "tslib"
    Option "Device"    "/dev/input/event1"
    Option "ScreenNumber"  "0"
    Option "Width" "0"
    Option "Height"    "0"
    Option "Rotate"    "NONE"
    Option "EmulateRightButton"    "1"
EndSection

Section "ServerLayout"
     Identifier      "Default Layout"
     InputDevice     "tslib" "CorePointer"
EndSection      

tslib version is 1.1 and xf86-input-tslib from Ubuntu: https://code.launchpad.net/~ubuntu-branches/ubuntu/saucy/xf86-input-tslib/saucy

An USB mouse is working as expected.

cat /proc/bus/input/devices

I: Bus=0018 Vendor=0000 Product=fe2e Version=0100
N: Name="TPS6507x Touchscreen"
P: Phys=1-0048/input0
S: Sysfs=/devices/platform/omap/omap_i2c.1/i2c-1/1-0048/input/input1
U: Uniq=
H: Handlers=mouse0 event1
B: EV=b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=1000003

How can I fix this behavior?

Best Answer

The problem is, that Xorg used both evdev and tslib driver for the same device.

Standard Xorg configuration files scan input devices and if it is a touchscreen, then evdev will used by default:

Section "InputClass"
    Identifier "evdev touchscreen catchall"
    MatchIsTouchscreen "on"
    MatchDevicePath "/dev/input/event*"
    Driver "evdev"
EndSection

Xorg seems not to check, if device is already used with another driver. That's why it used both drivers. The solution was to comment this section in /usr/share/X11/xorg.conf.d/10-evdev.conf.

Related Question