2411550_en-US

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

2411550_en-US

2411550_en-US

i.mx8mp GPU and GTK4 app: GUI/window present delay and blocking Vivante /dev/galcore ioctl
GTK4 Window Startup Delay (~10s) on i.MX8MP with Vivante GPU
When using the default GTK4 GL renderer:
gtk_window_present(window);​
takes approximately 9-10 seconds before the window becomes visible.

The evidence (see attached file) strongly suggests that the startup delay is not caused by GTK application code.

The delay appears correlated with a blocking Vivante /dev/galcore ioctl within the GL rendering path. Software rendering (GSK_RENDERER=cairo) avoids the issue.

We are looking for guidance on known issues, debugging methods, configuration changes, or fixes for GTK4/OpenGL startup latency on i.MX8MP with the Vivante GPU stack.

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

Hi @jim777 

Thank you for sharing such detailed information. Could you provide a minimal, reproducible GTK4 source code example? I need to conduct further testing in the NXP BSP.

Best Regards,
Zhiming

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

Hi Zhiming,

Thanks for your quick response!

Attached is a small skeleton but complete source file to test.
and the environment variables set before running:

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

 the relevant from 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


the running time for the gtk_window_present on a desktop w/o GPU support takes some hundreds msec (< 1sec); and on the i.mx8mp device takes 9970 ms :

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:~#


I have tried render: ngl, which leads to smear image/widgetrs/video, and Vulkan leads to critical errors: Loader Message: vkCreateDevice: Failed to validate extensions in list; Failed to realize renderer of type ‘GskVulkanRenderer’ for surface ‘GdkWaylandToplevel’: Could not find a Vulkan device with the required features.

Since out app need GPU support, and the recommended renderer under wayland/weston is still gl (UG10159  11.3.2.1 GL renderer)   , I hope you can help to find a solution.

Best regards,





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

Hi @Zhiming_Liu 
Besides what shared already, is there anything I can help to resolve the issue?
If there is any way to make it work - significantly reduce the startup time, such as configuration changes, env variable settings, different versions, or fixes/patches to the GPU driver, please let me know.
Thanks,

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

Hi @jim777 

The GPU team is checking this issue, this will take a little while. I'll let you know as soon as there's an update.

Best Regards,
Zhiming

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