I'm trying to get touch input from a eGalax resistive touch device to a eglfs window running the sample QtQuick2 code. I'm failing for several days. The touchscreen is connected via USB to a Raspberry Pi B and works fine for the raspbian jessie desktop. But if I run the sample QtQuick2 code the application don't get any touch input. However using a mouse works fine for the sample code.
I've already try to use tsLib but ts_test shows always 0 for x and y coordinates. I also try to use "./samplecode -plugin evdevtouch:/dev/input/event1" without success. If the screen in touched the output "Unhandled MSC event code MSC_SCAN (0x4)" is printed. So, the application or the mouse cursor is not responsive.
QML debugging is enabled. Only use this in a safe environment. qt.qpa.egldeviceintegration: EGL device integration plugin keys: ("eglfs_brcm", "eglfs_kms")
qt.qpa.egldeviceintegration: EGL device integration plugin keys (sorted): ("eglfs_brcm", "eglfs_kms")
qt.qpa.egldeviceintegration: Trying to load device EGL integration "eglfs_brcm" qt.qpa.egldeviceintegration: Using EGL device integration "eglfs_brcm"
Unable to query physical screen size, defaulting to 100 dpi.
To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
qt.qpa.input: libinput: input device 'eGalax Inc. Touch', /dev/input/event0 is tagged by udev as: Mouse
qt.qpa.input: libinput: input device 'eGalax Inc. Touch', /dev/input/event0 is a pointer caps
qt.qpa.input: libinput: input device 'eGalax Inc. Touch', /dev/input/event1 is tagged by udev as: Tablet
qt.qpa.input: libinput: eGalax Inc. Touch: tablet unknown to libwacom qt.qpa.input: libinput: input device 'eGalax Inc. Touch', /dev/input/event1 is a tablet
qt.qpa.input: Using xkbcommon for key mapping
qt.qpa.input: evdevtouch: Adding device at "/dev/input/event1"
qt.qpa.input: evdevtouch: Using device /dev/input/event1
qt.qpa.input: evdevtouch: /dev/input/event1: Protocol type B (mtdev) (multi) qt.qpa.input: evdevtouch: /dev/input/event1: min X: 0 max X: 0
qt.qpa.input: evdevtouch: /dev/input/event1: min Y: 0 max Y: 0
qt.qpa.input: evdevtouch: /dev/input/event1: min pressure: 0 max pressure: 0 qt.qpa.input: evdevtouch: /dev/input/event1: device name: eGalax Inc. Touch JIT is disabled for QML. Property bindings and animations will be very slow. Visit https://wiki.qt.io/V4 to learn about possible solutions for your platform.
qt.qpa.input: evdevtouch: Updating QInputDeviceManager device count: 1 touch devices, 0 pending handler(s)
qt.qpa.input: libinput: Unhandled MSC event code MSC_SCAN (0x4)
qt.qpa.input: libinput: Unhandled MSC event code MSC_SCAN (0x4)
qt.qpa.input: libinput: Unhandled MSC event code MSC_SCAN (0x4)
qt.qpa.input: libinput: Unhandled MSC event code MSC_SCAN (0x4)
Same for using ./samplecode -plugin evdevmouse:/dev/input/event1" but here its possible to move the mouse cursor.
Some helpful information dmesg:
usb 1-1.3: New USB device found, idVendor=0eef, idProduct=0001
usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1.3: Product: Touch
usb 1-1.3: Manufacturer: eGalax Inc.
systemd[1]: Expecting device dev-ttyAMA0.device...
systemd[1]: Starting Forward Password Requests to Wall Directory Watch. systemd[1]: Started Forward Password Requests to Wall Directory Watch.
input: eGalax Inc. Touch as /devices/platform/soc/20980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:0EEF:0001.0001/input/input0
input: eGalax Inc. Touch as /devices/platform/soc/20980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:0EEF:0001.0001/input/input1
hid-generic 0003:0EEF:0001.0001: input,hidraw0: USB HID v1.12 Pointer [eGalax Inc. Touch] on usb-20980000.usb-1.3/input0
running evtest (seems to be fine in my opinion):
pi@raspberrypi:~ $ evtest /dev/input/event1
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0xeef product 0x1 version 0x112
Input device name: "eGalax Inc. Touch"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 320 (BTN_TOOL_PEN)
Event code 330 (BTN_TOUCH)
Event type 3 (EV_ABS)
Event code 0 (ABS_X)
Value 315
Min 0
Max 2047
Event code 1 (ABS_Y)
Value 689
Min 0
Max 2047
Event type 4 (EV_MSC)
Event code 4 (MSC_SCAN)
Properties:
Testing ... (interrupt to exit)
Event: time 1511610558.640532, type 4 (EV_MSC), code 4 (MSC_SCAN), value d0042
Event: time 1511610558.640532, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1511610558.640532, type 3 (EV_ABS), code 0 (ABS_X), value 1362
Event: time 1511610558.640532, type 3 (EV_ABS), code 1 (ABS_Y), value 978
Event: time 1511610558.640532, -------------- EV_SYN ------------
Event: time 1511610558.672506, type 4 (EV_MSC), code 4 (MSC_SCAN), value d0042
Event: time 1511610558.672506, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1511610558.672506, -------------- EV_SYN ------------
Maybe anyone has a clue for me. Thanks for your help.
There was a bug in tslib specific to exactly your touchscreen device, when used with relatively new kernels. If you use the very latest version 1.15-rc2, soon to be 1.15, and
module_raw input
in your ts.conf, things should work just fine for you.