Touchscreen with dual monitors

by venz   Last Updated June 15, 2018 09:02 AM

i have ubuntu 12.04 and two monitors, where first is touchscreen.

System recognizes resolution as one big screen with 3840 * 1080 resolution.

Problem is when using touch calibration, calibrator screen gets sized over both screens. So, when touching screen, pointer gets double moves on X axis.

Is there any solution?

Graphic: NVIDIA with Twin wiew



Answers 5


See: https://wiki.archlinux.org/index.php/Calibrating_Touchscreen

Your matrix is one of the following:

 Touch screen on the left: 0. 5 0 0 0 1 0 0 0 1
 Touch screen on the right: 0. 5 0 0. 5 0 1 0 0 0 1

I have almost the same configuration (but screens one on top of the others) and I experience multiple clicks after setting the correct matrix, as described on the bottom line of the link above. I haven't found a way to rebuild xorg-server under Ubuntu; for sure the described procedure doesn't work.

gani
gani
June 24, 2012 17:52 PM

The archlinux wiki is the best description of how to solve this, but here is something a bit more specific.

You should run xinput --list to identify the name of your input device. I created a spreadsheet to calculate the transformation values.

Spreadsheet here: https://docs.google.com/spreadsheets/d/13CNQjWfzpEkHM4ZdCcUWDTdQNaFqQ6TYTwatQsYcHcQ/edit?usp=sharing

I ran your numbers (dual 1920x1080 displays).

If your touchscreen is on the left, the command would be ('Advanced Silicon S.A CoolTouch(TM) System' is the name of my input device, replace with yours):

xinput set-prop 'Advanced Silicon S.A CoolTouch(TM) System' --type=float 'Coordinate Transformation Matrix' 0.5 0 0 0 1 0 0 0 1

For the right, it should be:

xinput set-prop 'Advanced Silicon S.A CoolTouch(TM) System' --type=float 'Coordinate Transformation Matrix' 0.5 0 0.5 0 1 0 0 0 1
user272160
user272160
April 21, 2014 21:00 PM

Since this is a firs google search result for this problem, I decided to post my solution that for me looks simple.

I found this link on archlinux, and you can use

xinput --map-to-output <stylus device ID> <screen ID>

so I don't need to play with "Coordinate Transformation Matrix"...

Yura
Yura
July 18, 2015 20:30 PM

First, list all input sources with xinput --list:

⎡ Virtual core pointer                       id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Sony Vaio Jogdial                         id=8    [slave  pointer  (2)]
⎜   ↳ Advanced Silicon S.A CoolTouch(TM) System id=11   [slave  pointer  (2)]
⎜   ↳ HID-compliant Mouse HID-compliant Mouse   id=13   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Sony Vaio Keys                            id=7    [slave  keyboard (3)]
    ↳ Video Bus                                 id=9    [slave  keyboard (3)]
    ↳ Power Button                              id=10   [slave  keyboard (3)]
    ↳ IR camera                                 id=12   [slave  keyboard (3)]
    ↳ Cherry USB keyboard                       id=14   [slave  keyboard (3)]
    ↳ Cherry USB keyboard                       id=15   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=16   [slave  keyboard (3)]

Take the device that interests you (in this case, I am using "Advanced Silicon S.A CoolTouch(TM) System"), and note its ID.

Now, you need to find out the display that you want to map the input device to. The most straight-forward way is to use xrandr:

Screen 0: minimum 8 x 8, current 3200 x 1080, maximum 16384 x 16384
HDMI-0 connected 1280x1024+1920+0 (normal left inverted right x axis y axis) 338mm x 270mm
   1280x1024     60.02*+
   1280x960      60.00  
   1280x720      60.00    59.94  
   1152x864      75.00    70.00  
   1024x768      60.00  
   800x600       60.32  
   720x480       59.94  
   640x480       59.94    59.93  
LVDS-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 531mm x 299mm
   1920x1080     60.00*+  59.94  

In this case, I want to map my touch device to the output LVDS-0.

Combine the ID from the first step (11 here) with the screen name from the second step (LVDS-0 here) and run this command:

xinput --map-to-output INPUT-ID SCREEN

In my example, this command would be:

xinput --map-to-output 11 LVDS-0

Your touch device should not be properly mapped to the input device and should not require any additional configuration.

These settings will not persist between reboots. Please see this question on how to make xinput commands persistent.

RAnders00
RAnders00
May 17, 2016 17:49 PM

Also works for me :)

running latest LTS version: ubuntu-18.04-desktop-amd64 + two iiyama 17" touchscreens

$>: xinput --map-to-output 10 HDMI-1
$>: xinput --map-to-output 13 HDMI-2
ARuitenberg
ARuitenberg
June 15, 2018 08:21 AM

Related Questions






Touchscreen and additional external monitor

Updated August 16, 2018 07:02 AM