raspberry2上的Eglfs——*未能添加服务——已经在使用中



这是我在这里的第一篇文章。

我想保持它的简短…

以下问题:

我想在raspberry-pi 2b上使用eglfs后端运行一个qt5/qtquickcontrols2应用程序,当然是由vc4加速的。理想情况下,它应该运行在kiosk模式,它肯定需要加速gl功能。为了尽量减少问题,我使用以下命令进行测试:

LD_PRELOAD="/opt/vc/lib/libGLESv2.so /opt/vc/lib/libEGL.so" qmlscene ./gallery.qml

画廊。QML只是qt-creator中的小部件预览示例项目(遵循这些说明…)。我得到以下错误输出:

[manjaro@Loki gallery]$ LD_PRELOAD="/opt/vc/lib/libGLESv2.so /opt/vc/lib/libEGL.so" qmlscene ./gallery.qml
qt.qpa.egldeviceintegration: EGL device integration plugin keys: ("eglfs_brcm", "eglfs_kms", "eglfs_x11")
qt.qpa.egldeviceintegration: EGL device integration plugin keys (sorted): ("eglfs_brcm", "eglfs_kms", "eglfs_x11")
qt.qpa.egldeviceintegration: Trying to load device EGL integration "eglfs_brcm"
qt.qpa.egldeviceintegration: Using EGL device integration "eglfs_brcm"
* failed to add service - already in use?

我也测试了相同的运行交叉编译二进制-相同的错误。除了最后一行以外的所有代码都来自于qt5的详细调试输出,这是我通过环境变量设置的,详细信息将在后面。

System/Environment:

  • 树莓2 b
  • qt-5.7.0
  • Manjaro-ARM(基于Arch Linux ARM)
  • 所有固件的东西,工具,引导的东西,内核安装和最新

其他设置…

[manjaro@Loki gallery]$ uname -a
Linux Loki 4.4.28-1-MANJARO-ARM #1 SMP Sat Oct 29 21:01:09 CDT 2016 armv7l GNU/Linux
我config.txt

dtparam=audio=on
#hdmi_drive=2
avoid_warnings=2
disable_overscan=1
disable_splash=1
boot_delay=0
# activate raspi cam
start_x=1
# tuning gpu accel and memory usage
gpu_mem=320
dtoverlay=vc4-kms-v3d
我cmdline.txt

root=/dev/mmcblk0p2 rw  rootwait console=tty1 selinux=0 quiet plymouth.ignore-serial-consoles dwc_otg.lpm_enable=0 elevator=deadline fsck.repair=yes

printenv给出如下:

XDG_SESSION_ID=c1
TERM=xterm
SHELL=/bin/bash
SSH_CLIENT=192.168.0.100 43274 22
QT_QPA_EGLFS_INTEGRATION=eglfs_brcm
OLDPWD=/home/manjaro
SSH_TTY=/dev/pts/0
USER=manjaro
MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins
MAIL=/var/spool/mail/manjaro
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/vc/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
PWD=/home/manjaro/opt
LANG=de_DE.UTF-8
QT_QPA_PLATFORM=eglfs
SHLVL=1
HOME=/home/manjaro
LOGNAME=manjaro
QT_LOGGING_RULES=qt.qpa.*=true
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
SSH_CONNECTION=192.168.0.100 43274 192.168.0.107 22
XDG_RUNTIME_DIR=/run/user/1000
_=/usr/bin/printenv

你可以看到几个Qt特定的设置:调试,使用eglfs作为默认后端和最有趣的:QT_QPA_EGLFS_INTEGRATION=eglfs_brcm这意味着应该使用broadcom eglfs插件。沿着eglfs_brcm,我也尝试了eglfs_kms(只是出于好奇):

[manjaro@Loki gallery]$ export QT_QPA_EGLFS_INTEGRATION=eglfs_kms
[manjaro@Loki gallery]$ LD_PRELOAD="/opt/vc/lib/libGLESv2.so /opt/vc/lib/libEGL.so" qmlscene ./gallery.qml 
qt.qpa.egldeviceintegration: EGL device integration plugin keys: ("eglfs_brcm", "eglfs_kms", "eglfs_x11")
qt.qpa.egldeviceintegration: EGL device integration plugin keys (sorted): ("eglfs_kms", "eglfs_brcm", "eglfs_x11")
qt.qpa.egldeviceintegration: Trying to load device EGL integration "eglfs_kms"
qt.qpa.egldeviceintegration: Using EGL device integration "eglfs_kms"
qt.qpa.input: udev device discovery for type QFlags(0x10)
qt.qpa.input: Found matching devices ("/dev/dri/card0")
qt.qpa.eglfs.kms: Found the following video devices: ("/dev/dri/card0")
qt.qpa.eglfs.kms: Using "/dev/dri/card0"
qt.qpa.eglfs.kms: Opening device "/dev/dri/card0"
qt.qpa.eglfs.kms: Creating GBM device for file descriptor 5 obtained from "/dev/dri/card0"
* failed to add service - already in use?

这似乎既不是视频核心的问题,也不是manjaro-arm的"库存"Qt的问题。它只是说某些东西可能被阻止,但是什么呢?有提示吗?

覆盖和驱动程序似乎工作,glxgears达到~60FPS在xfce4上运行。下面的内容也很有趣:

[root@Loki gallery]# vcdbg log msg|& grep -v gpioman|grep -iv hdmi
001042.905: *** Restart logging
001043.889: Read command line from file 'cmdline.txt'
root=/dev/mmcblk0p2 rw  rootwait console=tty1 selinux=0 nofb dwc_otg.lpm_enable=0 elevator=deadline fsck.repair=yes
001409.425: Loading 'kernel7.img' to 0x8000 size 0x5ea25c
001413.076: Kernel trailer DTOK property says yes
001413.091: Kernel trailer DDTK property says yes
001415.514: Loading 'bcm2709-rpi-2-b.dtb' to 0x5f225c size 0x3bfc
001514.479: dtparam: audio=on
001567.591: Loaded overlay 'vc4-kms-v3d'
001836.841: Device tree loaded to 0x2effbc00 (size 0x430d)
005904.220: vchiq_core: vchiq_init_state: slot_zero = 0xd0400000, is_master = 1
005911.919: TV service:host side not connected, dropping notification 0x00000002, 0x00000001, 0x00000010
007999.619: camsubs: Looking for camera 0: i2c_port = 0, led gpio = 32, power enable gpio = 41
008000.339: camsubs: Camera not found
008000.377: camsubs: Looking for camera 0: i2c_port = 0, led gpio = 32, power enable gpio = 41
008001.091: camsubs: Camera not found
008001.128: camsubs: Looking for camera 0: i2c_port = 0, led gpio = 32, power enable gpio = 41
008001.844: camsubs: Camera not found

在我看来应该是这样。

我尝试了以下事情:

我使用gpu_mem分割,尝试值在128和448之间。检查gpu内存看起来像预期的那样,但对执行提到的应用程序没有影响。

[manjaro@Loki gallery]$ vcgencmd get_mem gpu
gpu=320M

我还创建了以下udev规则,以修复我最初遇到的错误

[manjaro@Loki gallery]$ cat /etc/udev/rules.d/10-vchiq-permissions.rules 
SUBSYSTEM=="vchiq",GROUP="video",MODE="0660"
[manjaro@Loki gallery]$ groups
wheel video storage power users
如果没有提到的udev规则,我会得到以下错误:
[manjaro@Loki gallery]$ LD_PRELOAD="/opt/vc/lib/libGLESv2.so /opt/vc/lib/libEGL.so" qmlscene ./gallery.qml 
qt.qpa.egldeviceintegration: EGL device integration plugin keys: ("eglfs_brcm", "eglfs_kms", "eglfs_x11")
qt.qpa.egldeviceintegration: EGL device integration plugin keys (sorted): ("eglfs_brcm", "eglfs_kms", "eglfs_x11")
qt.qpa.egldeviceintegration: Trying to load device EGL integration "eglfs_brcm"
qt.qpa.egldeviceintegration: Using EGL device integration "eglfs_brcm"
* failed to open vchiq instance

该死的……我现在没有主意了……如果你能给我一点提示,我将不胜感激。

  • 回答阅读几个文档(我已经花了大量的时间)
  • 建议尝试另一个发行版(这不是一个解决方案)
  • 建议刷新我的存储卡(也不是解决方案)

谁得到Qt-5.7/qtquickcontrols2/QML工作在树莓2通过EGLFS利用vc4?

我刚刚遇到了同样的问题。

当您使用开源'vc4-kms-v3d'驱动程序(如您的config.txt中设置的)时,您不能使用闭源驱动程序(/opt/vc/lib/libGLESv2)。所以/opt/vc/lib/libEGL。所以,在你的LD_PRELOAD字符串)。

误差

failed to add service - already in use?

表示,正如我刚刚发现的。

因此,您可以在config.txt中注释这行,或者不使用LD_PRELOAD策略,也不使用QT_QPA_EGLFS_INTEGRATION=eglfs_brcm

不要在config.txt中使用fakg评论

# dtoverlay=vc4-kms-v3d

相关内容

  • 没有找到相关文章

最新更新