野火电子论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 869|回复: 6

[求助] 鲁班猫2 RK3568 +MIPI 屏 QT eglfs显示问题

[复制链接]
发表于 2025-9-17 13:59:16 | 显示全部楼层 |阅读模式
本帖最后由 telantan 于 2025-9-17 15:15 编辑

硬件:鲁班猫2 RK3568 + 7寸MIPI发屏
系统:官方的ubuntu 20.04 xfce系统,QT也是编译好的5.15.8
软件:QT ananlogclock example
问题:在xfce桌面环境下,./analogclock可以正常工作,使用的是xcb。想使用eglfs实现,怎么都不成功,操作步骤是这样的,
1. 调好变量


export QT_QPA_PLATFORM=eglfs
export QT_QPA_EGLFS_INTEGRATION=eglfs_kms
export QT_QPA_EGLFS_KMS_CONFIG=/opt/cursor.json
export QT_QPA_PLATFORM_PLUGIN_PATH=/lib/aarch64-linux-gnu/qt5/plugins/platforms

export QT_DEBUG_PLUGINS=1

cursor.json是这样设置的  

{
"device": "/dev/dri/card0",
"hwcursor": false,
"outputs": [
            { "name": "DSI-1", "mode": "1024x600" }
]
}


2.在不启动图形界面情况下,执行命令
./analogclock
最后报错部分是这样的,

QFactoryLoader:FactoryLoader() checking directory path "/usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/platforms" ...
QFactoryLoader:FactoryLoader() checking directory path "/opt/platforms" ...
loaded library "/usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqeglfs.so"
QFactoryLoader:FactoryLoader() checking directory path "/usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/egldeviceintegrations" ...
QFactoryLoader:FactoryLoader() checking directory path "/opt/egldeviceintegrations" ...
No protocol specified
No protocol specified
No protocol specified
Could not initialize egl display
Aborted (core dumped)

启动图形界面,错误信息变成这样了

QFactoryLoader:FactoryLoader() checking directory path "/usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/platforms" ...
QFactoryLoader:FactoryLoader() checking directory path "/opt/platforms" ...
loaded library "/usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqeglfs.so"
QFactoryLoader:FactoryLoader() checking directory path "/usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/egldeviceintegrations" ...
QFactoryLoader:FactoryLoader() checking directory path "/opt/egldeviceintegrations" ...
libEGL warning: MESA-LOADER: failed to open rockchip: /usr/lib/dri/rockchip_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/aarch64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)

libEGL warning: MESA-LOADER: failed to open rockchip: /usr/lib/dri/rockchip_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/aarch64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)

QFactoryLoader:FactoryLoader() checking directory path "/usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/imageformats" ...
QFactoryLoader:FactoryLoader() checking directory path "/opt/imageformats" ...
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).
EGL Error : Could not create the egl surface: error = 0x300b

Aborted (core dumped)





麻烦各位帮忙看一下,是什么地方出的问题,谢谢了。






qtlib

qtlib

err

err
回复

使用道具 举报

发表于 2025-9-19 15:57:52 | 显示全部楼层
看样子还是获取屏幕那边出了问题,确认过设备编号那便是card0 的dsi1吗?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2025-9-20 17:00:29 | 显示全部楼层
确认过的
野火论坛202509201700081929..png
回复 支持 反对

使用道具 举报

发表于 2025-9-26 17:00:15 | 显示全部楼层
这个是终端输入的还是ssh输入的?是不是环境变量的问题
回复 支持 反对

使用道具 举报

 楼主| 发表于 2025-9-27 11:07:44 | 显示全部楼层
YiangYiang 发表于 2025-9-26 17:00
这个是终端输入的还是ssh输入的?是不是环境变量的问题

SSH,串口终端都试过了,export环境变量已经加到.bashrc且生效。
回复 支持 反对

使用道具 举报

发表于 2025-9-27 14:12:20 | 显示全部楼层
telantan 发表于 2025-9-27 11:07
SSH,串口终端都试过了,export环境变量已经加到.bashrc且生效。

https://forum.qt.io/topic/25253/ ... face-error-0x300b/3
可以试试论坛里面的这种方法修改看看,查了一轮资料都说是屏幕参数或者环境变量的问题
回复 支持 反对

使用道具 举报

 楼主| 发表于 2025-9-29 13:48:35 | 显示全部楼层
本帖最后由 telantan 于 2025-10-4 19:09 编辑

谢谢。切换到debian10,现在可以正常显示的。最新的debian12也是不行,有时间的时候我再试一下链接中的方法。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

联系站长|手机版|野火电子官网|野火淘宝店铺|野火电子论坛 ( 粤ICP备14069197号 ) 大学生ARM嵌入式2群

GMT+8, 2025-12-6 03:26 , Processed in 0.148876 second(s), 29 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表