Touch Screen Axis inverted on Colibri

I have a Colibri iMX6 with a Viola carrier board and an EDT 3.5" display with resistive touch. I built a console-trdx-image where I completely removed the X11 and wayland components. So the display is controlled by eglfs.

Now a running Qt application, which works fine, but the touch screen axes are inverted. As I don’t have a X11, I cannot calibrate the touch screen with xinput_calibrator. Also I cannot find the command ts_calibrate.

Any ideas how to fix this?


Have you tried to add tslib to your image?


Yes tslib seems to be installed:

root@colibri-imx6:~# opkg install tslib
Package libts-1.0-0 (1.1-r0) installed in root is up to date.

I also enabled the tslib-Qt-backend with PACKAGECONFIG_append_pn-qtbase = " tslib"


Just looked into the tslib recipe. The command line tool has been split out into its own package.
It seems that you also need the tslib-calibrate package.


Thanks, now I can use ts_calibrate. However, my Qt application doesn’t make use of the calibration file. I read about some environment variables yesterday, but I can’t remember their names or the pages I found them. Or is it something different?

I just got it. Had to set the QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS environment variable. So root@colibri-imx6:~# export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=rotate=180 will do it!

Thanks for helping!