Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to initialize EGL #723

Open
tadasaleksonis-bc opened this issue Jul 22, 2024 · 1 comment
Open

Failing to initialize EGL #723

tadasaleksonis-bc opened this issue Jul 22, 2024 · 1 comment
Assignees
Labels
awaiting feedback bug Something isn't working needs investigation Needs some investigation to find the cause of the issue

Comments

@tadasaleksonis-bc
Copy link

Hi all,

I am trying to get Cog to run on an Ubuntu 22.04 VM on arm64 (the goal is to eventually have this run on an actual Ubuntu 20.04 arm64 machine), and after overcoming some various hurdles I am running into an obscure EGL error.

Full logs trying to run cog github.com:

(cog:2363691): Cog-Core-DEBUG: 16:39:45.838: ensure_extension_points: Extension points registered.
(cog:2363691): Cog-Core-DEBUG: 16:39:45.839: cog_modules_add_directory: Scanning '/usr/lib/aarch64-linux-gnu/cog/modules'
Cog-INFO: 16:39:45.840: com.igalia.Cog.Platform:
Cog-INFO: 16:39:45.840:   wl - 500/CogWlPlatform
Cog-INFO: 16:39:45.840:   drm - 200/CogDrmPlatform
Cog-INFO: 16:39:45.840:   headless - 100/CogHeadlessPlatform
(cog:2363691): GLib-GIO-DEBUG: 16:39:45.846: _g_io_module_get_default: Found default implementation gvfs (GDaemonVfs) for ?gio-vfs?
(cog:2363691): Cog-DEBUG: 16:39:45.847: platform_setup: Platform name: (null)
[2405638.637]  -> [email protected]_registry(new id wl_registry@2)
[2405638.684]  -> [email protected](new id wl_callback@3)
[2405638.800] [email protected]_id(3)
[2405638.811] [email protected](1, "wl_compositor", 5)
[2405638.816] [email protected](2, "wl_drm", 2)
[2405638.819] [email protected](3, "wl_shm", 1)
[2405638.822] [email protected](4, "wl_output", 3)
[2405638.833] [email protected](5, "zxdg_output_manager_v1", 3)
[2405638.850] [email protected](6, "wl_data_device_manager", 3)
[2405638.857] [email protected](7, "zwp_primary_selection_device_manager_v1", 1)
[2405638.868] [email protected](8, "gtk_primary_selection_device_manager", 1)
[2405638.871] [email protected](9, "wl_subcompositor", 1)
[2405638.875] [email protected](10, "xdg_wm_base", 4)
[2405638.878] [email protected](11, "zxdg_shell_v6", 1)
[2405638.883] [email protected](12, "gtk_shell1", 5)
[2405638.888] [email protected](13, "wp_viewporter", 1)
[2405638.891] [email protected](14, "zwp_pointer_gestures_v1", 3)
[2405638.894] [email protected](15, "zwp_tablet_manager_v2", 1)
[2405638.903] [email protected](16, "wl_seat", 5)
[2405638.918] [email protected](17, "zwp_relative_pointer_manager_v1", 1)
[2405638.945] [email protected](18, "zwp_pointer_constraints_v1", 1)
[2405638.960] [email protected](19, "zxdg_exporter_v1", 1)
[2405638.995] [email protected](20, "zxdg_importer_v1", 1)
[2405638.999] [email protected](21, "zwp_linux_dmabuf_v1", 4)
[2405639.005] [email protected](22, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[2405639.024] [email protected](23, "zwp_text_input_manager_v3", 1)
[2405639.028] [email protected](24, "wp_presentation", 1)
[2405639.049] [email protected](25, "xdg_activation_v1", 1)
[2405639.062] [email protected](18801)
(cog:2363691): Cog-FDO-DEBUG: 16:39:45.848: Initializing Wayland...
[2405639.227]  -> [email protected]_registry(new id wl_registry@2)
[2405639.238]  -> [email protected](new id wl_callback@3)
[2405639.314] [email protected]_id(3)
[2405639.321] [email protected](1, "wl_compositor", 5)
[2405639.325]  -> [email protected](1, "wl_compositor", 5, new id [unknown]@4)
(cog:2363691): Cog-FDO-DEBUG: 16:39:45.848: Using 'wl_compositor' interface obtained from the Wayland registry.
[2405639.378] [email protected](2, "wl_drm", 2)
(cog:2363691): Cog-FDO-DEBUG: 16:39:45.848: Ignoring 'wl_drm' interface obtained from the Wayland registry.
[2405639.400] [email protected](3, "wl_shm", 1)
[2405639.406]  -> [email protected](3, "wl_shm", 1, new id [unknown]@5)
(cog:2363691): Cog-FDO-DEBUG: 16:39:45.848: Using 'wl_shm' interface obtained from the Wayland registry.
[2405639.434] [email protected](4, "wl_output", 3)
[2405639.439]  -> [email protected](4, "wl_output", 3, new id [unknown]@6)
(cog:2363691): Cog-FDO-DEBUG: 16:39:45.848: Using 'wl_output' interface obtained from the Wayland registry.
[2405639.471] [email protected](5, "zxdg_output_manager_v1", 3)
(cog:2363691): Cog-FDO-DEBUG: 16:39:45.848: Ignoring 'zxdg_output_manager_v1' interface obtained from the Wayland registry.
[2405639.488] [email protected](6, "wl_data_device_manager", 3)
(cog:2363691): Cog-FDO-DEBUG: 16:39:45.848: Ignoring 'wl_data_device_manager' interface obtained from the Wayland registry.
[2405639.509] [email protected](7, "zwp_primary_selection_device_manager_v1", 1)
(cog:2363691): Cog-FDO-DEBUG: 16:39:45.848: Ignoring 'zwp_primary_selection_device_manager_v1' interface obtained from the Wayland registry.
[2405639.518] [email protected](8, "gtk_primary_selection_device_manager", 1)
(cog:2363691): Cog-FDO-DEBUG: 16:39:45.848: Ignoring 'gtk_primary_selection_device_manager' interface obtained from the Wayland registry.
[2405639.541] [email protected](9, "wl_subcompositor", 1)
[2405639.551]  -> [email protected](9, "wl_subcompositor", 1, new id [unknown]@7)
(cog:2363691): Cog-FDO-DEBUG: 16:39:45.848: Using 'wl_subcompositor' interface obtained from the Wayland registry.
[2405639.586] [email protected](10, "xdg_wm_base", 4)
[2405639.591]  -> [email protected](10, "xdg_wm_base", 4, new id [unknown]@8)
(cog:2363691): Cog-FDO-DEBUG: 16:39:45.848: Using 'xdg_wm_base' interface obtained from the Wayland registry.
[2405639.610] [email protected](11, "zxdg_shell_v6", 1)
(cog:2363691): Cog-FDO-DEBUG: 16:39:45.848: Ignoring 'zxdg_shell_v6' interface obtained from the Wayland registry.
[2405639.617] [email protected](12, "gtk_shell1", 5)
(cog:2363691): Cog-FDO-DEBUG: 16:39:45.848: Ignoring 'gtk_shell1' interface obtained from the Wayland registry.
[2405639.628] [email protected](13, "wp_viewporter", 1)
(cog:2363691): Cog-FDO-DEBUG: 16:39:45.848: Ignoring 'wp_viewporter' interface obtained from the Wayland registry.
[2405639.641] [email protected](14, "zwp_pointer_gestures_v1", 3)
(cog:2363691): Cog-FDO-DEBUG: 16:39:45.848: Ignoring 'zwp_pointer_gestures_v1' interface obtained from the Wayland registry.
[2405639.660] [email protected](15, "zwp_tablet_manager_v2", 1)
(cog:2363691): Cog-FDO-DEBUG: 16:39:45.848: Ignoring 'zwp_tablet_manager_v2' interface obtained from the Wayland registry.
[2405639.675] [email protected](16, "wl_seat", 5)
[2405639.678]  -> [email protected](16, "wl_seat", 7, new id [unknown]@9)
(cog:2363691): Cog-FDO-DEBUG: 16:39:45.848: Using 'wl_seat' interface obtained from the Wayland registry.
[2405639.758] [email protected](17, "zwp_relative_pointer_manager_v1", 1)
(cog:2363691): Cog-FDO-DEBUG: 16:39:45.848: Ignoring 'zwp_relative_pointer_manager_v1' interface obtained from the Wayland registry.
[2405639.785] [email protected](18, "zwp_pointer_constraints_v1", 1)
(cog:2363691): Cog-FDO-DEBUG: 16:39:45.848: Ignoring 'zwp_pointer_constraints_v1' interface obtained from the Wayland registry.
[2405639.805] [email protected](19, "zxdg_exporter_v1", 1)
(cog:2363691): Cog-FDO-DEBUG: 16:39:45.848: Ignoring 'zxdg_exporter_v1' interface obtained from the Wayland registry.
[2405639.816] [email protected](20, "zxdg_importer_v1", 1)
(cog:2363691): Cog-FDO-DEBUG: 16:39:45.848: Ignoring 'zxdg_importer_v1' interface obtained from the Wayland registry.
[2405639.844] [email protected](21, "zwp_linux_dmabuf_v1", 4)
(cog:2363691): Cog-FDO-DEBUG: 16:39:45.848: Ignoring 'zwp_linux_dmabuf_v1' interface obtained from the Wayland registry.
[2405639.851] [email protected](22, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
(cog:2363691): Cog-FDO-DEBUG: 16:39:45.849: Ignoring 'zwp_keyboard_shortcuts_inhibit_manager_v1' interface obtained from the Wayland registry.
[2405639.891] [email protected](23, "zwp_text_input_manager_v3", 1)
[2405639.894]  -> [email protected](23, "zwp_text_input_manager_v3", 1, new id [unknown]@10)
(cog:2363691): Cog-FDO-DEBUG: 16:39:45.849: Using 'zwp_text_input_manager_v3' interface obtained from the Wayland registry.
[2405639.912] [email protected](24, "wp_presentation", 1)
[2405639.915]  -> [email protected](24, "wp_presentation", 1, new id [unknown]@11)
(cog:2363691): Cog-FDO-DEBUG: 16:39:45.849: Using 'wp_presentation' interface obtained from the Wayland registry.
[2405639.926] [email protected](25, "xdg_activation_v1", 1)
(cog:2363691): Cog-FDO-DEBUG: 16:39:45.849: Ignoring 'xdg_activation_v1' interface obtained from the Wayland registry.
[2405639.936] [email protected](18801)
(cog:2363691): Cog-FDO-DEBUG: 16:39:45.849: Initializing EGL...
[2405640.548]  -> [email protected]_registry(new id wl_registry@3)
[2405640.565]  -> [email protected](new id wl_callback@12)
[2405640.683] [email protected](wl_registry@2, 0, "invalid version for global wl_seat (16): have 5, wanted 7")
wl_registry@2: error 0: invalid version for global wl_seat (16): have 5, wanted 7

(cog:2363691): Cog-WARNING **: 16:39:45.849: Platform setup failed: Could not initialize  EGL (0x3001)
(cog:2363691): Cog-DEBUG: 16:39:45.849: Instantiating default WPE backend as fall-back.

** (cog:2363691): CRITICAL **: 16:39:45.849: WebKitWebViewBackend* webkit_web_view_backend_new(wpe_view_backend*, GDestroyNotify, gpointer): assertion 'backend' failed

(cog:2363691): Cog-ERROR **: 16:39:45.849: Could not instantiate any WPE backend.
(process:2363697): GLib-GIO-DEBUG: 16:39:45.863: Failed to initialize portal (GNetworkMonitorPortal) for gio-network-monitor: Not using portals
(process:2363697): GLib-GIO-DEBUG: 16:39:45.865: _g_io_module_get_default: Found default implementation networkmanager (GNetworkMonitorNM) for ?gio-network-monitor?
Trace/breakpoint trap (core dumped)

The standout clue is wl_registry@2: error 0: invalid version for global wl_seat (16): have 5, wanted 7 but from what I've looked around online, there's not many details to work with. I suspect there's some sort of versioning mismatch but not sure how to debug this effort, as this is my first time wading into webkit browser waters.

This is from the cog package that can be run from apt install cog. Trying to build and run from source comes into other issues that I didn't consider worth the time to solve at the moment.

Any advice or pointers would be greatly appreciated.

@aperezdc aperezdc self-assigned this Aug 26, 2024
@aperezdc aperezdc added the bug Something isn't working label Aug 26, 2024
@aperezdc
Copy link
Member

I am trying to get Cog to run on an Ubuntu 22.04 VM on arm64 (the goal is to eventually have this run on an actual Ubuntu 20.04 arm64 machine), and after overcoming some various hurdles I am running into an obscure EGL error.

Full logs trying to run cog github.com:

(cog:2363691): Cog-Core-DEBUG: 16:39:45.838: ensure_extension_points: Extension points registered.
...
(cog:2363691): Cog-WARNING **: 16:39:45.849: Platform setup failed: Could not initialize  EGL (0x3001)
(cog:2363691): Cog-DEBUG: 16:39:45.849: Instantiating default WPE backend as fall-back.

Good job attaching a debug log, this helps.

At this point when the Could not initialize EGL (0x3001) message is printed that means that the call to eglInitialize() produced error code 0x3001, which corresponds to EGL_NOT_INITIALIZED. This means that the EGLDisplay is valid, but initialization failed. At this point I would like to know which GPU does your device have, and which driver are you using. For example with Mesa typically one can set LIBGL_DEBUG=1 and MESA_DEBUG=1 in the environment to get a bit more information.

The standout clue is wl_registry@2: error 0: invalid version for global wl_seat (16): have 5, wanted 7 but from what I've looked around online, there's not many details to work with. I suspect there's some sort of versioning mismatch but not sure how to debug this effort, as this is my first time wading into webkit browser waters.

Rendering should still work despite the error.

This points to an actual bug because because in theory the code supports the seat protocol in version 3 to 7 (both inclusive), and the compositor supports version 5), but it should not be the cause for your problem—it only would prevent input from working, rendering should happen anyway.

This is from the cog package that can be run from apt install cog. Trying to build and run from source comes into other issues that I didn't consider worth the time to solve at the moment.

Which Cog version would that be? I suppose 0.18.x, could you confirm by running cog --version?

@aperezdc aperezdc added needs investigation Needs some investigation to find the cause of the issue awaiting feedback labels Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting feedback bug Something isn't working needs investigation Needs some investigation to find the cause of the issue
Projects
None yet
Development

No branches or pull requests

2 participants