1

I have an Asus Zenbook pro Duo running kubuntu 20.04. I have followed various setup tutorials for this laptop and have both the touchscreens running perfectly. However when i plug in an additional monitor the calibration goes totally off. I've followed this to try and fix the problem using xinput map-to-output. It solves the calibration on the X axis, however the Y axis is still off; the touch is registering in a position away from where i am actually touching the screen.

Does anyone know how i can get this working? These are the commands i've tried to use to map the touchscreens. These fix the X axis calibration but the Y Axis is still off.

xinput map-to-output 16 eDP-1-1
xinput map-to-output 18 DP-1-2

Below is the xinput an xrandr output.

xinput

    ⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ MOSART Semi. 2.4G Wireless Mouse          id=10   [slave  pointer  (2)]
⎜   ↳ ELAN1406:00 04F3:3101 Mouse               id=13   [slave  pointer  (2)]
⎜   ↳ ELAN1406:00 04F3:3101 Touchpad            id=14   [slave  pointer  (2)]
⎜   ↳ ELAN9008:00 04F3:29B6                     id=16   [slave  pointer  (2)]
⎜   ↳ ELAN9008:00 04F3:29B6 stylus              id=17   [slave  pointer  (2)]
⎜   ↳ ELAN9009:00 04F3:29A1                     id=18   [slave  pointer  (2)]
⎜   ↳ ELAN9009:00 04F3:29A1 stylus              id=19   [slave  pointer  (2)]
⎜   ↳ ELAN9008:00 04F3:29B6 eraser              id=22   [slave  pointer  (2)]
⎜   ↳ ELAN9009:00 04F3:29A1 eraser              id=23   [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)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Video Bus                                 id=8    [slave  keyboard (3)]
    ↳ Power Button                              id=9    [slave  keyboard (3)]
    ↳ USB2.0 HD UVC WebCam: USB2.0 HD           id=11   [slave  keyboard (3)]
    ↳ USB2.0 HD UVC WebCam: USB2.0 IR           id=12   [slave  keyboard (3)]
    ↳ ELAN1406:00 04F3:3101 Keyboard            id=15   [slave  keyboard (3)]
    ↳ Asus WMI hotkeys                          id=20   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=21   [slave  keyboard (3)]

xrandr

$ xrandr
Screen 0: minimum 8 x 8, current 5760 x 3260, maximum 32767 x 32767
HDMI-0 disconnected (normal left inverted right x axis y axis)
eDP-1-1 connected primary 3840x2160+1920+0 (normal left inverted right x axis y axis) 344mm x 194mm
   3840x2160     60.00*+  59.98    59.97  
   3200x1800     59.96    59.94  
   2880x1620     59.96    59.97  
   2560x1600     59.99    59.97  
   2560x1440     59.99    59.99    59.96    59.95  
   2048x1536     60.00  
   1920x1440     60.00  
   1856x1392     60.01  
   1792x1344     60.01  
   2048x1152     59.99    59.98    59.90    59.91  
   1920x1200     59.88    59.95  
   1920x1080     60.01    59.97    59.96    59.93  
   1600x1200     60.00  
   1680x1050     59.95    59.88  
   1600x1024     60.17  
   1400x1050     59.98  
   1600x900      59.99    59.94    59.95    59.82  
   1280x1024     60.02  
   1440x900      59.89  
   1400x900      59.96    59.88  
   1280x960      60.00  
   1440x810      60.00    59.97  
   1368x768      59.88    59.85  
   1360x768      59.80    59.96  
   1280x800      59.99    59.97    59.81    59.91  
   1152x864      60.00  
   1280x720      60.00    59.99    59.86    59.74  
   1024x768      60.04    60.00  
   960x720       60.00  
   928x696       60.05  
   896x672       60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   960x540       59.96    59.99    59.63    59.82  
   800x600       60.00    60.32    56.25  
   840x525       60.01    59.88  
   864x486       59.92    59.57  
   800x512       60.17  
   700x525       59.98  
   800x450       59.95    59.82  
   640x512       60.02  
   720x450       59.89  
   700x450       59.96    59.88  
   640x480       60.00    59.94  
   720x405       59.51    58.99  
   684x384       59.88    59.85  
   680x384       59.80    59.96  
   640x400       59.88    59.98  
   576x432       60.06  
   640x360       59.86    59.83    59.84    59.32  
   512x384       60.00  
   512x288       60.00    59.92  
   480x270       59.63    59.82  
   400x300       60.32    56.34  
   432x243       59.92    59.57  
   320x240       60.05  
   360x202       59.51    59.13  
   320x180       59.84    59.32  
DP-1-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 340mm x 190mm
   1920x1080     60.00*+  60.00    50.00    59.94    30.00    25.00    24.00    29.97    23.98  
   1920x1080i    60.00    50.00    59.94    50.00  
   1600x900      60.00  
   1280x1024     60.02  
   1152x864      59.97  
   1280x720      60.00    50.00    59.94  
   1024x768      60.00  
   800x600       60.32  
   640x480       60.00    59.94  
DP-1-2 connected 3840x1100+1919+2160 (normal left inverted right x axis y axis) 340mm x 100mm
   3840x1100     60.02*+  48.02  
   1920x550      60.06    48.08  
Jamp
  • 11

1 Answers1

-1

having the same issue. Bottom screen is mapped properly, but top is mapped vertically for top 2/3 of the screen (I assume it wants to go to the bottom screen too, but ends too fast, need a way to expand mapping, I guess)

edit: managed to get everything working this way:

#!/bin/bash

Read xinput list output into a variable

xinput_output="$(xinput list)"

Find the line with the device name and extract the ID

topscreen_id="$(echo "$xinput_output" | grep -E 'ELAN9008:00 04F3:2F29\s+id=' | head -n 1 | sed -E 's/.id=([0-9]+)./\1/')"

Find the line with the device name and extract the ID

bottomscreen_id="$(echo "$xinput_output" | grep -E 'ELAN9009:00 04F3:2F2A\s+id=' | head -n 1 | sed -E 's/.id=([0-9]+)./\1/')"

Print the extracted IDs

echo "Top screen ID: $topscreen_id" echo "Bottom screen ID: $bottomscreen_id"

echo "Mapping Top Touchscreen" xinput map-to-output $topscreen_id eDP-1 echo "Mapping Bottom Touchscreen" xinput map-to-output $bottomscreen_id DP-1

echo "Fixing coordinates for bottom touchscreen" xinput set-prop $bottomscreen_id "Coordinate Transformation Matrix" 1 0 0 0 0.5 0.674 0 0 1

MTR
  • 1