Could this be the end of all touch screen calibration issues?

The configuration file is a single, monolithic configuration for all and any touch interfaces. For example one of mine looks like this:

Section "InputClass" # Created 2021-01-03 01:34:00.998969
        Identifier "calibration"
        MatchProduct "Fondar Fondar USB Touch"
        Option "TransformationMatrix" "1.012429 0.000000 -0.004237 0.000000 0.985915 0.010329 0.000000 0.000000 1.000000" # updated 2021-01-03 09:58:09.274197
EndSection

Section "InputClass" # Created 2021-01-03 10:36:05.087244
        Identifier "calibration"
        MatchProduct "Wacom Intuos PT S Pen stylus"
        Option "TransformationMatrix" "0.823908 0.000000 0.026897 0.000000 -0.935412 0.946659 0.000000 0.000000 1.000000" # updated 2021-01-03 10:37:50.895213
EndSection

It has two entries, one for each of the absolute x-y controllers that I have configured on that device. (The USB touch screen and a wacom tablet I used to test device detection.)

I suggest we have a master copy of the configuration that holds the default settings we know about. This would be held in version control and can be used to restore to defaults by overwriting the live copy. We then have the live copy in /etc/X11/xorg.conf.d which the calibration code updates.

We would not need device specific configuration files and calibration would not need to be updated when changing display from webconf. All displays’ configurations are held in one file.

I could upload a default config with the default settings we already know if you tell me where to stick it. I would have guessed https://github.com/zynthian/zynthian-sys/tree/master/etc/X11/xorg.conf.d but that has a file that does not actually exist on my system.

[Edit] We don’t need to add any configurations that use their defaults, e.g. my USB Fondar does not need a configuration because it will work out of the box with its defaults. If a user installs a screen upside down then they can simply calibrate to override such default.

I have looked at the existing configurations in github and believe we only have these:

# Zynthian xserver touchscreen calibration configuration

Section "InputClass"
        Identifier "calibration"
        MatchProduct "ADS7846 Touchscreen"
        Option "TransformationMatrix" "-1 0 1 0 -1 1 0 0 1"
EndSection

Section "InputClass"
        Identifier "calibration"
        MatchProduct "stmpe-ts"
        Option "TransformationMatrix" "0 -1 1 1 0 0 0 0 1"
EndSection

Although there are several different screen configurations, most use the same ADS7846 Touchscreen.

If anyone else has other screen configs then tell us here.