Fix Coordinate Transformation Matrix in config file

Post tutorials, HOWTO's and other useful resources here.
Post Reply
b0bbywan
White ninja
White ninja
Posts: 7
Joined: 05 Sep 2017, 15:49
Distribution: Porteus Kiosk

Fix Coordinate Transformation Matrix in config file

Post#1 by b0bbywan » 16 Oct 2017, 10:32

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

User avatar
fanthom
Site Admin
Site Admin
Posts: 4621
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Fix Coordinate Transformation Matrix in config file

Post#2 by fanthom » 16 Oct 2017, 12:19

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
Please add [Solved] to your thread title if the solution was found.

b0bbywan
White ninja
White ninja
Posts: 7
Joined: 05 Sep 2017, 15:49
Distribution: Porteus Kiosk

Fix Coordinate Transformation Matrix in config file

Post#3 by b0bbywan » 16 Oct 2017, 13:37

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

User avatar
fanthom
Site Admin
Site Admin
Posts: 4621
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Fix Coordinate Transformation Matrix in config file

Post#4 by fanthom » 16 Oct 2017, 15:31

Please post your 'touchscreen_calibration=' parameter.

Thanks
Please add [Solved] to your thread title if the solution was found.

b0bbywan
White ninja
White ninja
Posts: 7
Joined: 05 Sep 2017, 15:49
Distribution: Porteus Kiosk

Fix Coordinate Transformation Matrix in config file

Post#5 by b0bbywan » 16 Oct 2017, 15:40

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 :)

User avatar
fanthom
Site Admin
Site Admin
Posts: 4621
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Fix Coordinate Transformation Matrix in config file

Post#6 by fanthom » 16 Oct 2017, 17:31

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
Please add [Solved] to your thread title if the solution was found.

b0bbywan
White ninja
White ninja
Posts: 7
Joined: 05 Sep 2017, 15:49
Distribution: Porteus Kiosk

Fix Coordinate Transformation Matrix in config file

Post#7 by b0bbywan » 17 Oct 2017, 13:17

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

User avatar
fanthom
Site Admin
Site Admin
Posts: 4621
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Fix Coordinate Transformation Matrix in config file

Post#8 by fanthom » 17 Oct 2017, 16:35

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
Please add [Solved] to your thread title if the solution was found.

b0bbywan
White ninja
White ninja
Posts: 7
Joined: 05 Sep 2017, 15:49
Distribution: Porteus Kiosk

Fix Coordinate Transformation Matrix in config file

Post#9 by b0bbywan » 17 Oct 2017, 19:04

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

User avatar
fanthom
Site Admin
Site Admin
Posts: 4621
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Fix Coordinate Transformation Matrix in config file

Post#10 by fanthom » 17 Oct 2017, 19:22

"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
Please add [Solved] to your thread title if the solution was found.

Post Reply