The PC is a Lenovo X1 Yoga, type 20FQ
The external monitor is a Philips bdm4065uc
The pen driver is by Lenovo, version "1.82.04.01 built by: WinDDk", and is called ApsHM64.sys
Installed the demo, and it has the exact same issues. So your hunch was correct.
Both works perfectly correct with both mouse and touch
Note in both, the pen-marker it self when close to or touching the display is correct. It is the cross (and pressure marker) that are placed wrong.
I noted something REALLY strange, that might help debugging:
If I change the scaling to the same on both monitors, and test that everything works, and then change the scale on one, and hover the pen over the test-windows WITHOUT touching the display, the cross-hair is positioned correctly under the pen(!) until I touch the display, then it jumps.
So the engine CAN do it correct, and does so until first pen-touch.
So have a look on whatever happens at touch, that might mess up things....
Both pen-touch, finger-touch and mouse-click trigger the error
It seems that the mingw ONLY displays "gdk_input_other_event:" AFTER the first touch, but updates the cross-hair correctly BEFORE that.
And the event dislays physical (not logical) pixel coordinates within the test-window. e.g.:
WINTAB motion: 3154.97,1304.04
gdk_input_other_event: window=00000000006e14fc +2521+1316
so it seems that it scales things that should not be scaled. (or things are scaled more than once)
But note that the behaviour is different in X and Y when the pen display got the smallest scaling factor, here Y is correct and X is wrong.