Manual configuration using Xtouch


Please note this document is aimed at Linux systems using the xtouch interface.

You will need to use the upddutils command line interface throughout.

For clarity the bare commands are listed here, omitting the path and environment setup.

E.g. you might use the actual command  './upddenv ./upddutils monitors'

In this document we will refer to just 'upddutils monitors'

Determine the number of monitors

Use the command upddutils monitors to list the monitors as seen by UPDD:



Determine the segmentation of the monitors 

In the simplest case each monitor listed will correspond to a physical screen.
However in some cases, a listed monitor might actually describe the co-ordinate range of a number of physical screens. This would be the case for example if a hardware based video splitter is used. The xorg configuration or other 3rd party software can also give rise to such a configuration. UPDD refers to this as monitor segmentation.

In this example two monitors are connected each with resolution 640 x 480, but only one monitor is reported



We describe this as a system having 1 logical monitor; but 2 physical screens.
From the example above it can be seen that the system sees this as a single co-ordinate system with the second monitor having the co-ordinate range 
640,0 to 1279,478

You will need to refer to your system hardware or software configuration to determine the segmentation arrangement of each monitor.

Once this is known you should set the UPDD segmentation settings for each monitor.

For the example shown above you would use the command:

More complex arrangements are of course possible, with different stacking, e.g. vertical, multiple rows etc and differing screen resolutions.
The use of monitor_segment_map is explained in more detail here.

What this does: setting the monitor_segment_map sets the co-ordinate range used in user mode. This is in turn used by the calibration utility to determine where to place calibration screens and targets during the calibration and identify processes. It also defines the segmentation used by the driver when reporting touch events to a monitor.

Set X display information

If all monitors are referenced by DISPLAY :0 then this step may be ignored as this is the default.

X identifies displays using the DISPLAY environment variable.

For example DISPLAY=1.3 references screen 3 on X server 1.

When using xtouch, for each monitor identified by using “upddutils monitors” in the earlier step the corresponding DISPLAY setting must be used 

This is illustrated in the example below 

upddutils monitors

UPDD monitor layout information
  found 3 monitors
  primary monitor is 1
    Monitor 1:        
      Left:   0
      Top:    0
      Right:  1919
      Bottom: 1199
    Monitor 2:        
      Left:   0
      Top:    0
      Right:  1919
      Bottom: 1199
    Monitor 3:        
      Left:   1920
      Top:    0
      Right:  3839
      Bottom: 1199

In the configuration above 

monitor 1 is screen DISPLAY:0
monitor 2 is screen DISPLAY:0.1 (left)
monitor 3 is screen DISPLAY:0.1 (right) 

You will need to derive this information from your system configuration.

upddutils nodevice set linux_display.2 :0.1
upddutils nodevice set linux_display.3 :0.1

1. It is not necessary to set the value for monitor 1, as this is the default.
2. If you do set a value for monitor 1, whilst it would be expected that this would be “:0.0” we have found that in practice this sometimes does not work and “:0” must be used.
3. As can be seen above, in this example monitor 2 and 3 represent different parts of the same screen. This step ONLY identifies the screen. The segment is identified by the monitor segment map.

Identify the screens

Run the command

UPDD\ Calibrate identify

This is described in more detail here.

If you have configured the monitor segmentation correctly then you should see the identify window (a screen with a single cross at the horizontal centre) on each physical screen. If not recheck settings.

This option is not currently available when multiple X screens or servers are used, i.e. it can only be used when all displays are on DISPLAY :0. For other scenarios use the manual identification process described later in this document.

Calibrating a multi X screen configuration

Currently, in a multi X server configuration you must manually set the DISPLAY variable. Again using the 3 screen example above and assuming that UPDD device 1 = left, 2 = middle and 3 = right.

export DISPLAY=:0
UPDD\ Calibrate device=1
export DISPLAY=:0.1
UPDD\ Calibrate device=2
UPDD\ Calibrate device=3

Identifying monitors in a multi X screen configuration

As  the automated “identify” relies on putting up dialogs on each screen in turn, which in a multi X screen configuration involves associating the process with different displays; this is not currently supported.
In such a scenario you will need to associate each touch device with a monitor manually.

The easiest way to do this is as follows.
Unplug all but one touch device (NB the touch device; usually USB and NOT the video device).

Use the command 

upddutils devices

 

This will show one device with the status OK, others with the NOK. Note the handle of the OK device. In the example above this is 1.

Now issue the following commands, one at a time

upddutils device 1 set monitor_number 1 
upddutils device 1 set monitor_number 2
upddutils device 1 set monitor_number 3

etc, until touches appear on the correct monitor when touching the connected device.

Now plug in the second device, note the newly OK device handle and repeat the above.
Repeat for all devices.

A practical example 
In this example we have 3 touch devices.

We also have 3 screens; the left is DISPLAY:0.

The other 2 are both DISPLAY:0.1 with the left half of DISPLAY:0.1 corresponding to the middle screen and the right half the rightmost screen.

We assume for simplicity that updd devices 1, 2 & 3 relate to left, middle and right screens.

Set all devices to use xtouch 

upddutils device 1 set active_touch_interface xtouch 
upddutils device 2 set active_touch_interface xtouch 
upddutils device 3 set active_touch_interface xtouch 

associate the UPDD monitor numbers with the X displays 

upddutils nodevice set linux_display.1 :0                       
upddutils nodevice set linux_display.2 :0.1

The above means that 
    updd monitor 1 == DISPLAY :0
    updd monitor 2 == DISPLAY :0.1 


Now set the updd monitors 

upddutils device 1 set monitor_number 1 
upddutils device 2 set monitor_number 2
upddutils device 3 set monitor_number 2

The above associates 
    device 1 with DISPLAY :0 
    device 2 & 3 with DISPLAY :0.1


Now define updd monitor 2 as segmented 

upddutils nodevice set monitor_segment_map.2 2x1

Direct device 2 to use the left half

upddutils device 2 set monitor_segment 1

Direct device 3 to use the right half

upddutils device 3 set monitor_segment 2

The screens can then be calibrated 
export DISPLAY=:0
UPDD\ Calibrate device=1
export DISPLAY=:0.1
UPDD\ Calibrate device=2
UPDD\ Calibrate device=3

Search