Page 1 of 1

Fix Coordinate Transformation Matrix in config file

Posted: 16 Oct 2017, 10:32
by b0bbywan
Hello all,
I have a touchscreen attached to my Porteus Kiosk PC, I have almost managed to get it to work, but the "Coordinate Transformation Matrix" is giving me some hard time.

I know it works with the following command, that I exectue through SSH after boot

Code: Select all

xinput set-prop $TOUCHSCREEN "Coordinate Transformation Matrix" 0 -1 1 1 0 0 0 0 1
But I can't seem to find the correct parameters for the appropriate set-int-prop equivalent

Here's my touchscreen_calibration section in porteus config file (with the last part not working)

Code: Select all

touchscreen_calibration="eGalax Inc. eGalaxTouch EXC7200-1501v1010" "Evdev Axis Calibration" 32 15 32000 20 33000 | "eGalax Inc. eGalaxTouch EXC7200-1501v1010" "Evdev Axis Inversion" 8 1 1 | "eGalax Inc. eGalaxTouch EXC7200-1501v1010" "Coordinate Transformation Matrix" 32 0 -1 1 1 0 0 0 0 1
Thanks a lot

Fix Coordinate Transformation Matrix in config file

Posted: 16 Oct 2017, 12:19
by fanthom
If you calibrate touchscreen in the wizard then rotate screen (screen_settings= parameter) then touch input should be rotated automatically.

Sample:

Code: Select all

screen_settings=HDMI-0:1920x1080:60.00:normal:left:normal
Thanks

Fix Coordinate Transformation Matrix in config file

Posted: 16 Oct 2017, 13:37
by b0bbywan
Doesn't seem to be the case, these are my screen_settings (which were generated by the wizard) :

Code: Select all

screen_settings=DP2:disabled VGA1:1024x768:60.00:normal:right:normal

Fix Coordinate Transformation Matrix in config file

Posted: 16 Oct 2017, 15:31
by fanthom
Please post your 'touchscreen_calibration=' parameter.

Thanks

Fix Coordinate Transformation Matrix in config file

Posted: 16 Oct 2017, 15:40
by b0bbywan

Code: Select all

screen_settings=DP2:disabled VGA1:1024x768:60.00:normal:right:normal
touchscreen_calibration="eGalax Inc. eGalaxTouch EXC7200-1501v1010" "Evdev Axis Calibration" 32 15 32000 20 33000 | "eGalax Inc. eGalaxTouch EXC7200-1501v1010" "Evdev Axis Inversion" 8 1 1 | "eGalax Inc. eGalaxTouch EXC7200-1501v1010" "Coordinate Transformation Matrix" 32 0 -1 1 1 0 0 0 0 1
In /opt/scripts/calibrate.sh it translates with

Code: Select all

#!/bin/sh

xinput set-int-prop "eGalax Inc. eGalaxTouch EXC7200-1501v1010" "Evdev Axis Calibration" 32 15 32000 20 33000
xinput set-int-prop "eGalax Inc. eGalaxTouch EXC7200-1501v1010" "Evdev Axis Inversion" 8 1 1
xinput set-int-prop "eGalax Inc. eGalaxTouch EXC7200-1501v1010" "Coordinate Transformation Matrix" 32 0 -1 1 1 0 0 0 0 1
but last line doesn't work

Thanks for your help :)

Fix Coordinate Transformation Matrix in config file

Posted: 16 Oct 2017, 17:31
by fanthom
No need for a third line as touch is rotated by screen_settings= parameter already (it runs /opt/scripts/rotate-touch script).

Please try these parameters:

Code: Select all

screen_settings=DP2:disabled VGA1:1024x768:60.00:normal:right:normal
touchscreen_calibration="eGalax Inc. eGalaxTouch EXC7200-1501v1010" "Evdev Axis Calibration" 32 15 32000 20 33000 | "eGalax Inc. eGalaxTouch EXC7200-1501v1010" "Evdev Axis Inversion" 8 1 1
If it wont work then try these two:

Code: Select all

screen_settings=DP2:disabled VGA1:1024x768:60.00:normal:right:normal
touchscreen_calibration="eGalax Inc. eGalaxTouch EXC7200-1501v1010" "Evdev Axis Calibration" 32 15 32000 20 33000
Thanks

Fix Coordinate Transformation Matrix in config file

Posted: 17 Oct 2017, 13:17
by b0bbywan
Tried both and neither work

I have to execute

Code: Select all

xinput set-prop $TOUCHSCREEN "Coordinate Transformation Matrix" 0 -1 1 1 0 0 0 0 1
to get calibration working proprely

I tried the following (randomly, I admit) :

Code: Select all

xinput set-int-prop "eGalax Inc. eGalaxTouch EXC7200-1501v1010" "Coordinate Transformation Matrix" 32 0 -1 1 1 0 0 0 0 1
xinput set-int-prop "eGalax Inc. eGalaxTouch EXC7200-1501v1010" "Coordinate Transformation Matrix" 32 -1 1 1 0 0 0 0 1
xinput set-int-prop "eGalax Inc. eGalaxTouch EXC7200-1501v1010" "Coordinate Transformation Matrix" 8 0 -1 1 1 0 0 0 0 1
but all throw the same error

Code: Select all

X Error:  BadValue
  Request Major code 131 (XInputExtension)
  Request Minor code 57 ()
  Value 0x87
  Error Serial #19
  Current Serial #20

Fix Coordinate Transformation Matrix in config file

Posted: 17 Oct 2017, 16:35
by fanthom
Please post the output of following command:

Code: Select all

xinput_calibrator  --list
Please also set the screen to normal position and calibrate it from command line:

Code: Select all

xinput_calibrator --output-type xinput
then send me the output printed in terminal.

Thanks

Fix Coordinate Transformation Matrix in config file

Posted: 17 Oct 2017, 19:04
by b0bbywan

Code: Select all

xinput_calibrator  --list
Device "DIALOGUE INC PenMount USB" id=10
Device "eGalax Inc. eGalaxTouch EXC7200-1501v1010" id=11
Device "eGalax Inc. eGalaxTouch EXC7200-1501v1010 Pen" id=12
I'll give you the result for the calibration when I have physical access to the machine.

About the need for the screen to be in normal position, is it because xinput_calibrator doesn't rotate with the screen ? I had a real hard time finding those settings without seeing the downside crosses :D

Do I have to put

Code: Select all

screen_settings=DP2:disabled VGA1:1024x768:60.00:normal:normal:normal
in the settings ? (it doesn't work at all if DP2 is enabled)

Thanks

Fix Coordinate Transformation Matrix in config file

Posted: 17 Oct 2017, 19:22
by fanthom
"About the need for the screen to be in normal position, is it because xinput_calibrator doesn't rotate with the screen ?"
Correct.

"Do I have to put
screen_settings=DP2:disabled VGA1:1024x768:60.00:normal:normal:normal
in the settings ? (it doesn't work at all if DP2 is enabled)"
Yes

Kiosk system recognizes 3 touch devices and it makes things more complicated.
You need to calibrate each device using these commands:

Code: Select all

xinput_calibrator --output-type xinput --device 10
xinput_calibrator --output-type xinput --device 11
xinput_calibrator --output-type xinput --device 12
Device number could be different, check it by running 'xinput_calibrator --list' command.

Please post terminal output of all 3 commands posted above.

Thanks