We have devices with touchscreens that we calibrate using xinput_calibrator, then apply the settings in a launch script for our application, along the lines of
xinput set-int-prop "Microchip Technology Inc. AR1100 HID-MOUSE" "Evdev Axis Calibration" 32 109 3841 161 3973
xinput set-int-prop "Microchip Technology Inc. AR1100 HID-MOUSE" "Evdev Axes Swap" 8 1
xinput set-int-prop "Microchip Technology Inc. AR1100 HID-MOUSE" "Evdev Axis Calibration" 32 3852 112 3970 159
This works well - sometimes. At other times, following a power cycle, the calibration will not take effect - the axes are swapped, in particular, and scaling seems off, though that's harder to say. A couple more power cycles and it will work again, then not.
We're new to X11 and aren't sure why this is happening. It's as though our xinput statements are being processed sometimes and ignored other times, though nothing has changed other than rebooting.
Any thoughts on how to address this are appreciated.