So i strugled with getting my old eGalax 7" touchscreen to work with OctoPi Buster. Strugled with various information from various places on the net. Trying to figure it out myselves, wich i did not actually :P
So what i found was that my touchscreen was swapped with x and y, note that it was inverted too. When i finally gave up, my touchscreen section looked like this.
Section "InputClass"
Identifier "calibration"
MatchProduct "eGalax Inc. USB TouchController"
Driver "egalax"
#MatchProduct "stmpe-ts"
Option "MinX" "61825"
Option "MaxX" "1388"
Option "MinY" "59077"
Option "MaxY" "5229"
Option "SwapXY" "1" # unless it was already set to 1
#Option "InvertY" "0"
#Option "InvertX" "0"
EndSection
Nothing worked still, so i tried CTM, wich actually did something for me! Now everything i found did not point me in the right direction, tried everything except actually learn how CTM worked. But then i found it!
DISPLAY=:0.0 xinput set-prop 6 "Coordinate Transformation Matrix" 0 1 0 1 0 0 0 0 1
Well, i am gonna give the source for this :D Source: https://github.com/notro/fbtft/issues/445
My final touchscreen looked like this.
Section "InputClass"
Identifier "calibration"
MatchProduct "eGalax Inc. USB TouchController"
Driver "egalax"
Option "TransformationMatrix" "0 1 0 1 0 0 0 0 1"
EndSection
This is in "/usr/share/X11/xorg.conf.d/99-calibration.conf"
Little different for me on Odroid. Installing all dependencies. sudo apt-get install libx11-dev libxext-dev libxi-dev x11proto-input-dev xinput xinput_calibrator Then DISPLAY=:0 xinput_calibrator
After calibration, do as said. Reboot.