Closed gustavqmatic closed 1 year ago
I try to debug this but I'm not 100% sure how it should behave. I can see that the first display setup is done from Cog and it seems to work as it should. Then a second setup from wpewebkit from PlatformDisplayLibWPE::initialize(). The hostFd is pointing to /dev/dri/card0. The wpe_renderer_backend_egl_create() returns a backend instace and wpe_renderer_backend_egl_get_native_display() a display instance. But wpe_renderer_backend_egl_get_platform() returns 0. I found that a bit odd so I tried to look into libwpe. We use ./usr/lib/libWPEBackend-fdo-1.0.so.1.9.2 as backend (but the yocto build folder is wpebackend-fdo/1.14.0-r0 so I think the version is correct). But here BackendWayland from libWPEBackend-fdo is used. I can only find two backends and the other one is for surfaceless.
Have we misunderstood, is it not possible to run cog in frame buffer mode with egl? If it should work, what should be the overall stack between cog, wpewebkit, libwpe backend?
This error in your log seems it can be problematic:
libEGL debug: EGL user error 0x3001 (EGL_NOT_INITIALIZED) in eglInitialize: DRI2: gbm device using incorrect/incompatible backend
Cog works fine with DRM/KMS with other Mesa-based drivers like the Mesa VC4 driver for the RPi 3. If you have one RPi 3 or 4 at hand, then you can try to build Cog for it and see how it works there via KMS/DRM.
Not sure why it is not working for you on Intel, in theory it should work (AFAIK).
Thank you for the response. We have decided to use Wayland instead of DRM, so I will close this issue.
Describe the issue We build cog with framebuffer on Intel. We use master on meta-webkit and kirkstone on meta-intel etc.
The build compile and run but nothing is seen on the screen. I can see that drm is set in package config using "bitbake -e cog". Other egl applications such as kmscube and glmark works as they should.
I have tried to debug the issue by adding my own logging to both webkit and mesa. I can see that the drm init is done correctly, mode '1920x1080' @ 60Hz is selected. A display with gbm backend is then created and it seems to work. Then /usr/lib/dri/iris_dri.so is loaded and I select gles as renderer, it list lots of configs and selects “config #0 with format 'XR30'”. After that I can see that the eglDisplay is created again, but this time it does not seem to be correct, driver name is empty, gbm name is garbage and fd is -1. This gives error “EGL user error 0x3001 (EGL_NOT_INITIALIZED) in eglInitialize: DRI2: gbm device using incorrect/incompatible backend”.
Cog does not crash/stop when this happens, but nothing is seen on the screen. When I press Ctrl-C to stop it some additional output is written: ^ClibEGL debug: EGL user error 0x3008 (EGL_BAD_DISPLAY) in eglQueryContext function is no-op function is no-op Couldn't open libGL.so.1 or libOpenGL.so.0
Any ideas what can stop it from setting up the display correctly?
To Reproduce
Fikes to reproduce the behavior:
Expected behavior Cog UI and webpage on the screen.
Environment (please complete the following information):
Additional context Full log inc logs added by me (starting with “Gustav”).