Linux touch testing


Given that most Linux distributions support single touch via X or the event subsystem uinput then by default the UPDD driver will initially be configured to post single touch data via uinput (if the component exists) or X.

In most cases single touch will work. If it doesn't many of the steps here can be used to test touch generally.

However, most modern touch devices support multi-touch and in some cases you may have a multi-touch client application that you wish to run with UPDD.

For multi-touch to work the client software (including the desktop manager if required) must also support multi touch.

As this support is patchy and somewhat hardware dependent it is generally the case that this does not work "out of the box".

This article gives a number of pointers of how to setup and test multi-touch.

The Linux distribution referenced in this text is Ubuntu 16.04.03 LTS. This is the latest available as of the date of writing (Dec 2017) . Ubuntu 17.10 been released but has been withdrawn from the primary download site due to issues.

Verifying your hardware supports MT

Firstly install the driver as documented. The run the UPDD Test program.

Draw with multiple fingers on the touch screen. You should see one line drawn for each finger as in this example showing 3 finger drawing.

Enabling the multi touch system interface

By default the MT system interface is disabled as otherwise the driver will not work out of the box with some Linux kernel versions that do not support MT.
The MT system interface is enabled with the following commands 

If you have not already done so create the environment to work with UPDD tools

/opt/updd/upddenv bash 
cd /opt/updd

Then set MT mode

./upddutils nodevice set uinput.multi_touch 1

And restart the driver

sudo systemctl stop updd 
sudo systemctl start updd

 

Notes

  • The stop / start instructions assume a system using systemd. This is likely to be the case for any Linux distro that supports MT, but in any case you can use any appropriate means; including a reboot to restart the driver.
  • Enabling multi-touch instructs the driver to create a MT compatible virtual device and post single (the default) and multi touch events to the event system via this device.

Checking it works 

The state of out of the box support is difficult to determine for Linux distributions. We believe that when using Ubuntu with the Unity desktop certain gestures should work but Unity version 7.4.0 used during our tests does not appear to support multi-touch gestures, or if it does, we have not been successful in enabling it. This official documentation suggests otherwise; but we have tested with a range of hardware and not seen anything to suggest this does work in the current version.

Therefore, for a first test we recommend that you install Chrome or Chromium.

In our tests used Chrome version 58.0.3029.81 and Chromium version 63.0.3239.84.

Navigate to any web page. With the browser window focused, place 2 fingers on the screen near the center and move them away from each other. The screen image size should gradually increase.

Now move your fingers closer together and note that the screen image returns to its original size.

You can also tap with 2 fingers to get a context menu in Chrome.

Working with the UPDD API

If you are developing software to support multi-touch you can use the UPDD API. This is independent of the Linux event system so will work in all cases.

Troubleshooting

If touch or a specific application is not working when configured via uinput it might be useful to examine the status of the UPDD virtual device and the output from it.

You can use evtest to see information about the virtual driver and what/if any events are occurring.

Enter sudo evtest in a bash shell to list the devices. In this example the UPDD MT virtual device is device 10:

If this does not exist and no other UPDD entries are seen then UPDD is not running or is not configured correctly.
If UPDD single touch is listed instead check the setting uinput.multi_touch

Assuming the device is listed, enter the number (10 in this example) and you will see the attributes of the device.

then

then a two finger touch gives:

and this is the end of the data when touches stop:

Note that the exact details in these outputs may vary.

TUIO applications

If running a TUIO client application you will need a TUIO server installed to receive touch input and post out on the TUIO protocol. We have UPDD compatible TUIO servers, that receive touch directly from the driver via the UPDD API, for Windows and MacOS but have not created one for Linux - contact us to discuss further if a UPDD TUIO server is required.​

Search