Posts: 9
Joined: Mon Jul 31, 2017 6:30 pm

[Solved] Touchscreen taps detected as drags

Tue Aug 01, 2017 10:44 am


I purchased some Iiyama ProLite T2252MTS touchscreens for use with Raspbian Jessie (latest upgrades installed) to use as a kiosk unit. The hardware identifies as 093A:8020 "Pixart Imaging, Inc. Optical Touch".

It works out of the box but the hardware is ultra-sensitive. Any kind of finger movement during a click will begin a drag movement instead. This is very difficult to tap and users get frustrated quickly.

My goal is to make it more usable by improving click/tap detection, or disabling drag movements entirely.

This is dmesg output of the device being detected.

Code: Select all

[    5.226898] usb 1-1.2: New USB device found, idVendor=093a, idProduct=8020
[    5.226910] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    5.226917] usb 1-1.2: Product: Optical Touch
[    5.226923] usb 1-1.2: Manufacturer: Pixart Imaging, Inc.
[    5.226990] usb 1-1.2: SerialNumber: 0
[    5.241450] usbhid 1-1.2:1.1: couldn't find an input interrupt endpoint
[    6.246747] input: Pixart Imaging, Inc. Optical Touch as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/0003:093A:8020.0004/input/input3
[    6.247853] hid-multitouch 0003:093A:8020.0004: input,hiddev0,hidraw3: USB HID v1.10 Mouse [Pixart Imaging, Inc. Optical Touch] on usb-3f980000.usb-1.2/input0
The output of libinput-debug-events shows my shortest possible tap event with an apparent movement of less than 0.1mm...

Code: Select all

 event3 	TOUCH_DOWN       +28.69s	0 (0) 42.07/69.74 (199.78/187.31mm)
 event3 	TOUCH_FRAME      +28.69s	
 event3 	TOUCH_MOTION     +28.70s	0 (0) 42.08/69.72 (199.86/187.26mm)
 event3 	TOUCH_FRAME      +28.70s	
 event3 	TOUCH_UP         +28.77s	
Using Xorg configuration files I was hoping to tweak libinput settings, but libinput-list-devices shows the properties as "n/a" which means I can't change them:

Code: Select all

Device:           Pixart Imaging, Inc. Optical Touch
Kernel:           /dev/input/event3
Group:            1
Seat:             seat0, default
Size:             474.88x268.58mm
Capabilities:     touch 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      identity matrix
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   n/a
Rotation:         n/a
Note I disabled the second mouse input created by the device in xorg configuration, to prevent double taps/clicks being detected.

I tried several other xorg input drivers such as xserver-xorg-input-evdev (same performance as libinput but with no options), xserver-xorg-input-evtouch (missing from repos, can't compile on latest Raspian Jessie, seems to be a dead project), xserver-xorg-input-tslib (missing from repos, compiled myself and loaded in X but silently fails to work). In desperation I also tried synaptics, wacom, elographics which failed.

I think the most promising options are to somehow force libinput to understand the capabilities of the device, or to use tslib if only I could get xserver-xorg-input-tslib functioning. Or perhaps there's a utility which can help filter the events coming from the device before my kiosk browser receives them, but I couldn't find one.

Unfortunately now I'm stuck! Is anyone familiar with my promising options and could offer some advice?
Last edited by aoi on Thu Aug 03, 2017 2:47 pm, edited 1 time in total.

Posts: 3
Joined: Tue Aug 01, 2017 9:49 am

Re: Touchscreen taps detected as drags

Wed Aug 02, 2017 8:46 pm

Hi Mate, i got the same issue with another brand of touchscreen.

On ubuntu mate there is not any issue however i would like to use raspbian , did you ever try your screen on ubuntu mate and see if there was the issue?

Posts: 9
Joined: Mon Jul 31, 2017 6:30 pm

Re: Touchscreen taps detected as drags

Thu Aug 03, 2017 11:18 am

Thanks for the heads up. My bandwidth is limited but I'll try Ubuntu Mate next time I'm passing free wifi :D I wonder if they have slightly newer hardware definitions.

I found a clue.. when I purchased my first touchscreen it was the T2252MTS-B3 model, which reports as "0408:3008 Quanta Computer, Inc.", but my second purchase are a newer -B5 model reporting as "093a:8020 Pixart Imaging, Inc.".

The B3 seemed to work much better, although both report "n/a" next to capabilities in libinput which stops me from calibrating them. If I could get the B5 to work as the B3 did it would be an improvement! With calibration it could feel really slick. The camera technology is cool compared to old clunky resistive touchscreens.

I think there is a way to hint at libinput through udev rules but this is beyond my knowledge? Maybe I could beg the libinput author(s) to support the device. Or a method for me to update hardware definitions... would I need to compile a newer libinput on Raspbian for that, and possibly xserver-xorg-input-libinput too?

I'm stuck with these monitors now so I need to persevere with them and learn more about the software side.

Posts: 9
Joined: Mon Jul 31, 2017 6:30 pm

Re: Touchscreen taps detected as drags

Thu Aug 03, 2017 1:37 pm

The latest versions of libinput use the Ninja build system, but the Raspbian repos have an outdated version and I couldn't compile a more recent one. I was able to build libinput v1.7 which installed (the system had so a slight improvement. Unfortunately it didn't fix my touchscreen issues.

Here are my build notes in case anyone else finds it useful, but I have little idea what I'm doing and have no adult supervision :lol:

Code: Select all

# dependencies
sudo apt-get install check
sudo apt-get install valgrind
sudo apt-get install libunwind8
sudo apt-get install doxygen
sudo apt-get install libxdot
sudo apt-get install libwacom2 libwacom-dev

sudo nano /etc/apt/sources.list (and uncomment the src line)
sudo apt-get update
sudo apt-get build-dep libinput

# source code
git clone git://
cd libinput
git checkout v1.7-branch

# build
./ --prefix=/usr --libdir=/usr/lib/arm-linux-gnueabihf
sudo make install
sudo udevadm hwdb --update
Rolling back to the system-provided libinput is documented in doc/building.dox

And then compiling xserver-xinput-libinput:

Code: Select all

sudo apt-get install xorg-dev xutils-dev
mkdir xf86-input-libinput
cd xf86-input-libinput
git clone git://
cd xf86-input-libinput
autoreconf -vif
./configure --prefix=/usr
sudo make install
Back on topic, I'll keep poking at the touchscreen and update the thread

Posts: 9
Joined: Mon Jul 31, 2017 6:30 pm

Re: Touchscreen taps detected as drags

Thu Aug 03, 2017 2:47 pm

After barking up a forest I found the right tree!

I was poking through the source code for libinput and couldn't find much related to hardware definitions/capabilities or such. So I started reading up on usbhid (the kernel module used for the touchscreen) and stumbled upon this thread: viewtopic.php?f=28&t=84999

to /boot/cmdline.txt
in the same line separated from the other stuff by spaces
After a reboot this solved the problem and the touchscreen works perfectly :D I'm a very happy camper, hope it helps others too

Posts: 3
Joined: Tue Aug 01, 2017 9:49 am

Re: [Solved] Touchscreen taps detected as drags

Sat Aug 05, 2017 10:55 pm

NIce !! I'm gonna try it for mine ! thanks

Return to “Raspberry Pi OS”