Unsolved QML on Raspberry
-
Yes, I've installed all the dependencies.
What is the meaning of
could not open DRM device error -
@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
-
#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 -
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
-
$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. -
Now I've recompiled Kernel with
CONFIG_DRM=m
instead of
CONFIG_DRM=yNow,
$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 loadedAnd now
$ls /sys/class/drm
version <----- Only version file$cat /sys/class/drm/version
drm 1.1.0 20060810 -
@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?
-
@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 ? -
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/
-
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". ?
-
@Raviphulsundar Do you have ARM64 Qt build?
Is your target system running an OS built for ARM64? -
@jsulm I've OS Built for ARM64 with Qt 5.6 but without Quick controls & QML.
-
@Raviphulsundar said in QML on Raspberry:
but without Quick controls & QML
Then how did you install Qt? Maybe you just need to install Quick Controls and QML?
-
@jsulm I'm making raspberry pi filesystem image through Buildroot.
In Buildroot I select the application I need along with target processor, linux kernel, etc.When I select ARM64 architecture, option for selecting QtDeclarative, QtQuick Controls get disable.
But, I've tried with ARM32 architecture with QtDeclarative, QtQuick successfully.
But when I try to run application on EGLFS plastform, I get following error.
#./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 -
I've recreated rootfs & kernel image with all new combination of applications & libraries.
And now with these new setup, I could able to run my QML application.
Thanx all for the help.
-
now when I run example program gallery I get following msg and application run nicely
./gallery
qt.qpa.egldeviceintegration: EGL device integration plugin keys: ("eglfs_brcm")
qt.qpa.egldeviceintegration: EGL device integration plugin keys (sorted): ("eglfs_brcm")
qt.qpa.egldeviceintegration: Trying to load device EGL integration "eglfs_brcm"
qt.qpa.egldeviceintegration: Using EGL device integration "eglfs_brcm"
qt.qpa.input: evdevkeyboard: Using device discovery
qt.qpa.input: udev device discovery for type QFlags(0x8)
qt.qpa.input: Found matching devices ("/dev/input/event1")
qt.qpa.input: Adding keyboard at "/dev/input/event1"
qt.qpa.input: Try to create keyboard handler for "/dev/input/event1" ""
qt.qpa.input: Opening keyboard at "/dev/input/event1"
qt.qpa.input: Create keyboard handler with for device "/dev/input/event1"
qt.qpa.input: Unload current keymap and restore built-in
qt.qpa.input: numlock=0 , capslock=0, scrolllock=0
qt.qpa.input: evdevmouse: Using device discovery
qt.qpa.input: udev device discovery for type QFlags(0x1|0x2)
qt.qpa.input: Found matching devices ("/dev/input/event1")
qt.qpa.input: Adding mouse at "/dev/input/event1"
qt.qpa.input: create mouse handler for "/dev/input/event1" ""
qt.qpa.input: evdevtouch: Using device discovery
qt.qpa.input: udev device discovery for type QFlags(0x2|0x4)
qt.qpa.input: Found matching devices ("/dev/input/event0")
qt.qpa.input: evdevtouch: Adding device at "/dev/input/event0"
qt.qpa.input: evdevtouch: Using device /dev/input/event0
qt.qpa.input: evdevtouch: /dev/input/event0: Protocol type B (multi)
qt.qpa.input: evdevtouch: /dev/input/event0: min X: 0 max X: 1024
qt.qpa.input: evdevtouch: /dev/input/event0: min Y: 0 max Y: 600
qt.qpa.input: evdevtouch: /dev/input/event0: min pressure: 0 max pressure: 0
qt.qpa.input: evdevtouch: /dev/input/event0: device name: BYZHYYZHY By ZH851
qt.qpa.input: evdevtouch: Updating QInputDeviceManager device count: 1 touch devices, 0 pending handler(s)