Ubuntu – Touchscreen calibration with dual monitors (NVidia and xinput)

multiple-monitorsnvidiatouchscreenxinput

I've got a NVidia GTX260 card with one regular screen above one touchscreen using the eGalax driver.

I've tried to configure the touchscreen using xinput but I can't get it right. With the normal screen disconnected and fiddling with the "Evdev Axis Calibration" option it works fine, but when I hook up the normal screen again the tough mapping is shifted. If I touch the touchscreen the mouse moves to the corresponding position on the other screen.

Neither "Coordinate Transformation Matrix" nor "map-to-output" seems to work…

Any help is greatly appreciated!

/Henrik

I now (on 13.04) had a similar problem but xinput map-to-output did help, if I do things in the right order.

xinput map-to-output tweaks the "Coordinate Transformation Matrix".
xinput_calibrator sets "Evdev Axis Calibration" and is completely unaware of "Coordinate Transformation Matrix". It also always opens stretched to the full available output area.

This means that you must run xinput_calibrator on a single screen.

1. xrandr --output <non-touch-output> --off

2. xinput map-to-output <touch input device> <touch-output>
(to reset "Coordinate Transformation Matrix" in case you've touched it before).

3. Calibrate with xinput_calibrator.
You should now have well-calibrated touch on the single screen.
(My touchscreen was initially way off — X/Y swapped, Y inverted — so I had to run this twice, with --misclick 0. I believe that's a property of my touchscreen, unrelated to the dual monitor situation.)

4. Re-enable the second screen.
xrandr --output <non-touch-output> --on

5. Do map-to-output again.