A step-by-step guide


UPDD has comprehensive support for a wide range of multi monitor configurations in Linux.

In many cases however some manual setup is required due to variations in the implementation of various components in Linux and supporting software.

This document aims to explain the relevant UPDD and system terminology and provide a workable approach to identifying the required configuration.

Terminology

 Term Meaning
 Monitor metrics Monitor metrics refers to the settings UPDD uses internally to identify the placement of monitors used with touch. Usually this refers to the global setting monitorsetupmetrics
 Physical monitor A physical monitor is the actual display hardware
 Logical monitor A logical monitor is a conceptual device. You might for example have two physical monitors but in some cases the operating system will report just one monitor which the operating system “sees” as a concatenation of the two

In the example below we have a system with four monitors each 1920x1080 arranged as shown here.

But the operating system reports it as a single 3840x2160 device:

 Kernel interface

The interface used to deliver touches to the operating system.

UPDD uses two methods.

uinput  / touch

The first uses a user mode virtual input device, referred to as uinput.

In the UPDD Console this is shown as “Touch”  

 

Internally this is represented by a value of uinput in the setting active_touch_interface

xtouch / mouse

This second touch delivery mechanism uses APIs provided by X to deliver touches to the OS as described here.

In the UPDD Console this is shown as “Mouse”  

Internally this is represented by a value of xtouch in the setting active_touch_interface

Co-ordinate range A co-ordinate range is simply the range of x/y co-ordinates used in any given context.
In the four monitor example shown above the logical monitor has a co-ordinate range of 0,0 to 3839,2159 and monitor 2 has a co-ordinate range of 1920,0 to 3839,1079.
Unfortunately, for any given physical monitor there can be different co-ordinate range dependent on the context. E.g. the calibration program; xtouch and uinput might all have a different co-ordinate range for each. This is one of the issues we must deal with.
Segments segment is a UPDD artefact that describes the relationship between a physical monitor and it’s related area of the associated logical monitor.

In our four monitor example above logical monitor 1 is divided into 4 segments so UPDD would refer to these as monitor 1 segment 1 to monitor 1 segment 4.

X server, display, screen X provides a further level of abstraction by way of the DISPLAY environment variable which can to be set to identify a logical display using the server, screen and display numbers as described in the X documentation link at https://www.x.org/archive/X11R6.8.1/doc/X.7.html.

A step-by-step guide to configuring a multi-monitor system 

This section gives a series of steps to set up a single device in a multi monitor system which you can then repeat for each device. As every environment is different this is not an exact guide, you will need to use the information presented here to determine how to satisfy each step.

Please note that the intention of this guide is to get a single device working correctly in a multi-monitor / multi-touch environment and then extend the configuration to add support one at a time. You should follow the steps in the order shown.

It is assumed that you have a system with all UPDD devices listed as okay as shown below and this is a fresh install (no settings  changed).

  1. Identify the device to work with. We suggest starting with the lowest numbered device in the device list, in the example above device 1.
    You need to determine which touch device is device 1. To do this start the calibration program for device 1:



    Note: at this stage we are not concerned with where the calibration screen appears or touches are delivered we are simply determining which touch device is device 1. Touch each physical monitor in turn. Only one will react. This is device 1.

  2. Get the calibration screen placed correctly. If the calibration screen appeared on the correct physical monitor in step 1 then you can skip this step.
    You will normally need to change the monitor number e.g.



    In some cases, you might need to set the display variable before running calibrate. If you have monitors associated with different X display, screen or servers then this might be the case.
    Example:


    Note that the syntax to set the DISPLAY environment variable might be different depending on which shell you use.

    You may need to experiment to find the correct combination of settings and run the command:


    after each attempt.

    Note that the aim of this step is to get the white background of the calibration screen to appear wholly but not necessarily exclusively on device 1 as identified in step one. We are not concerned with the placement of the crosses at this stage

  3. Set up segmentation if required. If you do not have a 1:1 relationship between physical and logical devices i.e. the command


    shows fewer monitors than you have physical monitors then you will need to set up segmentation.

    A simple example is shown here. If segmentation is not needed go to step 4.

    Referring to our earlier four monitor example:



    Let’s assume that device 1 is in fact the top right monitor.

    We have only one logical monitor, so segmentation is required:



    As this is a simple symmetrical 2x2 arrangement. We set this with the global (nodevice) setting:



    then set the segment for the device with:



  4. Calibrate. Again use the command:



    If all is well you should see the calibration targets appear in turn as each is touched at the expected locations  (10% in from each corner by default).

  5. Direct touches to the correct monitor. Touch device 1 and observe where the touch occurs. If it occurs in the correct location on the correct monitor, then you are all set. If not, there are several options available. The most appropriate one for your environment will have to be chosen by experiment.

    In this simple 2 monitor system we have determined that device 1 is the right-hand monitor and that has been assigned to monitor 2, but touches appear on  the left monitor.

    For simplicity, this example assumes no segmentation:



    Of course, we can’t simply change the monitor number setting as this will affect calibration.

    We can set touch.metrics.X to override the calculated monitor metrics for touch only (not calibrate) on a per monitor basis as per this example:



    This sets the left, top, right, bottom co-ordinates for monitor 2 as shown. NB we are working with monitor 2 which is associated with device 1.

    The values to use need to be determined on a per case basis. In this example the touch co-ordinate ranges appear to be swapped so we use the values that would have been defaulted for the left monitor.

    If using xinput it might be necessary to adjust the mapping between UPDD monitor and the X display. By default updd will use DISPLAY=:0 for monitor 1, DISPLAY=:1 for monitor 2 etc.

    This can be changed by setting linux_display.X as in this example:


    It's important to use plain/straight quotes and not smart quotes:



    This tells the driver to use DISPLAY :0 for monitor 2. A driver restart is required to make this setting change effective.