3

I am asked to setup a Touchscreen to work on a desktop install of 18.04. For now I have choosen the minimal install mode. I have tried as much as I could find to calibrate the touchscreen/-pad to work properly, but it does not work.

$ xinput

⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ PS/2 Generic Mouse                        id=12   [slave  pointer  (2)]
⎜   ↳ MicroTouch Systems, Inc. MicroTouch USB Touchscreen - EX II   id=10   [slave  pointer  (2)]

That last item in the list is the subject here.

I have installed and used xinput_calibrator what told me to include the following in: /usr/share/X11/xorg.conf.d/99-calibration.conf

Section "InputClass"
  Identifier    "calibration"
  MatchProduct  "MicroTouch Systems, Inc. MicroTouch USB Touchscreen - EX II"
  Option    "MinX"  "11516"
  Option    "MaxX"  "54762"
  Option    "MinY"  "53541"
  Option    "MaxY"  "11258"
  Option    "SwapXY"    "0" # unless it was already set to 1
  Option    "InvertX"   "0"  # unless it was already set
  Option    "InvertY"   "1"  # unless it was already set
EndSection

I have done that a rebooted but there is still some overall offset and the y axis mirrored.

Most of the steps are taken from here but that is for ubuntu 12.04, so i guess outdated. There, the author suggests to put the config into: /usr/share/X11/xorg.conf.d/10-evdev.conf but that file does not exist and all the »evdev« stuff doesn't seam to be on the system at all.

What can I do here ???

Thanks in ahead…

UPDATE

based on some further research:

$ xinput list-props 

Device 'MicroTouch Systems, Inc. MicroTouch USB Touchscreen - EX II':
Device Enabled (139):   1
Coordinate Transformation Matrix (141): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Calibration Matrix (279):  1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Calibration Matrix Default (280):  1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Send Events Modes Available (262): 1, 0
libinput Send Events Mode Enabled (263):    0, 0
libinput Send Events Mode Enabled Default (264):    0, 0
Device Node (265):  "/dev/input/event16"
Device Product ID (266):    1430, 1

Whereby the Entry Coordinate Transformation Matrix is a result of a xinput set-prop. Since the touchable Area should be the same as the display area, the transformation matrix should be:

1 0 0
0 1 0
0 0 1

But the y-axis is mirrored, so I have tried:

1  0 0 
0 -1 0
0  0 1

But that did not work…

How Can I find the touchable area?

1 Answer 1

0

You need to define an offset for the y-axis.

So your matrix should look like:

1  0  0
0 -1  1
0  0  1

So you could put this in your xorg config:

Section "InputClass"
  Identifier    "calibration"
  MatchProduct  "MicroTouch Systems, Inc. MicroTouch USB Touchscreen - EX II"
  Option "TransformationMatrix" "1 0 0 0 -1 1 0 0 1"
EndSection

For the real calibration iam using libinputs option CalibrationMatrix. Those points x0 and x3 are the clicks 1 and 3 outputted by xinput_calibrator -v.

a = (width * 6 / 8) / (x3 - x0)
c = ((width / 8) - (a * x0)) / width
e = (height * 6 / 8) / (y3 - y0)
f = ((height / 8) - (e * y0)) / height

Option "CalibrationMatrix" "a 0 c 0 e f 0 0 1"
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .