MultitouchArea on Debian Sid with KDE
-
Hello, I am trying to find out how to use the MultitouchArea widget. I have created a project with QML code taken from the example form the help:
@
import QtQuick 2.0Rectangle {
width: 400; height: 400
MultiPointTouchArea {
anchors.fill: parent
touchPoints: [
TouchPoint { id: point1 },
TouchPoint { id: point2 }
]
}Rectangle { width: 30; height: 30 color: "green" x: point1.x y: point1.y } Rectangle { width: 30; height: 30 color: "yellow" x: point2.x y: point2.y }
}
@but nothing happens when I touch the screen. The configuration is following:
- Dell XPS12
- Linux Debian unstable (Sid)
- Kernel 3.11-2-amd64
- X Server 1.14-4 (2013-10-31)
- Qt 5.1.1
Now some informaton about how the device is detected in the system:
When I run evtest, I can see the list of input devices:
@
Available devices:
...
/dev/input/event5: Dell WMI hotkeys
/dev/input/event6: Atmel Atmel maXTouch Digitizer
/dev/input/event7: Laptop_Integrated_Webcam_1.3M
/dev/input/event8: CyPS/2 Cypress Trackpad
/dev/input/event9: Video Bus
…
@After selecting the event 6 a can read the list of supported events. Here is an example of events invoked by touching the display by four fingers:
@
Event: time 1386324730.100617, -------------- SYN_REPORT ------------
Event: time 1386324730.117634, type 3 (EV_ABS), code 47 (ABS_MT_SLOT), value 0
Event: time 1386324730.117634, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 591
Event: time 1386324730.117634, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 2043
Event: time 1386324730.117634, type 3 (EV_ABS), code 60 (ABS_MT_TOOL_X), value 591
Event: time 1386324730.117634, type 3 (EV_ABS), code 61 (ABS_MT_TOOL_Y), value 2043
Event: time 1386324730.117634, type 3 (EV_ABS), code 47 (ABS_MT_SLOT), value 1
Event: time 1386324730.117634, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 804
Event: time 1386324730.117634, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 1813
Event: time 1386324730.117634, type 3 (EV_ABS), code 60 (ABS_MT_TOOL_X), value 804
Event: time 1386324730.117634, type 3 (EV_ABS), code 61 (ABS_MT_TOOL_Y), value 1813
Event: time 1386324730.117634, type 3 (EV_ABS), code 47 (ABS_MT_SLOT), value 2
Event: time 1386324730.117634, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 488
Event: time 1386324730.117634, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 3079
Event: time 1386324730.117634, type 3 (EV_ABS), code 60 (ABS_MT_TOOL_X), value 488
Event: time 1386324730.117634, type 3 (EV_ABS), code 61 (ABS_MT_TOOL_Y), value 3079
Event: time 1386324730.117634, type 3 (EV_ABS), code 47 (ABS_MT_SLOT), value 3
Event: time 1386324730.117634, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 2065
Event: time 1386324730.117634, type 3 (EV_ABS), code 61 (ABS_MT_TOOL_Y), value 2065
Event: time 1386324730.117634, type 3 (EV_ABS), code 0 (ABS_X), value 591
Event: time 1386324730.117634, type 3 (EV_ABS), code 1 (ABS_Y), value 2043
@So I suppose that kernel driver is OK. Now for the Xserver module.
When I run the xinput command, I can see the digitizer in the list as device 9:
@
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ CyPS/2 Cypress Trackpad id=12 [slave pointer (2)]
⎜ ↳ Atmel Atmel maXTouch Digitizer id=9 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
...
@I can read the properties by_ xinput --list-props 9_.
But here might be the core of the problem. When running xinput --test 9 I can see events only for the first touch, all others are ignored. In following output I was touching the screen with two finger, but only one is catched:@
button press 1 a[0]=893 a[1]=2329 a[2]=1 a[3]=0 a[4]=0 a[5]=893
button press 1 a[6]=2329
motion a[0]=893 a[1]=2329 a[2]=0
button release 1 a[0]=893 a[1]=2329
@On the other side, by running xinput --test-xi2 9 I can see events for all the fingers. Here the output is again for touching the screen by two fingers:
@
EVENT type 22 (RawTouchBegin)
device: 9 (9)
detail: 36
...
EVENT type 18 (TouchBegin)
device: 9 (9)
detail: 36
...
windows: root 0xa8 event 0x5000001 child 0x5000001
EVENT type 4 (ButtonPress)
device: 2 (9)
detail: 1
flags: emulated
...
EVENT type 22 (RawTouchBegin)
device: 9 (9)
detail: 37
...EVENT type 18 (TouchBegin)
device: 9 (9)
detail: 37
...
windows: root 0xa8 event 0x5000001 child 0x5000001
EVENT type 24 (RawTouchEnd)
device: 9 (9)
detail: 37
...
@I have deleted all the irrelevant lines from the outputs to make it fit into the 6000 character limit for this forum.
So the Xserver module is somehow working. But the question is, what I need to do to convince the Qt to read the right source of events? Or maybe the emulated button press is the cause?
I have already tried all the examples in Touch folder, but none of them is working correctly. Only the first touch, which is interpreted as click with mouse cursor, is processed, but no multitouch is working. I have no experience with touch devices, so I am asking for help from somebody, who has some.
I have also tried some examles written in Python in Kivy and those are working, there should not be any problem in general. Just some buid setting or environmental variable? Or is there some interference with KDE? Or bad X server configuration?
Thanks in advance.
-
So I have made a little progress.
I have tried newer Qt version (5.2.0) installed from the online installer and it did not work either.
At last I tried to compile it from the source code with configure parameters:
-developer-build
-opensource
-confirm-license
-prefixNow the multitouch is working as expected.
I am going to find out the difference between provided installer and source code configuration.