I’m using a VF61 module with Iris carrier board and a EDT 5.7 resistive touch screen. The software stack I’m using on the board is boo2qt 5.7 for Colibri-VF. Right now everything is find except the touch screen axes (both X and Y) are inverted, it feels like the touch coordinates are 180 degreen rotated (top-left corner is bottom-right, top-right is bottom-left). I used the ts_calibrate tool to re-calibrate the touchscreen and it doesn’t help.
A wired thing is that when I switched to a VF50 module (only change the module, exactly the same touch screen, carrier board and even same SD card with same system on it), the touch screen coordinates are just fine. The question is how can I fix this?
Can you provide us details about the kernel version used on boot2qt?
Quickly checked on our prebuild Linux image with ts_calibrate and ts_test, it is working as expected.
The VF61 and VF50 use different touch controller, and especially I think the VF61 has inverted axes by default. ts_calibrate should solve the problem, however you need to make sure that your Qt application is making use of libts. I ended up with the following lines to /etc/appcontroller.conf:
Hi, Thanks a lot for your help. I’ve added these lines to appcontroller.conf and did the calibration with ts_calibrate, now the touch behavior is a bit strange. When I touch somewhere (e.g. top-left corner), it seems like both top-left corner and bottom-right corner are touched, or it seems like random, sometimes it shows top-left corner is touched, sometimes shows the bottom-right corner is touched. It gives me a feeling that my application get 2 sets of events, one set of event is calibrated, one set of event is not calibrated. Do you have any idea what could go wrong?
I finally get it work. With some help from Qt company, I understand that the issue is caused by 2 different events coming from both tslib and Qt’s evdev. So in addition to the settings above one more line need to be added into /etc/appcontroller.conf to disable the input. In this case (VF61) it is:
I have similar issue on my colibri imx6 module with boot2qt 5.7. My touch screen x axis is inverted and y axis is not.
My appcontroller.conf was like this:
env=FB_MULTI_BUFFER=2
env=QML2_IMPORT_PATH=/data/user/qt/qmlplugins
env=QT_IM_MODULE=qtvirtualkeyboard
env=QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/event0
env=QT_GSTREAMER_CAMERABIN_VIDEOSRC=mxc_v4l2=imxv4l2videosrc,v4l2src
env=QT_QUICK_CONTROLS_STYLE=Flat
env=XDG_RUNTIME_DIR=/tmp
base=linux
platform=colibri-imx6
With this configuration, I had to click on x axis opposite position of a button on screen to make the button respond.
I added the following those variables mentioned in the posts to the configuration file :
env=QT_QPA_GENERIC_PLUGINS=tslib
env=QT_QPA_EGLFS_TSLIB=1
env=TSLIB_TSDEVICE=/dev/input/touchscreen0
env=TSLIB_CALIBFILE=/etc/pointercal
env=QT_QPA_FB_DISABLE_INPUT=1
The x axis is still inverted like before. But now if I double click on the button, it will also respond. It seems to me that double clicks make the x coordinates double inverted ( same as no inversion) then the button responds.
Here is my kernel version:
Linux b2qt-colibri-imx6 3.14.52-00011-g9f2723e #1 SMP Tue Aug 2 09:03:31 MDT 2016 armv7l GNU/Linux
When using TSLib, there is no explicit way to invert the touch screens X-axis. However, after using ts_calibrate tslib should invert the X axis by using the pointercal values. Did you run ts_calibrate before using the mentioned /etc/appcontroller.conf settings?
Yes, I ran ts_calibrate before and after appcontroller.conf was modified. I also tried to delete /etc/pointcal file before running ts_calibrate. Nothing helps.
I had the same issue running a qt4e image. Based at the build: bitbake qt4e-demo-image.
The funny thing was that when I started the application by myself works fine, and when start automatically after boor using systemd, than I had all touch input inverted.
I solve this issue by changing the file: /lib/systemd/system/qtdemo.service
In my case, I saw that the appcontroller.conf wasn’t that friendly. So I solved this issue removing some environments from there and adding at somewhere else.