Imx7 - 7" Resistive Touch - boot2qt

Hello Together,
right now I’ve a problem with my Colibri imx7 + b2qt

I’ve installed boot2qt by easy installer and installed my first app on the module. Everything fine so far.
Also I’ve ordered the 7" resistive Touch and connected the display to my module. After configuration in uboot, it worked fine.

Right now I’ve the problem with my touch. Touch signals won’t be fired. Also I’ve added the QT_QPA_EGLFS_TSLIB=1 to my appcontroller.conf there won’t happen any touch.
Mouse works, so it’s not a problem with input in general.

Also I’ve tried calibration with ts_calibrate ant the other tool.
ts_calibrate will launch on console, but no output on display.

Hope for help
Kind regards

hi @PatrickNies

Could you provide the version of the hardware and software ( ´uname -a´ ) of your module?

Could you try to install the regular LXDE image and check if touch is working in general?

Best regards,
Jaski

At normal Linux image it works without any problems

Dear @mirza.krak and @PatrickNies

Can you try to change /etc/appcontroller.conf as follows:

env=QMLSCENE_DEVICE=softwarecontext
env=QML2_IMPORT_PATH=/data/user/qt/qmlplugins
env=QT_QPA_PLATFORM=linuxfb
env=QSG_RENDER_LOOP=basic
env=QT_IM_MODULE=qtvirtualkeyboard
env=QT_QUICK_CONTROLS_1_STYLE=Flat
env=XDG_RUNTIME_DIR=/run/user/0
env=QTWEBENGINE_DISABLE_SANDBOX=1
env=TSLIB_TSDEVICE=/dev/input/event0
env=QT_QPA_FB_TSLIB=1
env=QT_QPA_FB_NO_LIBINPUT=1
base=linux
platform=colibri-imx7

After that you should be able to calibrate the display with ts_calibrate.

I hope this helps.

Regards,
Stefan

Hi @mirza.krak
Great to hear it works now! Thanks for the feedback.
Stefan

Sorry for my late answer:

4.9.87-2.8.9+g07d40f6ffcbb #1 SMP Tue Aug 6 12:52:27 UTC 2019 armv71 armv71 armv71 GNU/Linux

Also tried a self compiled Boot2Qt with 5.12.4

I have the same issue with the same module. Though I am using Aster carrier board…

I installed boot2qt image from the Toradex Easy installer, and everything seems to work except touch.

I noticed that on this page, Qt for Device Creation (Boot to Qt) | Toradex Developer Center

It says “Colibri modules: Touch screen does not work out-of-the-box.”, which seems that this is a known problem. But does anyone know how to fix this?

Thanks for the response @stefan.tx,

I tried updating /etc/appcontroller.conf per your instructions and indeed this allowed to me to run ts_calibrate and I could see that the screen is responsive.

But the B2Qt Launcher Demo applications is now not starting, and I simply have a black screen. It prints the following error:

Aug 15 19:29:09 b2qt-colibri-imx7-emmc systemd[1]: Started B2Qt Launcher Demo.
Aug 15 19:29:09 b2qt-colibri-imx7-emmc appcontroller[285]: "DBUS_SESSION_BUS_ADDRESS" "unix:abstract=/tmp/dbus-wJhMPwEPAy,guid=3ca0facdc529475e2a46face5d55b284"
Aug 15 19:29:09 b2qt-colibri-imx7-emmc appcontroller[285]: "/usr/bin/qtlauncher" ("--applications-root", "/data/user/qt")
Aug 15 19:29:09 b2qt-colibri-imx7-emmc appcontroller[285]: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Aug 15 19:29:09 b2qt-colibri-imx7-emmc appcontroller[285]: Could not open egl display
Aug 15 19:29:09 b2qt-colibri-imx7-emmc appcontroller[285]: quit
Aug 15 19:29:09 b2qt-colibri-imx7-emmc appcontroller[285]: Application crashed: /usr/bin/qtlauncher
Aug 15 19:29:09 b2qt-colibri-imx7-emmc appcontroller[285]: Process stopped

Any idea what is going on?

Never mind, I must be tired or inpatient. The following configuration worked,

root@b2qt-colibri-imx7-emmc:~# cat /etc/appcontroller.conf                                                                                                                                                        
env=QMLSCENE_DEVICE=softwarecontext
env=QML2_IMPORT_PATH=/data/user/qt/qmlplugins
env=QT_QPA_PLATFORM=linuxfb
env=QSG_RENDER_LOOP=basic
env=QT_IM_MODULE=qtvirtualkeyboard
env=QT_QUICK_CONTROLS_1_STYLE=Flat
env=XDG_RUNTIME_DIR=/run/user/0
env=QTWEBENGINE_DISABLE_SANDBOX=1
env=TSLIB_TSDEVICE=/dev/input/event0
env=QT_QPA_FB_TSLIB=1
env=QT_QPA_FB_NO_LIBINPUT=1
base=linux
platform=colibri-imx7

Which is what you posted I believe.

For me It’'s not working…
My only difference is the platform (colibri-imx7-emmc)

env=QMLSCENE_DEVICE=softwarecontext
env=QML2_IMPORT_PATH=/data/user/qt/qmlplugins
env=QT_QPA_PLATFORM=linuxfb
env=QSG_RENDER_LOOP=basic
env=QT_IM_MODULE=qtvirtualkeyboard
env=QT_QUICK_CONTROLS_1_STYLE=Flat
env=XDG_RUNTIME_DIR=/run/user/0
env=QTWEBENGINE_DISABLE_SANDBOX=1
env=TSLIB_TSDEVICE=/dev/input/event0
env=QT_QPA_FB_TSLIB=1
env=QT_QPA_FB_NO_LIBINPUT=1
base=linux
platform=colibri-imx7-emmc

it worked for me once to calibate.
This moment I could not launch any software … right now it’s impossible to calibrate, but I can launch Software …

Why do you set the platform to colibri-imx7-emmc?

Have tried both … with and without emmc
But I’ve the emmc version (1GB Dual) of the imx7 and it was set there by default

Thanks for the info. So you still are not able to calibrate?

Here is what I do on Boot to Qt for Embedded Linux 2.6.1 b2qt-colibri-imx7-emmc. The resistive touch works.
First disable default Qt demo and launch calibration after reboot. systemctl disable qtlauncher.service and reboot.
ts_calibrate to calibrate touch.
When calibration finishes, /etc/pointercal will be found. And modify /etc/appcontroller.conf.

env=QMLSCENE_DEVICE=softwarecontext
env=QML2_IMPORT_PATH=/data/user/qt/qmlplugins
env=QT_QPA_PLATFORM=linuxfb
env=QSG_RENDER_LOOP=basic
env=QT_IM_MODULE=qtvirtualkeyboard
env=QT_QUICK_CONTROLS_1_STYLE=Flat
env=XDG_RUNTIME_DIR=/run/user/0
env=QTWEBENGINE_DISABLE_SANDBOX=1
env=TSLIB_TSDEVICE=/dev/input/event0
env=QT_QPA_FB_TSLIB=1
env=QT_QPA_FB_NO_LIBINPUT=1
env=QT_QPA_GENERIC_PLUGINS=tslib
env=TSLIB_CALIBFILE=/etc/pointercal
base=linux
platform=colibri-imx7-emmc

Don’t forget to enable qtlauncher systemctl enable qtlauncher.service. After reboot, resistive touch should work.