Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QML on Raspberry
Qt 6.11 is out! See what's new in the release blog

QML on Raspberry

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
24 Posts 4 Posters 11.4k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Raviphulsundar
    wrote on last edited by
    #1

    Qt version: Qt 5.6.2
    Simple Qt program without QML works fine with "-platform linuxfb"
    but Qt+QML program not working.
    No error is displayed and keyboard & mouse don't responds.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      This is not relevant for non-accelerated platforms, for example the ones using the LinuxFB plugin, which is meant for software-based rendering only. This means Qt Quick 2 is not functional in such a setup as it depends on OpenGL for rendering.

      Taken from: http://doc.qt.io/archives/qt-5.6/embedded-linux.html#configuring-a-specific-device

      It looks like you need to use -platform eglfs instead.

      (Z(:^

      1 Reply Last reply
      0
      • R Offline
        R Offline
        Raviphulsundar
        wrote on last edited by
        #3

        I tried with -platform eglfs
        it is not working

        following are last few lines I got from strace command

        open("/dev/tty", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 5
        fcntl64(5, F_SETFD, FD_CLOEXEC) = 0
        close(5) = 0
        write(2, "Could not find DRM device!\n", 27) = 27
        rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
        tgkill(199, 199, SIGABRT) = 0
        --- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=199, si_uid=0} ---
        +++ killed by SIGABRT +++

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          You probably need to install missing dependencies (if any) and compile the EGLFS platform plugin for Qt.

          See this guide: https://wiki.qt.io/RaspberryPi2EGLFS

          (Z(:^

          1 Reply Last reply
          0
          • R Offline
            R Offline
            Raviphulsundar
            wrote on last edited by
            #5

            Following plugins are installed in /usr/lib/qt/plugins/platforms/
            libqeglfs.so libqlinuxfb.so libqminimalegl.so libqminimal.so libqoffscreen.so libqxcb.so

            1 Reply Last reply
            0
            • R Offline
              R Offline
              Raviphulsundar
              wrote on last edited by
              #6

              make command output
              $ make
              ./buildroot-2017.02.2/output/host/usr/bin/arm-buildroot-linux-gnueabihf-g++ -c -pipe -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os --sysroot=./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot -O2 -O3 -std=gnu++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I ./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5 -I ./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtQuick -I ./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtGui -I ./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtQml -I ./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtNetwork -I ./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtCore -I. -I ./buildroot-2017.02.2/output/host/usr/mkspecs/devices/linux-buildroot-g++ -o main.o main.cpp
              ./buildroot-2017.02.2/output/host/usr/bin/rcc -name qml qml.qrc -o qrc_qml.cpp
              ./buildroot-2017.02.2/output/host/usr/bin/arm-buildroot-linux-gnueabihf-g++ -c -pipe -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os --sysroot=./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot -O2 -O3 -std=gnu++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5 -I./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtQuick -I ./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtGui -I./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtQml -I./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtNetwork -I./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtCore -I. -I./buildroot-2017.02.2/output/host/usr/mkspecs/devices/linux-buildroot-g++ -o qrc_qml.o qrc_qml.cpp
              ./buildroot-2017.02.2/output/host/usr/bin/arm-buildroot-linux-gnueabihf-g++ --sysroot=./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot -Wl,-O1 -o Rectangle main.o qrc_qml.o -lQt5Quick -L./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/lib -lQt5Gui -lQt5Qml -lQt5Network -lQt5Core -lrt -ldl -lGLESv2 -lpthread

              R 1 Reply Last reply
              0
              • R Raviphulsundar

                make command output
                $ make
                ./buildroot-2017.02.2/output/host/usr/bin/arm-buildroot-linux-gnueabihf-g++ -c -pipe -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os --sysroot=./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot -O2 -O3 -std=gnu++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I ./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5 -I ./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtQuick -I ./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtGui -I ./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtQml -I ./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtNetwork -I ./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtCore -I. -I ./buildroot-2017.02.2/output/host/usr/mkspecs/devices/linux-buildroot-g++ -o main.o main.cpp
                ./buildroot-2017.02.2/output/host/usr/bin/rcc -name qml qml.qrc -o qrc_qml.cpp
                ./buildroot-2017.02.2/output/host/usr/bin/arm-buildroot-linux-gnueabihf-g++ -c -pipe -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os --sysroot=./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot -O2 -O3 -std=gnu++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5 -I./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtQuick -I ./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtGui -I./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtQml -I./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtNetwork -I./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtCore -I. -I./buildroot-2017.02.2/output/host/usr/mkspecs/devices/linux-buildroot-g++ -o qrc_qml.o qrc_qml.cpp
                ./buildroot-2017.02.2/output/host/usr/bin/arm-buildroot-linux-gnueabihf-g++ --sysroot=./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot -Wl,-O1 -o Rectangle main.o qrc_qml.o -lQt5Quick -L./buildroot-2017.02.2/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/lib -lQt5Gui -lQt5Qml -lQt5Network -lQt5Core -lrt -ldl -lGLESv2 -lpthread

                R Offline
                R Offline
                Raviphulsundar
                wrote on last edited by
                #7

                One more error I found through strace command

                "This plugin does not support cre"
                "Failed to create OpenGL context"

                1 Reply Last reply
                0
                • sierdzioS Offline
                  sierdzioS Offline
                  sierdzio
                  Moderators
                  wrote on last edited by
                  #8

                  I don't know this error, sorry. So I am only guessing, but: are you sure you have all dependencies installed, including all OpenGL drivers?

                  (Z(:^

                  1 Reply Last reply
                  0
                  • R Offline
                    R Offline
                    Raviphulsundar
                    wrote on last edited by
                    #9

                    Yes, I've installed all the dependencies.

                    What is the meaning of
                    could not open DRM device error

                    jeremy_kJ 1 Reply Last reply
                    0
                    • R Raviphulsundar

                      Yes, I've installed all the dependencies.

                      What is the meaning of
                      could not open DRM device error

                      jeremy_kJ Offline
                      jeremy_kJ Offline
                      jeremy_k
                      wrote on last edited by
                      #10

                      @Raviphulsundar This looks like an error reported by the eglfs plugin, but the details aren't clear to me. Can you try running it with the qt.qpa.eglfs.kms logging category enabled?

                      ie $ QT_LOGGING_RULES="qt.qpa.eglfs.kms=true" program -platform eglfs

                      Asking a question about code? http://eel.is/iso-c++/testcase/

                      1 Reply Last reply
                      0
                      • R Offline
                        R Offline
                        Raviphulsundar
                        wrote on last edited by Raviphulsundar
                        #11

                        #export QT_LOGGING_RULES=qt.qpa.*=true
                        #./Rectangle -platform eglfs
                        qt.qpa.egldeviceintegration: EGL device integration plugin keys: ("eglfs_kms_egldevice","eglfs_kms","eglfs_X11")
                        qt.qpa.egldeviceintegration: EGL device integration plugin keys (sorted): ("eglfs_kms","eglfs_kms_egldevice","eglfs_X11")
                        qt.qpa.egldeviceintegration: Trying to load device EGL integration "eglfs_kms"
                        qt.qpa.egldeviceintegration: Using EGL device integrtion "eglfs_kms"
                        qt.qpa.input: udev device discovery for type QFlags(0x10)
                        qt.qpa.input: Found matching devices ()
                        qt.qpa.eglfs.kms: Found the following video devices ()
                        Could not find DRM device!
                        Aborted

                        1 Reply Last reply
                        0
                        • jeremy_kJ Offline
                          jeremy_kJ Offline
                          jeremy_k
                          wrote on last edited by
                          #12

                          It looks like querying libudev for DRM video devices is coming up empty. Is there anything in the /sys/class/drm/ directory on the target?

                          From the Qt platform plugin side, the code of interest is QDeviceDiscoveryUDev::scanConnectedDevices() in qtbase/src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp

                          Asking a question about code? http://eel.is/iso-c++/testcase/

                          1 Reply Last reply
                          1
                          • R Offline
                            R Offline
                            Raviphulsundar
                            wrote on last edited by
                            #13

                            $ls /sys/class/drm
                            version
                            $cat /sys/class/drm/version
                            drm 1.1.0 20060810

                            $ls /lib/modules/4.4.43-v7/kernel/drivers/gpu/drm/
                            drm_mipi_dsi.ko panel/ udl/ vc4/

                            $lsmod
                            // No drm module is loaded, However DRM module is selected in Kernel configuration.

                            1 Reply Last reply
                            0
                            • R Offline
                              R Offline
                              Raviphulsundar
                              wrote on last edited by
                              #14

                              Now I've recompiled Kernel with
                              CONFIG_DRM=m
                              instead of
                              CONFIG_DRM=y

                              Now,
                              $ls /sys/class/ <---- no drm directory
                              $ls /lib/modules/4.4.43-v7/kernel/drivers/gpu/drm/
                              drm_kms_helper.ko drm.ko drm_mipi_dsi.ko panel udl vc4

                              $lsmod -------> no drm module loaded
                              #modprobe drm
                              //DRM module loaded

                              And now
                              $ls /sys/class/drm
                              version <----- Only version file

                              $cat /sys/class/drm/version
                              drm 1.1.0 20060810

                              jeremy_kJ 1 Reply Last reply
                              0
                              • R Raviphulsundar

                                Now I've recompiled Kernel with
                                CONFIG_DRM=m
                                instead of
                                CONFIG_DRM=y

                                Now,
                                $ls /sys/class/ <---- no drm directory
                                $ls /lib/modules/4.4.43-v7/kernel/drivers/gpu/drm/
                                drm_kms_helper.ko drm.ko drm_mipi_dsi.ko panel udl vc4

                                $lsmod -------> no drm module loaded
                                #modprobe drm
                                //DRM module loaded

                                And now
                                $ls /sys/class/drm
                                version <----- Only version file

                                $cat /sys/class/drm/version
                                drm 1.1.0 20060810

                                jeremy_kJ Offline
                                jeremy_kJ Offline
                                jeremy_k
                                wrote on last edited by
                                #15

                                @Raviphulsundar I suspect you need to get the Broadcom driver for the GPU. It might already be on the system, waiting to be loaded. Unfortunately I don't know what it is called. Have you checked raspberrypi.org?

                                Asking a question about code? http://eel.is/iso-c++/testcase/

                                R 1 Reply Last reply
                                0
                                • jeremy_kJ jeremy_k

                                  @Raviphulsundar I suspect you need to get the Broadcom driver for the GPU. It might already be on the system, waiting to be loaded. Unfortunately I don't know what it is called. Have you checked raspberrypi.org?

                                  R Offline
                                  R Offline
                                  Raviphulsundar
                                  wrote on last edited by
                                  #16

                                  @jeremy_k, I have checked in RaspberryPi forum for this pbm related to DRM. That thread is still unsolved.

                                  Regarding Broadcom driver for the GPU, I could not found it in Linux config.

                                  One thing I observed is drm module is not loading at boot time.
                                  Does it mean that Frame Buffer modules are selected instead of DRM ?

                                  jeremy_kJ 1 Reply Last reply
                                  0
                                  • R Raviphulsundar

                                    @jeremy_k, I have checked in RaspberryPi forum for this pbm related to DRM. That thread is still unsolved.

                                    Regarding Broadcom driver for the GPU, I could not found it in Linux config.

                                    One thing I observed is drm module is not loading at boot time.
                                    Does it mean that Frame Buffer modules are selected instead of DRM ?

                                    jeremy_kJ Offline
                                    jeremy_kJ Offline
                                    jeremy_k
                                    wrote on last edited by
                                    #17

                                    Unfortunately I don't have a pi to look at. Does the Raspbian distribution include X or some sort of gui? You can grab a copy of that, boot it, and see which modules are loaded.

                                    There's also this article about getting Qt to run with Arch on the pi 3: http://www.chaos-reins.com/2017-01-13-qt-pi3-arch-aarch64/

                                    Asking a question about code? http://eel.is/iso-c++/testcase/

                                    R 1 Reply Last reply
                                    0
                                    • jeremy_kJ jeremy_k

                                      Unfortunately I don't have a pi to look at. Does the Raspbian distribution include X or some sort of gui? You can grab a copy of that, boot it, and see which modules are loaded.

                                      There's also this article about getting Qt to run with Arch on the pi 3: http://www.chaos-reins.com/2017-01-13-qt-pi3-arch-aarch64/

                                      R Offline
                                      R Offline
                                      Raviphulsundar
                                      wrote on last edited by
                                      #18

                                      @jeremy_k ,

                                      Initially I was trying with ARM32 installation.

                                      Then I tried with ARM64 with BCM2837 dts. But what I observed in Buildroot that,
                                      When I select AARCH64 (ARM64), Buildroot don't allow to select Qt Quick Controls.

                                      Is there any issue pending with "AMR64 & QtQuick combination". ?

                                      jsulmJ 1 Reply Last reply
                                      0
                                      • R Raviphulsundar

                                        @jeremy_k ,

                                        Initially I was trying with ARM32 installation.

                                        Then I tried with ARM64 with BCM2837 dts. But what I observed in Buildroot that,
                                        When I select AARCH64 (ARM64), Buildroot don't allow to select Qt Quick Controls.

                                        Is there any issue pending with "AMR64 & QtQuick combination". ?

                                        jsulmJ Offline
                                        jsulmJ Offline
                                        jsulm
                                        Lifetime Qt Champion
                                        wrote on last edited by
                                        #19

                                        @Raviphulsundar Do you have ARM64 Qt build?
                                        Is your target system running an OS built for ARM64?

                                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                                        R 1 Reply Last reply
                                        0
                                        • jsulmJ jsulm

                                          @Raviphulsundar Do you have ARM64 Qt build?
                                          Is your target system running an OS built for ARM64?

                                          R Offline
                                          R Offline
                                          Raviphulsundar
                                          wrote on last edited by
                                          #20

                                          @jsulm I've OS Built for ARM64 with Qt 5.6 but without Quick controls & QML.

                                          jsulmJ 1 Reply Last reply
                                          0

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved