Touch Screen Calibration Not Running Properly

Qt4 x11 taget image for colibri_imx6 module comes with a qt4-x11-demo-init script, which calls a calibration script file (“xinput_calibrator_once.sh”) to run touch screen calibration application before the qt demo application is executed. But we have never seen a screen fired up for us to do calibration before the qt demo runs. We did make sure the calibration data file ("/etc/pointercal.xinput") does not exist so that calibration is always required every time Linux starts up.

However if executing the calibration script manually at command line, we do see a calibration screen and the calibration is working just fine.

Hi

Starting the calibration likely never worked in that script, sorry.

Also the script uses a very minimalistic way of starting X11.

Probably moving the calibration after the start of the qt application in the following way solves your use case:

--- /usr/bin/qt4-x11-demo-init.orig
+++ /usr/bin/qt4-x11-demo-init
@@ -28,14 +28,14 @@
 			QWS_MOUSE_PROTO=tslib:$TSLIB_TSDEVICE $QTDEMO &
 		fi
 	else
-		if [ -e "/usr/bin/xinput_calibrator_once.sh" ]; then
-			xinput_calibrator_once.sh
-		fi
 		if [ "$QTVARIANT" == X11 ]; then
 			Xorg &
 			export DISPLAY=:0
 		fi
 		eval $QTDEMO &
+		if [ -e "/usr/bin/xinput_calibrator_once.sh" ]; then
+			/bin/sh -c "sleep 5; xinput_calibrator_once.sh; exit" &
+		fi
 	fi
 	;;
   stop)
@@ -56,5 +56,5 @@
 	exit 1
 	;;
 esac
-
+echo "exit 0"
 exit 0

If that is to simplistic one probably would have to add xinit to the image and rework the startup of X11, calibration and the qt application into ‘startx’, /etc/X11/xinit/xinitrc.

Max