2411550_zh-CN

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

2411550_zh-CN

2411550_zh-CN

i.mx8mp GPU 和 GTK4 应用程序:GUI/窗口呈现延迟和阻塞 Vivante /dev/galcore ioctl
在配备 Vivante GPU 的 i.MX8MP 上,GTK4 窗口启动延迟约为 10 秒。
使用默认的 GTK4 GL 渲染器时:
gtk_window_present(window);​
大约需要9-10 秒才能看到窗口。

证据(见附件)强烈表明,启动延迟并非由 GTK 应用程序代码引起。

延迟似乎与 GL 渲染路径中的 Vivante /dev/galcore ioctl 阻塞有关。软件渲染(GSK_RENDERER=cairo)可以避免这个问题。

我们正在寻找有关 i.MX8MP 搭载 Vivante GPU 堆栈时 GTK4/OpenGL 启动延迟的已知问题、调试方法、配置更改或修复方案的指导。

Re: i.mx8mp GPU and GTK4 app: GUI/window present delay and blocking Vivante /dev/galcore ioctl

嗨@jim777

感谢您分享如此详细的信息。能否提供一个最小的、可复现的 GTK4 源代码示例?我需要对 NXP BSP 进行进一步测试。

此致,
志明

Re: i.mx8mp GPU and GTK4 app: GUI/window present delay and blocking Vivante /dev/galcore ioctl

嗨志明,

感谢您的快速回复!

附件是一个小型但完整的源文件框架,供测试使用。
以及运行前设置的环境变量:

#!/bin/sh
export XDG_RUNTIME_DIR=/run/user/0
export WAYLAND_DISPLAY=wayland-1
export GDK_BACKEND=wayland
export GSK_RENDERER=gl

来自 weston.ini 的相关内容:

root@nitrogen8mp:~# cat /etc/xdg/weston/weston.ini
[core]
#gbm-format=argb8888
use-g2d=true
repaint-window=16
idle-time=0
xwayland=true
#enable-overlay-view=1

[shell]
panel-position=none

[libinput]
touchscreen_calibrator=true

#[output]
#name=HDMI-A-1
#mode=1920x1080@60
#transform=rotate-90

#[output]
#name=HDMI-A-2
#mode=off
#       WIDTHxHEIGHT    Resolution size width and height in pixels
#       off             Disables the output
#       preferred       Uses the preferred mode
#       current         Uses the current crt controller mode
#transform=rotate-90

[screen-share]
command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize
#start-on-startup=true

[input-method]
path=/usr/libexec/ibus-wayland


在没有GPU支持的台式机上,gtk_window_present的运行时间需要几百毫秒(< 1秒);而在i.mx8mp设备上,则需要9970毫秒:

root@nitrogen8mp:~# gtk4-test
A: activate: before _present: 47333 ms
B: activate: after _present: 57303 ms, takes: 9970 ms
C: activate: after idele_add: 57303 ms
D: startup_task_cb: 57315 ms
^C
root@nitrogen8mp:~#


我尝试过 render: ngl,但会导致图像/控件/视频模糊;而Vulkan 会导致严重错误:加载器消息:vkCreateDevice:验证列表中的扩展失败;无法为表面“GdkWaylandToplevel”实现类型为“GskVulkanRenderer”的渲染器:找不到具有所需功能的 Vulkan 设备。

由于我们的应用程序需要 GPU 支持,而 Wayland/Weston 下推荐的渲染器仍然是 GL(UG10159 11.3.2.1 GL 渲染器),希望您能帮忙找到解决方案。

此致,





Re: i.mx8mp GPU and GTK4 app: GUI/window present delay and blocking Vivante /dev/galcore ioctl

嗨@Zhiming_Liu
除了已经分享的信息之外,还有什么我可以帮忙解决这个问题的吗?
如果有什么方法可以显著缩短启动时间,例如更改配置、设置环境变量、使用不同的版本,或者修复/修补 GPU 驱动程序,请告诉我。
谢谢,

Re: i.mx8mp GPU and GTK4 app: GUI/window present delay and blocking Vivante /dev/galcore ioctl

嗨@jim777

GPU团队正在调查此问题,这需要一些时间。有最新消息我会第一时间通知你。

此致,
志明

Tags (1)
No ratings
Version history
Last update:
2 weeks ago
Updated by: