eglfs + framebuffer - display issue



  • Re: Qt & framebuffer
    Hi everyone
    I found recently topic about refreshing framebuffer. Maybe I have similar problem. Im trying to run Qt app on Allwinner A20 (Olinuxino Micro). It looks like app shows 1 frame and stops refreshing framebuffer. No problems or errors report in console, no problems with terminate from console, no premature exit with error code etc. In desktop enviroment is showing up 1 frame and desktop repainting on app layer. WTF? Anyone had similar problem?
    PS. sorry for my English
    Regards
    Rafal


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    You should also add which version of Qt you are using and to target what platform ?



  • Hi
    Qt 5.2.1 to olinuxino micro (Allwinner A20)


  • Lifetime Qt Champion

    Can you first update to a more recent version of Qt ? 5.2.1 is more than old, the current version if 5.9.1



  • Right now i'm trying to update to Qt 5.9, but i have some issues with math.h compatibility between device and Qt. When I'm done I'll tell about effects.



  • I'm trying to build Qt5.9 enviroment but configure cannot pass eglfs option:
    ERROR: Feature 'eglfs' was enabled, but the pre-condition '!config.android && !config.darwin && !config.win32 && features.egl' failed.
    Any idea?


  • Lifetime Qt Champion

    What's your complete configure line ?



  • ./configure -release -opengl es2 -nomake examples -nomake tests -opensource -confirm-license -device olinuxinoA20 -device-option CROSS_COMPILE=~/qt5.9-arm-compile/gcc-linaro-7.1.1-2017.05-i686_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot ~/qt5.9-arm-compile/sysroot -prefix /usr/local/qt5.9 -extprefix ~/qt5.9-arm7 -hostprefix ~/qt5.9-arm7-host -eglfs -v

    in sysroot are present needed includes EGL, GLES, GLES2, KHR



  • btw: on device EGL/GLES driver stack passing all tests


  • Lifetime Qt Champion

    Since you already have the -v option, can you post the failure message ?



  • complete output of configure

    • cd qtbase
    • /home/rafal/qt5.9-arm-compile/qt-everywhere-opensource-src-5.9.0/qtbase/configure -top-level -release -opengl es2 -nomake examples -nomake tests -opensource -confirm-license -device olinuxinoA20 -device-option CROSS_COMPILE=/home/rafal/qt5.9-arm-compile/gcc-linaro-7.1.1-2017.05-i686_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /home/rafal/qt5.9-arm-compile/sysroot -prefix /usr/local/qt5.9 -extprefix /home/rafal/qt5.9-arm7 -hostprefix /home/rafal/qt5.9-arm7-host -eglfs -v
      Creating qmake...
      g++ -c -o mingw_make.o -pipe -std=c++11 -ffunction-sections -g -g -I/home/rafal/qt5.9-arm-compile/qt-everywhere-opensource-src-5.9.0/qtbase/qmake -I/home/rafal/qt5.9-arm-compile/qt-everywhere-opensource-src-5.9.0/qtbase/qmake/library -I/home/rafal/qt5.9-arm-compile/qt-everywhere-opensource-src-5.9.0/qtbase/qmake/generators -I/home/rafal/qt5.9-arm-compile/qt-everywhere-opensource-src-5.9.0/qtbase/qmake/generators/unix -I/home/rafal/qt5.9-arm-compile/qt-everywhere-opensource-src-5.9.0/qtbase/qmake/generators/win32 -I/home/rafal/qt5.9-arm-compile/qt-everywhere-opensource-src-5.9.0/qtbase/qmake/generators/mac -I/home/rafal/qt5.9-arm-compile/qt-everywhere-opensource-src-5.9.0/qtbase/include -I/home/rafal/qt5.9-arm-compile/qt-everywhere-opensource-src-5.9.0/qtbase/include/QtCore -I/home/rafal/qt5.9-arm-compile/qt-everywhere-opensource-src-5.9.0/qtbase/include/QtCore/5.9.0 -I/home/rafal/qt5.9-arm-compile/qt-everywhere-opensource-src-5.9.0/qtbase/include/QtCore/5.9.0/QtCore -I../src/corelib/global -I/home/rafal/qt5.9-arm-compile/qt-everywhere-opensource-src-5.9.0/qtbase/mkspecs/linux-g++ -DQT_VERSION_STR="5.9.0" -DQT_VERSION_MAJOR=5 -DQT_VERSION_MINOR=9 -DQT_VERSION_PATCH=0 -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL -DQT_NO_FOREACH /home/rafal/qt5.9-arm-compile/qt-everywhere-opensource-src-5.9.0/qtbase/qmake/generators/win32/mingw_make.cpp
      g++ -o "../bin/qmake" project.o option.o property.o main.o ioutils.o proitems.o qmakevfs.o qmakeglobals.o qmakeparser.o qmakeevaluator.o qmakebuiltins.o makefile.o unixmake2.o unixmake.o mingw_make.o winmakefile.o projectgenerator.o meta.o makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o msvc_vcproj.o msvc_vcxproj.o msvc_nmake.o msvc_objectmodel.o msbuild_objectmodel.o qtextcodec.o qutfcodec.o qstring.o qstring_compat.o qstringbuilder.o qtextstream.o qiodevice.o qringbuffer.o qdebug.o qmalloc.o qglobal.o qarraydata.o qbytearray.o qbytearraymatcher.o qdatastream.o qbuffer.o qlist.o qfiledevice.o qfile.o qfilesystementry.o qfilesystemengine.o qfsfileengine.o qfsfileengine_iterator.o qregexp.o qbitarray.o qdir.o qdiriterator.o quuid.o qhash.o qfileinfo.o qdatetime.o qstringlist.o qabstractfileengine.o qtemporaryfile.o qmap.o qmetatype.o qsettings.o qsystemerror.o qvariant.o qvsnprintf.o qlocale.o qlocale_tools.o qlinkedlist.o qnumeric.o qcryptographichash.o qxmlstream.o qxmlutils.o qlogging.o qoperatingsystemversion.o qjson.o qjsondocument.o qjsonparser.o qjsonarray.o qjsonobject.o qjsonvalue.o qfilesystemengine_unix.o qfilesystemiterator_unix.o qfsfileengine_unix.o qlocale_unix.o qlibraryinfo.o -Wl,--gc-sections
      Command line: -release -opengl es2 -nomake examples -nomake tests -opensource -confirm-license -device olinuxinoA20 -device-option CROSS_COMPILE=/home/rafal/qt5.9-arm-compile/gcc-linaro-7.1.1-2017.05-i686_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /home/rafal/qt5.9-arm-compile/sysroot -prefix /usr/local/qt5.9 -extprefix /home/rafal/qt5.9-arm7 -hostprefix /home/rafal/qt5.9-arm7-host -eglfs -v

    This is the Qt Open Source Edition.

    You have already accepted the terms of the Open Source license.

    Running configuration tests...
    Done running configuration tests.

    Configure summary:

    Building on: linux-g++ (x86_64, CPU features: mmx sse sse2)
    Building for: devices/linux-olinuxinoA20-g++ (arm, CPU features: neon)
    Configuration: cross_compile use_gold_linker compile_examples enable_new_dtags largefile neon precompile_header shared rpath release c++11 c++14 c++1z concurrent dbus mremap reduce_exports stl
    Build options:
    Mode ................................... release
    Optimize release build for size ........ no
    Building shared libraries .............. yes
    Using C++ standard ..................... C++1z
    Using gold linker ...................... yes
    Using new DTAGS ........................ yes
    Using precompiled headers .............. yes
    Using LTCG ............................. no
    Target compiler supports:
    NEON ................................. yes
    Build parts ............................ libs
    Qt modules and options:
    Qt Concurrent .......................... yes
    Qt D-Bus ............................... yes
    Qt D-Bus directly linked to libdbus .... yes
    Qt Gui ................................. yes
    Qt Network ............................. yes
    Qt Sql ................................. yes
    Qt Testlib ............................. yes
    Qt Widgets ............................. yes
    Qt Xml ................................. yes
    Support enabled for:
    Using pkg-config ....................... yes
    QML debugging .......................... yes
    udev ................................... yes
    Using system zlib ...................... yes
    Qt Core:
    DoubleConversion ....................... yes
    Using system DoubleConversion ........ no
    GLib ................................... yes
    iconv .................................. no
    ICU .................................... yes
    Logging backends:
    journald ............................. no
    syslog ............................... no
    slog2 ................................ no
    Using system PCRE2 ..................... no
    Qt Network:
    getaddrinfo() .......................... yes
    getifaddrs() ........................... yes
    IPv6 ifname ............................ yes
    libproxy ............................... no
    OpenSSL ................................ yes
    Qt directly linked to OpenSSL ........ no
    SCTP ................................... no
    Use system proxies ..................... yes
    Qt Sql:
    DB2 (IBM) .............................. no
    InterBase .............................. no
    MySql .................................. no
    OCI (Oracle) ........................... no
    ODBC ................................... yes
    PostgreSQL ............................. yes
    SQLite2 ................................ yes
    SQLite ................................. yes
    Using system provided SQLite ......... no
    TDS (Sybase) ........................... yes
    Qt Gui:
    Accessibility .......................... yes
    FreeType ............................... yes
    Using system FreeType ................ yes
    HarfBuzz ............................... yes
    Using system HarfBuzz ................ no
    Fontconfig ............................. yes
    Image formats:
    GIF .................................. yes
    ICO .................................. yes
    JPEG ................................. yes
    Using system libjpeg ............... yes
    PNG .................................. yes
    Using system libpng ................ yes
    EGL .................................... no
    OpenVG ................................. yes
    OpenGL:
    Desktop OpenGL ....................... no
    OpenGL ES 2.0 ........................ yes
    OpenGL ES 3.0 ........................ no
    OpenGL ES 3.1 ........................ no
    Session Management ..................... yes
    Features used by QPA backends:
    evdev .................................. yes
    libinput ............................... yes
    mtdev .................................. yes
    tslib .................................. yes
    xkbcommon-evdev ........................ yes
    QPA backends:
    DirectFB ............................... no
    EGLFS .................................. no
    LinuxFB ................................ yes
    VNC .................................... yes
    Mir client ............................. no
    X11:
    Using system-provided XCB libraries .. yes
    EGL on X11 ........................... no
    Xinput2 .............................. yes
    XCB XKB .............................. yes
    XLib ................................. yes
    XCB render ........................... yes
    XCB GLX .............................. yes
    XCB Xlib ............................. yes
    Using system-provided xkbcommon ...... no
    Qt Widgets:
    GTK+ ................................... no
    Styles ................................. Fusion Windows
    Qt PrintSupport:
    CUPS ................................... yes
    Qt SerialBus:
    Socket CAN ............................. yes
    Socket CAN FD .......................... yes
    QtXmlPatterns:
    XML schema support ..................... yes
    Qt QML:
    QML interpreter ........................ yes
    QML network support .................... yes
    Qt Quick:
    Direct3D 12 ............................ no
    AnimatedImage item ..................... yes
    Canvas item ............................ yes
    Support for Quick Designer ............. yes
    Flipable item .......................... yes
    GridView item .......................... yes
    ListView item .......................... yes
    Path support ........................... yes
    PathView item .......................... yes
    Positioner items ....................... yes
    ShaderEffect item ...................... yes
    Sprite item ............................ yes
    Qt Gamepad:
    SDL2 ................................... no
    Qt 3D:
    Assimp ................................. yes
    System Assimp .......................... no
    Output Qt3D Job traces ................. no
    Output Qt3D GL traces .................. no
    Qt 3D GeometryLoaders:
    Autodesk FBX ........................... no
    Qt Wayland Client ........................ no
    Qt Wayland Compositor .................... no
    Qt Bluetooth:
    BlueZ .................................. no
    BlueZ Low Energy ....................... no
    Linux Crypto API ....................... no
    Qt Sensors:
    sensorfw ............................... no
    Qt Multimedia:
    ALSA ................................... yes
    GStreamer 1.0 .......................... no
    GStreamer 0.10 ......................... yes
    Video for Linux ........................ yes
    OpenAL ................................. no
    PulseAudio ............................. yes
    Resource Policy (libresourceqt5) ....... no
    Windows Audio Services ................. no
    DirectShow ............................. no
    Windows Media Foundation ............... no
    Qt Quick Controls 2:
    Styles ................................. Default Material Universal
    Qt Quick Templates 2:
    Hover support .......................... yes
    Qt Location:
    Gypsy GPS Daemon ....................... no
    WinRT Geolocation API .................. no
    Qt WebEngine:
    Embedded build ......................... yes
    Pepper Plugins ......................... no
    Printing and PDF ....................... no
    Proprietary Codecs ..................... no
    Spellchecker ........................... yes
    WebRTC ................................. no
    Using system ninja ..................... no
    ALSA ................................... yes
    PulseAudio ............................. yes
    System libraries:
    ICU .................................. no
    libwebp and libwebpdemux ............. no
    Opus ................................. no
    ffmpeg ............................... no

    Note: Also available for Linux: linux-clang linux-icc

    Note: Dropped compiler flags '-pthread' when detecting library 'glib'.

    Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.

    Note: Dropped compiler flags '-pthread' when detecting library 'gstreamer'.

    Note: Dropped compiler flags '-pthread' when detecting library 'gstreamer_app'.

    ERROR: Feature 'eglfs' was enabled, but the pre-condition '!config.android && !config.darwin && !config.win32 && features.egl' failed.


  • Lifetime Qt Champion

    Looks like the configure output is not complete, I don't see any failure there.



  • What You mean by incomplete?


  • Lifetime Qt Champion

    In verbose mode, the configure script prints way more lines than what you have here.

    Did you re-run configure from a clean state ?



  • before config i did make clean all


  • Lifetime Qt Champion

    You just cleaned the build artefacts not the configuration stuff. You should do out of source builds, that way you can just nuke the build folder if something fails and the source will stay clean.



  • Thanks. How to do build to another dir?


  • Moderators

    @python74

    mkdir build
    cd build
    PATH_TO_QT_SOURCE/configure ...
    make
    


  • Thanks for help. But i have another problem. I removed old src directory an was trying to compile qt again. And then problem starts - running configure script and instead make shell trying to use /usr/lib/x86_64-linux-gnu/qt5/bin/qmake wchich btw i removed wit previous QT. Qt5 was installed with qt creator. How to avoid that?


  • Moderators

    @python74 said in eglfs + framebuffer - display issue:

    instead make shell trying to use /usr/lib/x86_64-linux-gnu/qt5/bin/qmake

    Sorry, I don't understand that: if you try to call make qmake is called or what? Can you please explain better (show the steps you did)?



  • Sorry, I'm not good with english.
    Right now i'm in work so i can't post output from console.
    Previously I compiled qt with bad options (running configure command without some parameters), but also installed qt creator from repository (apt-get). Later I removed whole directory with qt source, and made new with clean sources. Inside new sources directory I have launched configure script in terminal. Process starts with qmake build, but stops with error: load(qt_config) not recognized (or similar - i'll post output after work). So in console i typed "make clean all" and then instead make shell calls /usr/lib/x86_64-linux-gnu/qt5/bin/qmake. Then I removed all qt from system with qt5 directory via apt-get an nothing changes - cant run configure script because of calling non existing /usr/lib/x86_64-linux-gnu/qt5/bin/qmake. I've exported MAKE=/usr/bin/make - still error: load(qt_config)


  • Lifetime Qt Champion

    You should start by cleaning things.

    Delete your current Qt sources and then uncompress the archive again so you are really in a clean state to build.

    Then, as suggested make an out of source build like @jsulm showed.

    When you want to use qmake, use the full path to the executable. The one found by your console is the system installed qmake and it's currently not the one you want to use.



  • my point is i removed qt5 (with qmake) installed in /usr/lib/x86_64-linux-gnu/qt5/bin/qmake, but still make command points to this particular qmake


  • Moderators

    @python74 Please do a clean rebuild first! Old Makefiles will still point to that old qmake as they do not know that you removed it.



  • You mean remove makefiles from qt source directory? I deleted whole directory and unpacked sources fro zip again



  • thanks very much guys. I know im pain in the ass but explain me please one more thing: A20 have mali GPU. After config i have:
    QPA backends:
    DirectFB ............................... no
    EGLFS .................................. yes
    EGLFS details:
    EGLFS i.Mx6 .......................... no
    EGLFS i.Mx6 Wayland .................. no
    EGLFS EGLDevice ...................... no
    EGLFS GBM ............................ yes
    EGLFS Mali ........................... no
    EGLFS Raspberry Pi ................... no
    EGL on X11 ........................... yes
    LinuxFB ................................ yes
    VNC .................................... yes
    Mir client ............................. no

    Why scripts dont recognize mali? It is a way to enable it? like ie CFG_EGLFS_MALI=yes


  • Lifetime Qt Champion

    You have to use your device sysroot. If you are using the one provided by Linaro, it won't contain the specifics for your target.



  • Hi
    After few nights of work finally done. I've cleared all files and run compile process on new sources so I have now Qt5.9.1. Very important: on sunxi linux with Allwinner A20 you need to change:

    qtbase/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp

    EGLNativeWindowType QEglFSDeviceIntegration::createNativeWindow(QPlatformWindow *platformWindow,
    const QSize &size,
    const QSurfaceFormat &format)
    {
    Q_UNUSED(platformWindow);
    Q_UNUSED(size);
    Q_UNUSED(format);
    //return 0;
    static struct mali_native_window native_window = {
    .width = (short unsigned int)size.width(),
    .height = (short unsigned int)size.height(),
    };
    return &native_window;
    }

    or eglfs fails.
    Thank You guys veeery much for help and Your patience
    Regards
    Rafal


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.