Monitor Metrics


It is important that the driver keeps a view of the system monitor layout so that it can direct the point of touch to the correct position within the system's monitor metrics.

Given the driver process executes in a context where it might not have access to information about system monitor layouts this information is also held in the UPDD setting monitorsetupmetrics.

Example:
monitorsetupmetrics=0:0:1439:4479:0:0:1439:2559:2560:0:1079:4479:

The first group is the coordinate basis range being the bounding lower and upper co-ordinate range of all monitors.
Thereafter, each group of 4 colon separated numbers gives the left, top  bottom and right co-ordinate of a monitor.
The second is the monitor 1 as seen by UPDD.
The third is monitor 2 as seen by UPDD.
And so forth.

By default, this setting is set automatically as appropriate, but there are settings to either manually define the setting or to be able to manually request the driver to update the setting, as required.

Automatic definition

The monitorsetupmetrics values are set by the UPDD software as follows:

1) On Windows during execution of the setup program.
2) During execution of the calibration program (All OS)
3) At system startup by UPDD Daemon (All OS)
4) Display settings change

This information can be retrieved with the TBApiGetSetting API call and seen using the Command Line Interface as in this 2 monitor system:

The monitor order as known by the driver can be seen via the command upddutils monitors:

C:\Program Files\UPDD>upddutils monitors
    Monitor 1:        DEL93D6
      Left:   0
      Top:    0
      Right:  2559
      Bottom: 1439
    Monitor 2:        Dell P2314T (HDMI2)
      Left:   2560
      Top:    0
      Right:  4479
      Bottom: 1079

Under Windows, the monitor with the origin of 0,0 is considered the primary monitor and any others as secondary monitors.

In multi-monitor configurations, associations are made between a touchscreen and a specific monitor so that the touch is activated on the correct monitor, therefore it is important that once this association is made the reported order remains the same.

However, there have been cases whereby the reported monitor order changes over a reboot with the same physical setup and this can result in touches being directed to the wrong monitor, as in this example:

Monitor 1:        RD@0001
   Left:   0
   Top:    0
  Right:  1919
  Bottom: 1079

Monitor 2:        RD@0001
   Left:   0
   Top:    1080
   Right:  1919
   Bottom: 2159

 Monitor 3:        Default_Monitor
   Left:   0
   Top:    -480
   Right:  639
   Bottom: -1

Monitor 1:        Default_Monitor
   Left:   0
   Top:    -480
   Right:  639
   Bottom: -1

 Monitor 2:        RD@0001
   Left:   0
   Top:    0
   Right:  1919
   Bottom: 1079

 Monitor 3:        RD@0001
    Left:   0
    Top:    1080
    Right:  1919
    Bottom: 2159

To cater for this situation we have added a setting monitorsetupmetrics.sort to indicate that the monitor layout should be sorted on video co-ordinate location, left to right, top to bottom.

Manual definition

In some cases the system monitor layout values set automatically in monitorsetupmetrics might not match the actual screen resolutions which can lead to inaccurate touch, even after calibration.

We have seen this in Linux systems using desktop scaling (xrandr --scale [option]).

In the following example xrandr reports that both monitors have a resolution of 1024 x 768 and the 2 desktops of 800 x 600 are scaled to this resolution.

 

However, when queried programmatically (as seen via upddutils monitors command)


The screen resolutions are reported as the logical (unscaled) size, not the physical (scaled) size.

In this case, monitorsetupmetrics must be set manually, using the upddutils command, based on the physical resolutions.

Given the above, it is likely to be:

upddutils nodevice set monitorsetupmetrics 0:0:1023:767:0:0:1023:767:1024:0:2047:767

This is an unusual edge case, and we believe that a bug in a Linux module is at fault in this case so it is difficult to give reliable and consistent guidance.

However, if scaling is in use and calibration is inaccurate, this is a likely cause. The fact that the monitor coordinate ranges are not contiguous is also a possible indicator of this scenario, although a non-contiguous can be valid in some circumstances.

With a combination of the 'upddutils monitors' and system commands to view the system and UPDD monitor layout, you should be able to determine the values required:

When manually defining the monitorsetupmetrics setting you need to inform UPDD not to automatically set this value as described above so we implemented a setting to disable the automatic update:

monitorsetupmetrics.manual

If set to 1 then the monitorsetupmetrics will not be overwritten, allowing a manual setting to be utilised:

upddutils nodevice set monitorsetupmetrics.manual 1

Manually request update

Given that there is cursor interference by the driver during the monitor setup procedure, then in some cases it might be desirable to not have the driver automatically remap the monitor metrics setup value each time the display layout changes, especially if there is a possibility that the current setting within the system unit reflects the layout, such as when plugging a touch monitor on to a system that previously had the touch monitor connected.

Since UPDD V7.1.43 there is a new global setting, monitor_setup_mode, that can be set to 'automatic' (default) or 'manual'.

This value can be preset within the software or set using the upddutils command  e.g 'upddutils global set monitor_setup_mode manual'

When set to 'manual' the monitor metrics setup is only run at the initial installation of the driver (to establish base settings) but thereafter it needs to be manually invoked as and when required, such as if the touch is directed to the wrong monitor after Identify has been run.

When set to manual, the UPDD Daemon menu will list the Setup monitor option

 

When selected, it will run the setup procedure if it determines a display change has occurred

Search