Boot2Qt 6.4 Deployment Error: drmModeGetResources failed & QML "Constants" issues
-
Hello everyone,
I am working with a Variscite DART-MX8M-PLUS SoM on its custom carrier board. I have installed the Boot2Qt image provided by Variscite (based on Yocto Kirkstone), which provides Qt 6.4.
I successfully built the SDK/Toolchain and configured Qt Creator for remote deployment. I created a default project using Qt Design Studio, opened it in Qt Creator, and tried to deploy it to the target.The Problem:
When deploying from Qt Creator, the application fails to start with the following EGLFS/DRM error:
QML debugging is enabled. Only use this in a safe environment. drmModeGetResources failed (Operation not supported) no screens available, assuming 24-bit color Cannot create window: no screens availableheadingHardware Setup:
- Display connected via HDMI.
- Expected DRM device: /dev/dri/card0 (checked via ls /dev/dri/).
Troubleshooting attempts:
Checked for conflicting display servers (Weston/Wayland). systemctl and ps show no display managers running (only standard services like dbus, connman, bluetooth, etc.).
I tried enforcing the KMS configuration by exporting
QT_QPA_EGLFS_KMS_CONFIG.
Created file /tmp/config.json:{ "device": "/dev/dri/card0", "outputs": [ { "name": "HDMI-A-1", "mode": "1920x1080" } ] }Current Status:
- Via Qt Creator: The error persists (drmModeGetResources failed).
- Via Serial Terminal (Manual run): If I run the executable manually from the terminal (SSH/Serial), EGLFS seems to initialize (no DRM error), but the screen remains black and the app crashes with QML errors regarding the Qt Design Studio generated code:
qrc:/qt/qml/TestContent/Screen01.ui.qml:48: ReferenceError: Constants is not defined qrc:/qt/qml/TestContent/Screen01.ui.qml:55: ReferenceError: Constants is not definedIt seems like the "Constants" singleton file generated by Design Studio is not being linked or loaded correctly in this Boot2Qt environment.
My Questions:
- Why does drmModeGetResources fail when deployed via Qt Creator but seemingly passes when run manually?
- Does the Qt Creator runner environment lack specific environment variables?
- How can I properly fix the ReferenceError: Constants is not defined in a CMake-based Boot2Qt deployment without manually hardcoding values in the QML files?
Any help is appreciated!
-
Imports in QML match the module URI exactly. Once the module is properly deployed, the error disappears.
https://forum.qt.io/topic/162691/mediaplayer-videooutput-sigsegv-gst_v4l2_object_fill_format_listmsn games