I have a dual monitor setup of two different sizes. My primary monitor is a 23 in widescreen Acer T230H touchscreen, and the second is a regular 20 in. When I go to use the touchscreen, the cursor shows up on the secondary display depending on where I touch the display. How do I calibrate it to only control my primary monitor?
As Beni Cherniavsky-Paskin suggested in a comment, I used the following command to map an input device to an output screen:
To figure out which is which, I first ran
xinput
to list the input devices. From that listing, I observed that my touchscreen was "QUANTA Optical Touch Screen" and listed as device id 12. I then ranxrandr
to determine the touchscreen, which in my case was VGA1.Simply entering the following command then did the trick:
As Beni Cherniavsky-Paskin and Paul Lammertsma suggested in above comments
xinput map-to-output <device> <output>
did the trick for me!you first need to run
xinput
to get the id of inupt device,the above command return something like this for me.
Next I ran
xrandr
to get the list of screens and the output of the command is like thisIn my case the touch device is
ELAN20E7:00 04F3:20E7 id=13
and touch enabled screen iseDP1
to fix the issue i need to map the device the that monitor only for that i ran this commandxinput map-to-output 13 eDP1
Problem solved and its working fine again :)
I am using elementary OS freya, so it should work for all distros based on Ubuntu 14.04 LTS
Very hard to find solution but actually pretty straight forward, just follow the answer from 'phnomic' here: Touchscreen and additional external monitor. Works flawless with my Fujitsu T730 with all kinds of external monitors!
Have you tried using xinput-calibrator?
At least for Wacom touchscreens, there is the additional issue that they stop working after a suspend-and-resume cycle. So they first have to be attached again and then calibrate for dual monitor usage. Here is a solution that does both:
Create (and then test) a custom
systemd
service to re-attach your touchscreen when the system comes back from suspend, using my other answer here.Create a script
/usr/local/bin/local-touchscreen-tweaks
with the following content:Set up your desktop environment to execute that script when X starts, for example via the autostart mechanism. It would be better to do that via
systemd
service, but I did not yet try this.Create the following custom service, used to execute your script when the system returns from resume. It runs after service
restart-wacom-inputattach
created in step 1 above, using the mechanism demonstrated here. For that, create a file/etc/systemd/system/local-touchscreen-tweaks.service
with this content:Enable your new custom service with:
I ran into a similar issue. I switch between using 2 and 4 touch screen monitors, all of which show the exact same name and changing device ID's, making all of the solutions I found pretty much useless. So, I wrote my own script. It captures the the ID's using xinput and the xrandr to capture the available displays. If you don't have Yad installed, it will attempt to install it.
It then uses Yad to popup a confirmation box in the corners of your monitors. Click ok, if the click does not hit the 'OK', it assumes your display and touch inputs are mismatched and attempts to match to the next until you actually hit 'OK'. Then it moves on to the next monitor.
This has to be ran everytime I log in, whether it's a reboot or my system was locked, but I set mine to run when I hit win+f (F for fix my crap), so it's pretty quick and painless to reset everything. I've yet to find a way to make it persistent. I also keep the code on git-hub. Any updates I make, I will post there (https://github.com/pvtcompyle/set-touch). If anyone can think of a way to make this kind of setup persistent, I would love to hear about it!