Solved Noob needs help with Elo Touchscreen
-
Thank you for your reply. I have it finally working. With the following environment variables. Especially the LD_PRELOAD was important. After adding that variable the touchscreen starting to work. I think its because I used tslib from github . Thanks for you patience.
Environment variables
LD_LIBRARY_PATH=/usr/local/lib LD_PRELOAD=/usr/local/lib/libts-0.0.so.0 QT_DEBUG_PLUGINS=1 QT_PLUGIN_PATH=/usr/lib/plugins QT_QPA_FONTDIR=/usr/lib/fonts QT_QPA_GENERIC_PLUGINS=tslib:/dev/input/event0 QT_QPA_PLATFORM=eglfs QT_QPA_PLATFORM_PLUGIN_PATH=/usr/lib/plugins/platforms TSLIB_CALIBFILE=/home/pi/pointercal TSLIB_CONFFILE=/usr/local/etc/ts.conf TSLIB_CONSOLEDEVICE=none TSLIB_FBDEVICE=/dev/fb0 TSLIB_PLUGINDIR=/usr/local/lib/ts TSLIB_TSDEVICE=/dev/input/event0 TSLIB_TSEVENTTYPE=INPUT
-
So you have it working now properly ?
-
Well, I tought it works completely but there is one problem. When I push on the MouseArea the cursor is going to that position where I push but most of the time there is not a onclicked event triggered. When I push multiple times on the mousearea sometime the onclick event will be triggered, maybe 1 out of 10 á 15 times.
I have connected the touchscreen to a Windows machine en every push on the screen is triggered. This is why I thing that there is something wrong with my tslib configuration.
Can you help me with this problem?
-
Did you run ts_calibrate ?
-
Yes, and it works fine. I also got a pointercal file. And ts_test works also. Maybe the debug output is usefull.
QML debugging is enabled. Only use this in a safe environment. QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qt5pi/plugins" ... QFactoryLoader::QFactoryLoader() checking directory path "/opt/test2/bin" ... QFactoryLoader::QFactoryLoader() looking at "/opt/test2/bin/test2" "Plugin verification data mismatch in '/opt/test2/bin/test2'" not a plugin QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qt5pi/plugins/platforms" ... QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqeglfs.so" Found metadata in lib /usr/local/qt5pi/plugins/platforms/libqeglfs.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "eglfs" ] }, "className": "QEglFSIntegrationPlugin", "debug": false, "version": 329218 } Got keys from plugin meta data ("eglfs") QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqlinuxfb.so" Found metadata in lib /usr/local/qt5pi/plugins/platforms/libqlinuxfb.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "linuxfb" ] }, "className": "QLinuxFbIntegrationPlugin", "debug": false, "version": 329218 } Got keys from plugin meta data ("linuxfb") QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqminimal.so" Found metadata in lib /usr/local/qt5pi/plugins/platforms/libqminimal.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimal" ] }, "className": "QMinimalIntegrationPlugin", "debug": false, "version": 329218 } Got keys from plugin meta data ("minimal") QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqminimalegl.so" Found metadata in lib /usr/local/qt5pi/plugins/platforms/libqminimalegl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimalegl" ] }, "className": "QMinimalEglIntegrationPlugin", "debug": false, "version": 329218 } Got keys from plugin meta data ("minimalegl") QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqoffscreen.so" Found metadata in lib /usr/local/qt5pi/plugins/platforms/libqoffscreen.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "offscreen" ] }, "className": "QOffscreenIntegrationPlugin", "debug": false, "version": 329218 } Got keys from plugin meta data ("offscreen") QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqxcb.so" Found metadata in lib /usr/local/qt5pi/plugins/platforms/libqxcb.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "xcb" ] }, "className": "QXcbIntegrationPlugin", "debug": false, "version": 329218 } Got keys from plugin meta data ("xcb") QFactoryLoader::QFactoryLoader() checking directory path "/opt/test2/bin/platforms" ... loaded library "/usr/local/qt5pi/plugins/platforms/libqeglfs.so" QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qt5pi/plugins/egldeviceintegrations" ... QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/egldeviceintegrations/libqeglfs-brcm-integration.so" Found metadata in lib /usr/local/qt5pi/plugins/egldeviceintegrations/libqeglfs-brcm-integration.so, metadata= { "IID": "org.qt-project.qt.qpa.egl.QEGLDeviceIntegrationFactoryInterface.5.5", "MetaData": { "Keys": [ "eglfs_brcm" ] }, "className": "QEglFSBrcmIntegrationPlugin", "debug": false, "version": 329218 } Got keys from plugin meta data ("eglfs_brcm") QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/egldeviceintegrations/libqeglfs-kms-integration.so" Found metadata in lib /usr/local/qt5pi/plugins/egldeviceintegrations/libqeglfs-kms-integration.so, metadata= { "IID": "org.qt-project.qt.qpa.egl.QEGLDeviceIntegrationFactoryInterface.5.5", "MetaData": { "Keys": [ "eglfs_kms" ] }, "className": "QEglFSKmsIntegrationPlugin", "debug": false, "version": 329218 } Got keys from plugin meta data ("eglfs_kms") QFactoryLoader::QFactoryLoader() checking directory path "/opt/test2/bin/egldeviceintegrations" ... loaded library "/usr/local/qt5pi/plugins/egldeviceintegrations/libqeglfs-brcm-integration.so" Unable to query physical screen size, defaulting to 100 dpi. To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters). QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qt5pi/plugins/generic" ... QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/generic/libqevdevkeyboardplugin.so" Found metadata in lib /usr/local/qt5pi/plugins/generic/libqevdevkeyboardplugin.so, metadata= { "IID": "org.qt-project.Qt.QGenericPluginFactoryInterface", "MetaData": { "Keys": [ "EvdevKeyboard" ] }, "className": "QEvdevKeyboardPlugin", "debug": false, "version": 329218 } Got keys from plugin meta data ("evdevkeyboard") QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/generic/libqevdevmouseplugin.so" Found metadata in lib /usr/local/qt5pi/plugins/generic/libqevdevmouseplugin.so, metadata= { "IID": "org.qt-project.Qt.QGenericPluginFactoryInterface", "MetaData": { "Keys": [ "EvdevMouse" ] }, "className": "QEvdevMousePlugin", "debug": false, "version": 329218 } Got keys from plugin meta data ("evdevmouse") QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/generic/libqevdevtabletplugin.so" Found metadata in lib /usr/local/qt5pi/plugins/generic/libqevdevtabletplugin.so, metadata= { "IID": "org.qt-project.Qt.QGenericPluginFactoryInterface", "MetaData": { "Keys": [ "EvdevTablet" ] }, "className": "QEvdevTabletPlugin", "debug": false, "version": 329218 } Got keys from plugin meta data ("evdevtablet") QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/generic/libqevdevtouchplugin.so" Found metadata in lib /usr/local/qt5pi/plugins/generic/libqevdevtouchplugin.so, metadata= { "IID": "org.qt-project.Qt.QGenericPluginFactoryInterface", "MetaData": { "Keys": [ "EvdevTouch" ] }, "className": "QEvdevTouchScreenPlugin", "debug": false, "version": 329218 } Got keys from plugin meta data ("evdevtouch") QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/generic/libqlibinputplugin.so" Found metadata in lib /usr/local/qt5pi/plugins/generic/libqlibinputplugin.so, metadata= { "IID": "org.qt-project.Qt.QGenericPluginFactoryInterface", "MetaData": { "Keys": [ "libinput" ] }, "className": "QLibInputPlugin", "debug": false, "version": 329218 } Got keys from plugin meta data ("libinput") QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/generic/libqtslibplugin.so" Found metadata in lib /usr/local/qt5pi/plugins/generic/libqtslibplugin.so, metadata= { "IID": "org.qt-project.Qt.QGenericPluginFactoryInterface", "MetaData": { "Keys": [ "Tslib", "TslibRaw" ] }, "className": "QTsLibPlugin", "debug": false, "version": 329218 } Got keys from plugin meta data ("tslib", "tslibraw") QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/generic/libqtuiotouchplugin.so" Found metadata in lib /usr/local/qt5pi/plugins/generic/libqtuiotouchplugin.so, metadata= { "IID": "org.qt-project.Qt.QGenericPluginFactoryInterface", "MetaData": { "Keys": [ "TuioTouch" ] }, "className": "QTuioTouchPlugin", "debug": false, "version": 329218 } Got keys from plugin meta data ("tuiotouch") QFactoryLoader::QFactoryLoader() checking directory path "/opt/test2/bin/generic" ... loaded library "/usr/local/qt5pi/plugins/generic/libqtslibplugin.so" Found metadata in lib /usr/local/qt5pi/qml/QtQuick.2/libqtquick2plugin.so, metadata= { "IID": "org.qt-project.Qt.QQmlExtensionInterface/1.0", "MetaData": { }, "className": "QtQuick2Plugin", "debug": false, "uri": [ "QtQuick.2" ], "version": 329218 } loaded library "/usr/local/qt5pi/qml/QtQuick.2/libqtquick2plugin.so" Found metadata in lib /usr/local/qt5pi/qml/QtQuick/Window.2/libwindowplugin.so, metadata= { "IID": "org.qt-project.Qt.QQmlExtensionInterface/1.0", "MetaData": { }, "className": "QtQuick2WindowPlugin", "debug": false, "uri": [ "QtQuick.Window.2" ], "version": 329218 } loaded library "/usr/local/qt5pi/qml/QtQuick/Window.2/libwindowplugin.so" QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qt5pi/plugins/accessible" ... QFactoryLoader::QFactoryLoader() checking directory path "/opt/test2/bin/accessible" ... User requested stop. Shutting down... Application finished with exit code 1.
-
What parameter are you passing to your application ?
-
LD_LIBRARY_PATH=/usr/local/lib QT_DEBUG_PLUGINS=1 QT_PLUGIN_PATH=/usr/lib/qt5pi/plugins QT_QPA_EGLFS_HIDECURSOR=1 QT_QPA_FB_DISABLE_INPUT=1 QT_QPA_FONTDIR=/usr/lib/fonts QT_QPA_GENERIC_PLUGINS=tslib:/dev/input/event0 QT_QPA_PLATFORM=eglfs QT_QPA_PLATFORM_PLUGIN_PATH=/usr/lib/qt5pi/plugins/platforms TSLIB_CALIBFILE=/usr/local/etc/pointercal TSLIB_CONFFILE=/usr/local/etc/ts.conf TSLIB_CONSOLEDEVICE=none TSLIB_FBDEVICE=/dev/fb0 TSLIB_PLUGINDIR=/usr/local/lib/ts TSLIB_TSDEVICE=/dev/input/event0 TSLIB_TSEVENTTYPE=INPUT
This are all the environment variable. Arguments field is empty.
When i insert a USB mouse into the raspberry the mouse works directly and every mouseclick is triggered
-
[edit]
Adding one more variable did the trick.
QT_QPA_EGLFS_DISABLE_INPUT=1
Thank you for your help. It now works totally fine. Topic can be set as Solved
-
Great !
Thanks for sharing your findings !
You can mark it as solved :) Use the "Topic Tool" button and change the type of the thread to a question, then you'll be able to mark it as solved :)
-
I just started from scratch with my raspberry pi and ubuntu installation. I first installed my raspberry pi with tslib from kergoth. After that I followed the cross compile tutorial RaspberryPi2EGLFS. When I was done I opened my QT project and tried to run the project, but now I get a segmentation fault error. Could some tell me what's wrong?
Application Output in QT Creator
Got keys from plugin meta data ("tuiotouch") QFactoryLoader::QFactoryLoader() checking directory path "/opt/Test/bin/generic" ... loaded library "/usr/local/qt5pi/plugins/generic/libqtslibplugin.so" bash: line 1: 13629 Segmentation fault DISPLAY=':0.0' LD_LIBRARY_PATH='/usr/local/lib' QT_DEBUG_PLUGINS='1' QT_PLUGIN_PATH='/usr/lib/qt5pi/plugins' QT_QPA_EGLFS_DISABLE_INPUT='1' QT_QPA_EGLFS_HIDECURSOR='0' QT_QPA_FB_TSLIB='1' QT_QPA_FONTDIR='/usr/lib/fonts' QT_QPA_GENERIC_PLUGINS='tslib:/dev/input/event0' QT_QPA_PLATFORM='eglfs' QT_QPA_PLATFORM_PLUGIN_PATH='/usr/lib/qt5pi/plugins/platforms' TSLIB_CALIBFILE='/usr/local/etc/pointercal' TSLIB_CONFFILE='/usr/local/etc/ts.conf' TSLIB_CONSOLEDEVICE='none' TSLIB_FBDEVICE='/dev/fb0' TSLIB_PLUGINDIR='/usr/local/lib/ts' TSLIB_TSDEVICE='/dev/input/event0' TSLIB_TSEVENTTYPE='INPUT' WIRINGPI_GPIOMEM='1' /opt/Test/bin/Test
-
Start it with the debugger then you'll be able to get a stack trace.
-
Sorry for reopening this issue. It seems to be that i forgot a crucial part of my notes for reinstalling my setup. After following the steps on this page I've got it working again. Thanks for replying again.