Touch rotation on Ubuntu 18.04 and 20.04
Hugh Chang
perceiv2 at gmail.com
Tue Oct 20 08:00:42 UTC 2020
I have a question about setting the transformation matrix value to rotate
touch coordinates on Ubuntu 18.04 and 20.04.
I used 2 portrait monitors.
+-----------+ +-----------+
| 1080x1920 | | 1080x1920 |
| (touch) | | |
| | | |
+-----------+ +-----------+
I used "TransformationMatrix" option in a configuration file.
root at touch-desktop:/usr/share/X11/xorg.conf.d# more 77-touch-matrix.conf
Section "InputClass"
Identifier "Touch rotation"
MatchUSBID "2965:*"
MatchDevicePath "/dev/input/event*"
Driver "evdev" for Ubuntu 16.04, "libinput" for Ubuntu 18.04/20.04
Option "TransformationMatrix" "0 -0.5 0.5 1 0 0 0 0 1"
EndSection
It works well on Ubuntu 16.04 and Ubuntu 20.04, but does not work on Ubuntu
18.04.
As a workaround, I'm executing "xinput set-prop" as a startup script.
touch at touchDT:~$ more .profile
/home/touch/set-matrix.sh &
touch at touchDT:~$ more set-matrix.sh
#!/bin/bash
sleep 30
/usr/bin/xinput set-prop 10 "Coordinate Transformation Matrix" 0 -0.5 0.5
1 0 0 0 0 1
I don't like it because
1) I'm using 30 seconds delay because the matrix is initialized during the
startup phase and I want to confirm that my code is executed later.
2) The matrix value is sometimes changed while the system is turned on and
under use.
Would you help me please?
--
Another related question is about eGalaxTouch.
If I change my monitor to a monitor with eGalaxTouch device,
the matrix value is automatically updated if I change the geometry of the
monitors, only on Ubuntu 20.04.
touch at touchDT:~/Desktop$ xinput list-props 13
Device 'eGalax Inc. eGalaxTouch P80H84 0765 v00T3_M02 k4.08.165':
Device Enabled (161): 1
Coordinate Transformation Matrix (163): 0.000000, -0.500000, 1.000000,
1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000
I did not install the driver of it and did not run the daemon program (
/bin/eGTouchD).
I wonder how the matrix value is set correctly and touch works well even if
I did not specify it on Ubuntu 20.04. For other touch monitors, I need to
specify it manually in a configuration file.
Would you let me know where to start my investigation please?
--
Hugh Chang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.x.org/archives/xorg/attachments/20201020/9498e7d4/attachment.htm>
More information about the xorg
mailing list