Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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!


share|improve this question
Not an answer, but a question for Beni. This seems to be going in the right direction to fix my problem as well. However, I don't believe that I am using the correct <touch input device> info for step 2. How can I determine precisely what to put in the <touch input device> brackets? Great post BTW – user164769 Jun 5 '13 at 21:00

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.

share|improve this answer
Thank you, worked for me! For those wondering you can get your list of output devices by running xrandr on it's own, mine have IDs like "eDP1", "VGA1", "HDMI1" etc. You can get the list of input devices by running xinput --list. On my laptop for example it gives the line ↳ ELAN Touchscreen id=12 [slave pointer (2)], from which I get an ID of 12. So for step 2) I would type xinput map-to-output 12 eDP1 – Jason O'Neil Jun 17 '14 at 3:28

for me with Ubuntu 12.04 LTS (64bit) it didn't wort until i saw in the xinput --help that the right command is

xinput map-to-crtc 'Name of input device' Name of output device

while Name of input device is shown by $xinput --list, name of output device is shown be $xrandr and could be LVDS1 oder VGA1 e.g.

share|improve this answer
This is a great answer, but where do you put this command so that it get's executed on startup. I've tried in /etc/lightdm/lightdm.conf but that locks up the entire computer (had to recover via recovery mode) and I've tried in in /etc/rc.local but the command doesn't execute. – Kat Amsterdam Jan 16 '14 at 13:33

If you want a graphical tool that sits in you system tray, then we just created one and would like to see if it is useful to anyone else: Just select your input pen device and which screen to map it to:

We just started so its may have problem identifying your tablet or screens, so please let us know. We'll fix it straight away. Also we plan to have it retain its previous configuration after startup - maybe even remember which config was used for which screen configuration if some people keep adding and removing monitors.

share|improve this answer
Hi Hrobjartur, please take a look here – bummi Jan 19 at 7:47
thank you I should give instructions on how to do it. – Hrobjartur Thorsteinsson Jan 20 at 9:15
Certainly was not a promotion but I can see that it may appear that way at a glance. --- I have had the same problem as above user with multiple monitors and the popular advice is set the xinput transformation matrix or doing other command line things which set the transformation matrix. --- Some of us like GUI's, in fact Ubuntu is full of nice GUI features, but left out non-Wacom (TM) pen/touch devices. If people really find this irrelevant and unhelpful I'll remove the post and go and play in my own corner and not contribute this kind of nonsense. – Hrobjartur Thorsteinsson Jan 20 at 9:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.