I have a imx6q-sabresd based board with wayland weston (also another image that uses xwayland). I'm able to start and use weston, but only when using pixman (CPU graphics). When I try to start weston with the default settings (ie with --use-g2d=1) which uses the GL rendering, I get the following error:
[21:29:08.220] Command line: weston ---debug --tty=1 --device=/dev/fb0 --use-g2d=1 --log=/tmp/weston.log
[21:29:08.220] OS: Linux, 6.1.36-custom-machine+gfd5321d928cc, #1 SMP PREEMPT Mon Nov 27 17:22:40 PST 2023, armv7l
[21:29:08.221] Flight recorder: enabled
[21:29:08.221] Using config file '/etc/xdg/weston/weston.ini'
[21:29:08.221] Output repaint window is 7 ms maximum.
[21:29:08.221] Loading module '/usr/lib/libweston-10/fbdev-backend.so'
[21:29:08.227] initializing fbdev backend
[21:29:08.227] warning: the fbdev backend is deprecated, please migrate to the DRM backend
[21:29:08.228] Trying weston_launch launcher...
[21:29:08.228] could not get launcher fd from env
[21:29:08.228] Trying direct launcher...
[21:29:08.236] Loading module '/usr/lib/libweston-10/g2d-renderer.so'
[21:29:08.249] g2d_open fail.
[21:29:08.249] g2d_renderer_create failed.
Upon further investigation, I tried to run the provided imx-g2d-samples starting with just /opt/g2d_samples/g2d_basic_test but I'm always met with the following error:
[ 1] HAL user version: 6.4.11.658245
[ 2] HAL kernel version: 6.4.11.684571
g2d_open: fail with status -24
g2d_open fail.
Since the G2D library is NXP proprietary (source code not provided), we were unable to dig into the error which seems to be coming from the library.
---
Additionally, if I disable g2d, I get an ELG error instead. See below:
[21:36:29.690] Command line: weston ---debug --tty=1 --device=/dev/fb0 --use-g2d=0 --log=/tmp/weston.log
[21:36:29.690] OS: Linux, 6.1.36-custom-machine+gfd5321d928cc, #1 SMP PREEMPT Mon Nov 27 17:22:40 PST 2023, armv7l
[21:36:29.690] Flight recorder: enabled
[21:36:29.690] Using config file '/etc/xdg/weston/weston.ini'
[21:36:29.690] Output repaint window is 7 ms maximum.
[21:36:29.691] Loading module '/usr/lib/libweston-10/fbdev-backend.so'
[21:36:29.697] initializing fbdev backend
[21:36:29.697] warning: the fbdev backend is deprecated, please migrate to the DRM backend
[21:36:29.697] Trying weston_launch launcher...
[21:36:29.697] could not get launcher fd from env
[21:36:29.697] Trying direct launcher...
[21:36:29.697] Loading module '/usr/lib/libweston-10/gl-renderer.so'
[21:36:29.710] EGL client extensions: EGL_EXT_client_extensions
EGL_EXT_platform_base EGL_KHR_platform_wayland
EGL_EXT_platform_wayland EGL_EXT_device_query
[21:36:29.710] warning: either no EGL_EXT_platform_base support or specific platform support; falling back to eglGetDisplay.
[21:36:29.710] failed to initialize display
[21:36:29.710] EGL error state: EGL_NOT_INITIALIZED (0x3001)
[21:36:29.710] gl_renderer_create failed.
[21:36:29.785] BUG: layer_list is not empty after shutdown. Calls to weston_layer_fini() are missing somwhere.
I also see
[ 1] HAL user version: 6.4.11.658245
[ 2] HAL kernel version: 6.4.11.684571
free(): double free detected in tcache 2
In the terminal after running the weston command, but not in the weston log file.
Keep in mind that if I use `--use-pixman`, then weston is able to start and run fine.
---
I have added the `kernel-module-imx-gpu-viv` package to my image, and enabled
`CONFIG_MXC_GPU_VIV=y`
in my defconfig.
I've tried adding many different packages based on reference images (such as
mesa,
imx-gpu-g2d,
imx-gpu-viv,
packagegroup-fsl-tools-gpu,
packagegroup-fsl-gstreamer1.0,
etc)
but I have been unable to get graphics acceleration to work.
Can anyone provide any insight into this issue or what I might be missing?