Search

Touch-Base Support

UPDD V7 delay analysis before touch is active

Dave Bhattacharjee
General

A customer has a system that could switch between Windows and Android and reported a delay bewteen 4.5 and 10 seconds before touch was ready after switching back to Windows and asked for an explanation.

This document summarises our findings based on the events captured in the UPDD debug log running at the time the switching took place from Android to Windows.

Device change messages 

At the time when the devices are reconnected to Windows there is a series of device change messages, this likely corresponds to the touch device  and other devices (keyboard, mouse, video etc) being reconnected.  

2022/08/15-11:34:08: DBG: Device change event deferred - debounce
2022/08/15-11:34:08: DBG: Device change event deferred - debounce
2022/08/15-11:34:08: DBG: Device change event deferred - debounce
2022/08/15-11:34:09: DBG: Device change event deferred - debounce
2022/08/15-11:34:09: DBG: Device change event deferred - debounce
2022/08/15-11:34:10: DBG: Device change event deferred - debounce
2022/08/15-11:34:10: DBG: Device change event deferred – debounce

Given the driver does know which device change relates to the touch device and responding to all these messages can cause issues we use a technique called debounce, basically this ignores the device changes until no events are seen for a specific period (2 seconds).

As you can see from the above the device changes arrive over a 2 second period (the fact both these periods are 2 seconds is coincidence). Giving ~4 seconds in total.

If the last event corresponds to the touch device then this would indicate that the touch device is not ready for 2 seconds after the switch.

We have found that with some devices trying to take control immediately or during these events often results in unreliability so this 2 second delay from the driver + 2 seconds while the devices settle down is in our opinion the fastest reconnect that gives good reliability in all situations. It is possible to experiment with this on a case by case basis.

In UPDD V7.0.50 we have introduced a global UPDD setting, device_change_debounce. If not set this has a default of 2000 ms which is 2 seconds and so gives the current behaviour.

You can set a lower value or a setting of 0 turns off the debounce processing completely with

upddutils global set device_change_debounce 0

​Device Found messages

When the devices are switched back, we see this entry

2022/08/15-14:30:56: TRC: OSConnectorW32::DoDeviceChange()

4 seconds later the first devices start to connect

2022/08/15-14:30:59: TRC: Entering GetHidDevicePaths
2022/08/15-14:30:59: TRC: Found: \\?\hid#vid_2621&pid_9004&mi_02#7&2e420f2e&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:30:59: TRC: Found: \\?\hid#vid_2621&pid_9004&mi_01&col01#7&1b11f2f0&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}\kbd
2022/08/15-14:30:59: TRC: Found: \\?\hid#system&col01#1&79f5d87&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:30:59: TRC: Found: \\?\hid#*upddvhid&col01#1&2c6288f7&6&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:30:59: TRC: Found: \\?\hid#*upddvhid&col02#1&2c6288f7&6&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:30:59: TRC: Found: \\?\hid#*upddvhid&col03#1&2c6288f7&6&0002#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:30:59: TRC: Found: \\?\hid#*upddvhmk&col02#1&177323c4&6&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:30:59: TRC: Found: \\?\hid#system&col02#1&79f5d87&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}\kbd
2022/08/15-14:30:59: TRC: Found: \\?\hid#vid_2621&pid_9004&mi_03&col01#7&5d76165&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:30:59: TRC: Found: \\?\hid#vid_046d&pid_0881&mi_02&col01#8&2833bb3a&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:30:59: TRC: Found: \\?\hid#system&col03#1&79f5d87&0&0002#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:30:59: TRC: Found: \\?\hid#vid_046d&pid_0881&mi_02&col02#8&2833bb3a&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:30:59: TRC: Found: \\?\hid#*upddvhmk&col01#1&177323c4&6&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}\kbd
2022/08/15-14:30:59: TRC: Found: \\?\hid#vid_046d&pid_0881&mi_02&col03#8&2833bb3a&0&0002#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:30:59: TRC: Found: \\?\hid#vid_2621&pid_9004&mi_03&col02#7&5d76165&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:30:59: TRC: Found: \\?\hid#vid_2621&pid_9004&mi_01&col02#7&1b11f2f0&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:30:59: TRC: Entering GetUpddDevicePaths: upddusb

2 seconds later, more devices appear (in this case the touch device)

2022/08/15-14:31:01: TRC: OSConnectorW32::OnEnumHIDDevices()
2022/08/15-14:31:01: TRC: Entering GetHidDevicePaths
2022/08/15-14:31:01: TRC: Found: \\?\hid#vid_2621&pid_9004&mi_02#7&2e420f2e&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:31:01: TRC: Found: \\?\hid#vid_314c&pid_0100&mi_01&col02#9&2efcf615&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:31:01: TRC: Found: \\?\hid#vid_314c&pid_0100&mi_00&col04#9&1bccd9d7&0&0003#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:31:01: TRC: Found: \\?\hid#vid_314c&pid_0100&mi_00&col05#9&1bccd9d7&0&0004#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:31:01: TRC: Found: \\?\hid#vid_314c&pid_0100&mi_00&col06#9&1bccd9d7&0&0005#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:31:01: TRC: Found: \\?\hid#vid_314c&pid_0100&mi_00&col07#9&1bccd9d7&0&0006#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:31:01: TRC: Found: \\?\hid#vid_314c&pid_0100&mi_00&col08#9&1bccd9d7&0&0007#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:31:01: TRC: Found: \\?\hid#vid_314c&pid_0100&mi_00&col09#9&1bccd9d7&0&0008#{4d1e55b2-f16f-11cf-88cb-001111000030}

2022/08/15-14:31:01: TRC: Found: \\?\hid#clixupskizzepen#b&31136bea&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:31:01: TRC: Found: \\?\hid#vid_2621&pid_9004&mi_01&col01#7&1b11f2f0&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}\kbd
2022/08/15-14:31:01: TRC: Found: \\?\hid#system&col01#1&79f5d87&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:31:01: TRC: Found: \\?\hid#*upddvhid&col01#1&2c6288f7&6&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:31:01: TRC: Found: \\?\hid#clixupskizzepen#b&3b28972a&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:31:01: TRC: Found: \\?\hid#*upddvhid&col02#1&2c6288f7&6&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:31:01: TRC: Found: \\?\hid#*upddvhid&col03#1&2c6288f7&6&0002#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:31:01: TRC: Found: \\?\hid#*upddvhmk&col02#1&177323c4&6&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:31:01: TRC: Found: \\?\hid#system&col02#1&79f5d87&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}\kbd
2022/08/15-14:31:01: TRC: Found: \\?\hid#clixupskizzepen#b&378c44de&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:31:01: TRC: Found: \\?\hid#clixupskizzepen#b&341fd943&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:31:01: TRC: Found: \\?\hid#vid_2621&pid_9004&mi_03&col01#7&5d76165&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:31:01: TRC: Found: \\?\hid#vid_046d&pid_0881&mi_02&col01#8&2833bb3a&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:31:01: TRC: Found: \\?\hid#system&col03#1&79f5d87&0&0002#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:31:01: TRC: Found: \\?\hid#vid_046d&pid_0881&mi_02&col02#8&2833bb3a&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:31:01: TRC: Found: \\?\hid#*upddvhmk&col01#1&177323c4&6&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}\kbd
2022/08/15-14:31:01: TRC: Found: \\?\hid#clixupskizzepen#b&29563550&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:31:01: TRC: Found: \\?\hid#vid_046d&pid_0881&mi_02&col03#8&2833bb3a&0&0002#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:31:01: TRC: Found: \\?\hid#clixupskizzepen#b&a310102&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:31:01: TRC: Found: \\?\hid#clixupskizzepen#b&5c0181f&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:31:01: TRC: Found: \\?\hid#vid_314c&pid_0100&mi_00&col01#9&1bccd9d7&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:31:01: TRC: Found: \\?\hid#vid_314c&pid_0100&mi_00&col02#9&1bccd9d7&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:31:01: TRC: Found: \\?\hid#vid_2621&pid_9004&mi_03&col02#7&5d76165&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:31:01: TRC: Found: \\?\hid#vid_314c&pid_0100&mi_01&col01#9&2efcf615&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:31:01: TRC: Found: \\?\hid#vid_2621&pid_9004&mi_01&col02#7&1b11f2f0&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:31:01: TRC: Found: \\?\hid#vid_314c&pid_0100&mi_00&col03#9&1bccd9d7&0&0002#{4d1e55b2-f16f-11cf-88cb-001111000030}
2022/08/15-14:31:01: TRC: Entering GetUpddDevicePaths: upddhid
2022/08/15-14:31:01: TRC: Found: \\?\{3207724a-bd4a-4476-be13-41b77f4d9c40}#upddfilter#a&253a4fc6&0&01#{56fa68d2-0c4b-4beb-96fe-a803864302cd}

We can conclude from this that although by default UPDD effectively waits for 4 seconds for the system to “settle down” the devices only become ready after a similar time and UPDD works immediately the devices are available.

Details
Last Modified: 2 Years Ago
Last Modified By: Dave Bhattacharjee
Type: INFO
Article has been viewed 507 times.
Options
Also In This Category