Touch rotation on Ubuntu 18.04 and 20.04

Hugh Chang perceiv2 at gmail.com
Thu Oct 22 05:46:17 UTC 2020


(Resending email due to a html problem with my email. Sorry for the
inconvenience.)

Dear Peter Hutterer,

>>     Driver "evdev" for Ubuntu 16.04, "libinput" for Ubuntu 18.04/20.04
>
> just skip this line and let the default snippets take care of it. Given
that
> this is a server option anyway, you don't need to assign a driver.

I removed the "Driver" line and verified that it works well on Ubuntu
16.04, 18.04, and 20.04. Thank you very much for the great tip.

> run xinput watch-props "whatever device name" to check if it is being
reset.
> could be that something in your desktop environment is interfering, but
> given it works on 20.04 whatever it is is likely fixed since.

I added
    /home/touch/watch-matrix.sh &
    /home/touch/set-matrix.sh &
to ~/.profile.

    touch at touchDT:~$ cat watch-matrix.sh
    #!/bin/bash
    /usr/bin/gnome-terminal -e "/usr/bin/xinput watch-props 10"

    touch at touchDT:~$ cat 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

The output was

Device 'Kortek Kortek Touch':
    Device Enabled (161):    1
    Coordinate Transformation Matrix (163):    0.000000, -0.500000,
0.500000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000
    libinput Calibration Matrix (298):    1.000000, 0.000000, 0.000000,
0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    libinput Calibration Matrix Default (299):    1.000000, 0.000000,
0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    libinput Send Events Modes Available (281):    1, 0
    libinput Send Events Mode Enabled (282):    0, 0
    libinput Send Events Mode Enabled Default (283):    0, 0
    Device Node (284):    "/dev/input/event3"
    Device Product ID (285):    10597, 20515
Property 'Coordinate Transformation Matrix' changed.
    Coordinate Transformation Matrix (163):    1.000000, 0.000000,
0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Property 'Coordinate Transformation Matrix' changed.
    Coordinate Transformation Matrix (163):    1.000000, 0.000000,
0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Property 'Coordinate Transformation Matrix' changed.
    Coordinate Transformation Matrix (163):    1.000000, 0.000000,
0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Property 'Coordinate Transformation Matrix' changed.
    Coordinate Transformation Matrix (163):    1.000000, 0.000000,
0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Property 'Coordinate Transformation Matrix' changed.
    Coordinate Transformation Matrix (163):    1.000000, 0.000000,
0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Property 'Coordinate Transformation Matrix' changed.
    Coordinate Transformation Matrix (163):    1.000000, 0.000000,
0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Property 'Coordinate Transformation Matrix' changed.
    Coordinate Transformation Matrix (163):    1.000000, 0.000000,
0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Property 'Coordinate Transformation Matrix' changed.
    Coordinate Transformation Matrix (163):    0.000000, -0.500000,
0.500000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000

So I could see that my matrix value is undesirably overwritten 7 times to
the identy matrix on Ubuntu 18.04.
Now I want to identify what package I should update on Ubuntu 18.04 to
solve this problem.
It is because my customer won't change the OS version and I need to
recommend things to solve it.
Would you recommend which are the possible candidate packages to update,
please?
I'll appreciate any clue and I'm willing to try as much as I can.
My current installation is the clean ubuntu-18.04.5-desktop-amd64.iso.

> GNOME's mutter has an automatic touch screen mapping using heuristics.
This
> may be the reason it fails on 18.04 if the heuristics get confused.

Thank you very much for this great information.
I'll investigate the source code of GNOME's mutter to find why EETI
(eGalaxTouch) works well and the other does not on Ubuntu 20.04 (not 18.04).

Best regards,
Hugh Chang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.x.org/archives/xorg/attachments/20201022/bac9b369/attachment.htm>


More information about the xorg mailing list