GTK failed to initialize GL in webkit2 on GTK

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

GTK failed to initialize GL in webkit2 on GTK

150 Views
vprachar
Contributor I

Is it possible to run webkit2 with hardware acceleration on imx8mm? I'm trying to run it on Debian 12 with Weston.

Now when I'm trying to run my simple browser, then the website is really slow. 
The browser code is simple: 

#include <gtk/gtk.h>
#include <webkit2/webkit2.h>

char *DEFAULT_URI = "<some url>";

int main (int argc, char *argv[])
{
  gtk_init(&argc, &argv);
  GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
  gtk_window_set_default_size(GTK_WINDOW(window), 800, 600);
  gtk_window_fullscreen(GTK_WINDOW(window));

  WebKitWebView *webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
  webkit_web_view_load_uri(webView, DEFAULT_URI);

  gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(webView));

  gtk_widget_show_all(window);
  gtk_main ();
  return 0;
}


When I run this app with Weston, I get this warning:
Disabled hardware acceleration because GTK failed to initialize GL: Unable to create a GL context.

But in same log the Weston knows about graphic. 

The whole log: 

May 13 10:09:44 XX weston[495]: Date: 2024-05-13 CEST
May 13 10:09:44 XX weston[495]: [10:09:44.189] weston 10.0.1
May 13 10:09:44 XX weston[495]:                https://wayland.freedesktop.org
May 13 10:09:44 XX weston[495]:                Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
May 13 10:09:44 XX weston[495]:                Build: 10.0.1
May 13 10:09:44 XX weston[495]: [10:09:44.189] Command line: weston --config=/home/xx/weston.ini --tty 1
May 13 10:09:44 XX weston[495]: [10:09:44.189] OS: Linux, 6.1.85-ktn-gf3fedc807391, #2 SMP PREEMPT Fri May  3 10:35:06 CEST 2024, aarch64
May 13 10:09:44 XX weston[495]: [10:09:44.189] Flight recorder: enabled
May 13 10:09:44 XX weston[495]: [10:09:44.190] Using config file '/home/xx/weston.ini'
May 13 10:09:44 XX weston[495]: [10:09:44.194] Output repaint window is 7 ms maximum.
May 13 10:09:44 XX weston[495]: [10:09:44.195] Loading module '/usr/lib/aarch64-linux-gnu/libweston-10/drm-backend.so'
May 13 10:09:44 XX weston[495]: [10:09:44.208] initializing drm backend
May 13 10:09:44 XX weston[495]: [10:09:44.208] Trying logind launcher...
May 13 10:09:44 XX weston[495]: [10:09:44.208] logind: cannot find systemd session for uid: 0 -61
May 13 10:09:44 XX weston[495]: [10:09:44.208] logind: cannot setup systemd-logind helper error: (No data available), using legacy fallback
May 13 10:09:44 XX weston[495]: [10:09:44.208] Trying weston_launch launcher...
May 13 10:09:44 XX weston[495]: [10:09:44.208] could not get launcher fd from env
May 13 10:09:44 XX weston[495]: [10:09:44.208] Trying direct launcher...
May 13 10:09:44 XX weston[495]: [10:09:44.213] using /dev/dri/card1
May 13 10:09:44 XX weston[495]: [10:09:44.213] DRM: supports atomic modesetting
May 13 10:09:44 XX weston[495]: [10:09:44.213] DRM: supports GBM modifiers
May 13 10:09:44 XX weston[495]: [10:09:44.213] DRM: supports picture aspect ratio
May 13 10:09:44 XX weston[495]: [10:09:44.214] Loading module '/usr/lib/aarch64-linux-gnu/libweston-10/gl-renderer.so'
May 13 10:09:44 XX weston[495]: [10:09:44.969] EGL client extensions: EGL_EXT_device_base
May 13 10:09:44 XX weston[495]:                EGL_EXT_device_enumeration EGL_EXT_device_query
May 13 10:09:44 XX weston[495]:                EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses
May 13 10:09:44 XX weston[495]:                EGL_EXT_client_extensions EGL_KHR_debug EGL_EXT_platform_device
May 13 10:09:44 XX weston[495]:                EGL_EXT_platform_wayland EGL_KHR_platform_wayland
May 13 10:09:44 XX weston[495]:                EGL_EXT_platform_x11 EGL_KHR_platform_x11 EGL_EXT_platform_xcb
May 13 10:09:44 XX weston[495]:                EGL_MESA_platform_gbm EGL_KHR_platform_gbm
May 13 10:09:44 XX weston[495]:                EGL_MESA_platform_surfaceless
May 13 10:09:44 XX weston[495]: [10:09:44.971] EGL device extensions: EGL_EXT_device_drm
May 13 10:09:44 XX weston[495]: [10:09:44.971] EGL version: 1.4
May 13 10:09:44 XX weston[495]: [10:09:44.971] EGL vendor: Mesa Project
May 13 10:09:44 XX weston[495]: [10:09:44.971] EGL client APIs: OpenGL OpenGL_ES
May 13 10:09:44 XX weston[495]: [10:09:44.971] EGL extensions: EGL_ANDROID_blob_cache
May 13 10:09:44 XX weston[495]:                EGL_ANDROID_native_fence_sync EGL_EXT_buffer_age
May 13 10:09:44 XX weston[495]:                EGL_EXT_image_dma_buf_import
May 13 10:09:44 XX weston[495]:                EGL_EXT_image_dma_buf_import_modifiers EGL_KHR_cl_event2
May 13 10:09:44 XX weston[495]:                EGL_KHR_config_attribs EGL_KHR_context_flush_control
May 13 10:09:44 XX weston[495]:                EGL_KHR_create_context EGL_KHR_create_context_no_error
May 13 10:09:44 XX weston[495]:                EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses
May 13 10:09:44 XX weston[495]:                EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image
May 13 10:09:44 XX weston[495]:                EGL_KHR_gl_texture_cubemap_image EGL_KHR_image
May 13 10:09:44 XX weston[495]:                EGL_KHR_image_base EGL_KHR_image_pixmap
May 13 10:09:44 XX weston[495]:                EGL_KHR_no_config_context EGL_KHR_reusable_sync
May 13 10:09:44 XX weston[495]:                EGL_KHR_surfaceless_context EGL_EXT_pixel_format_float
May 13 10:09:44 XX weston[495]:                EGL_KHR_wait_sync EGL_MESA_configless_context
May 13 10:09:44 XX weston[495]:                EGL_MESA_drm_image EGL_MESA_image_dma_buf_export
May 13 10:09:44 XX weston[495]:                EGL_MESA_query_driver EGL_WL_bind_wayland_display
May 13 10:09:44 XX weston[495]: [10:09:44.972] EGL_KHR_surfaceless_context available
May 13 10:09:44 XX weston[495]: [10:09:44.994] GL version: OpenGL ES 2.0 Mesa 22.3.6
May 13 10:09:44 XX weston[495]: [10:09:44.994] GLSL version: OpenGL ES GLSL ES 1.0.16
May 13 10:09:44 XX weston[495]: [10:09:44.994] GL vendor: etnaviv
May 13 10:09:44 XX weston[495]: [10:09:44.994] GL renderer: Vivante GC600 rev 4653
May 13 10:09:44 XX weston[495]: [10:09:44.994] GL extensions: GL_EXT_blend_minmax GL_EXT_multi_draw_arrays
May 13 10:09:44 XX weston[495]:                GL_EXT_texture_compression_s3tc GL_EXT_texture_compression_dxt1
May 13 10:09:44 XX weston[495]:                GL_EXT_texture_format_BGRA8888
May 13 10:09:44 XX weston[495]:                GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24
May 13 10:09:44 XX weston[495]:                GL_OES_element_index_uint GL_OES_fbo_render_mipmap
May 13 10:09:44 XX weston[495]:                GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_standard_derivatives
May 13 10:09:44 XX weston[495]:                GL_OES_stencil8 GL_OES_texture_npot GL_OES_vertex_half_float
May 13 10:09:44 XX weston[495]:                GL_OES_EGL_image GL_OES_depth_texture
May 13 10:09:44 XX weston[495]:                GL_AMD_performance_monitor GL_OES_packed_depth_stencil
May 13 10:09:44 XX weston[495]:                GL_OES_get_program_binary GL_APPLE_texture_max_level
May 13 10:09:44 XX weston[495]:                GL_EXT_discard_framebuffer GL_EXT_read_format_bgra
May 13 10:09:44 XX weston[495]:                GL_NV_pack_subimage GL_EXT_frag_depth
May 13 10:09:44 XX weston[495]:                GL_NV_fbo_color_attachments GL_OES_EGL_image_external
May 13 10:09:44 XX weston[495]:                GL_OES_EGL_sync GL_OES_vertex_array_object
May 13 10:09:44 XX weston[495]:                GL_ANGLE_pack_reverse_row_order
May 13 10:09:44 XX weston[495]:                GL_ANGLE_texture_compression_dxt3
May 13 10:09:44 XX weston[495]:                GL_ANGLE_texture_compression_dxt5 GL_EXT_unpack_subimage
May 13 10:09:44 XX weston[495]:                GL_NV_draw_buffers GL_NV_read_buffer GL_NV_read_depth
May 13 10:09:44 XX weston[495]:                GL_NV_read_depth_stencil GL_NV_read_stencil GL_EXT_draw_buffers
May 13 10:09:44 XX weston[495]:                GL_EXT_map_buffer_range GL_KHR_debug GL_NV_pixel_buffer_object
May 13 10:09:44 XX weston[495]:                GL_OES_required_internalformat GL_OES_surfaceless_context
May 13 10:09:44 XX weston[495]:                GL_EXT_debug_label GL_EXT_separate_shader_objects
May 13 10:09:44 XX weston[495]:                GL_EXT_compressed_ETC1_RGB8_sub_texture
May 13 10:09:44 XX weston[495]:                GL_EXT_draw_elements_base_vertex GL_EXT_texture_border_clamp
May 13 10:09:44 XX weston[495]:                GL_KHR_context_flush_control GL_OES_draw_elements_base_vertex
May 13 10:09:44 XX weston[495]:                GL_OES_texture_border_clamp GL_KHR_no_error
May 13 10:09:44 XX weston[495]:                GL_KHR_parallel_shader_compile GL_INTEL_blackhole_render
May 13 10:09:44 XX weston[495]:                GL_MESA_bgra
May 13 10:09:45 XX weston[495]: [10:09:45.040] GL ES 2.0 - renderer features:
May 13 10:09:45 XX weston[495]:                read-back format: BGRA
May 13 10:09:45 XX weston[495]:                EGL Wayland extension: yes
May 13 10:09:45 XX weston[495]: [10:09:45.074] event0  - pwm-beeper: not tagged as supported input device
May 13 10:09:45 XX weston[495]: [10:09:45.112] event0  - not using input device '/dev/input/event0'
May 13 10:09:45 XX weston[495]: [10:09:45.117] event4  - Goodix Capacitive TouchScreen: is tagged by udev as: Keyboard Touchscreen
May 13 10:09:45 XX weston[495]: [10:09:45.119] event4  - Goodix Capacitive TouchScreen: device is a keyboard
May 13 10:09:45 XX weston[495]: [10:09:45.119] event4  - Goodix Capacitive TouchScreen: device is a touch device
May 13 10:09:45 XX weston[495]: [10:09:45.127] event1  - USB USB Keyboard: is tagged by udev as: Keyboard
May 13 10:09:45 XX weston[495]: [10:09:45.128] event1  - USB USB Keyboard: device is a keyboard
May 13 10:09:45 XX weston[495]: [10:09:45.136] event2  - USB USB Keyboard Consumer Control: is tagged by udev as: Keyboard
May 13 10:09:45 XX weston[495]: [10:09:45.137] event2  - USB USB Keyboard Consumer Control: device is a keyboard
May 13 10:09:45 XX weston[495]: [10:09:45.145] event3  - USB USB Keyboard System Control: is tagged by udev as: Keyboard
May 13 10:09:45 XX weston[495]: [10:09:45.145] event3  - USB USB Keyboard System Control: device is a keyboard
May 13 10:09:45 XX weston[495]: [10:09:45.191] Touchscreen - Goodix Capacitive TouchScreen - /sys/devices/platform/soc@0/30800000.bus/30a30000.i2c/i2c-1/1-005d/input/input4/event4
May 13 10:09:45 XX weston[495]: [10:09:45.192] libinput: configuring device "Goodix Capacitive TouchScreen".
May 13 10:09:45 XX weston[495]: [10:09:45.192] input device event4 has no enabled output associated (none named), skipping calibration for now.
May 13 10:09:45 XX weston[495]: [10:09:45.192] libinput: configuring device "USB USB Keyboard".
May 13 10:09:45 XX weston[495]: [10:09:45.192] libinput: configuring device "USB USB Keyboard Consumer Control".
May 13 10:09:45 XX weston[495]: [10:09:45.192] libinput: configuring device "USB USB Keyboard System Control".
May 13 10:09:45 XX weston[495]: [10:09:45.192] DRM: head 'LVDS-1' updated, connector 37 is connected, EDID make 'unknown', model 'unknown', serial 'unknown'
May 13 10:09:45 XX weston[495]: [10:09:45.192] DRM: head 'LVDS-1' found, connector 37 is connected, EDID make 'unknown', model 'unknown', serial 'unknown'
May 13 10:09:45 XX weston[495]: [10:09:45.193] Registered plugin API 'weston_drm_output_api_v1' of size 24
May 13 10:09:45 XX weston[495]: [10:09:45.193] Registered plugin API 'weston_drm_virtual_output_api_v1' of size 48
May 13 10:09:45 XX weston[495]: [10:09:45.193] Color manager: no-op
May 13 10:09:45 XX weston[495]: [10:09:45.193] Output 'LVDS-1' using color profile: built-in default sRGB SDR profile
May 13 10:09:45 XX weston[495]: [10:09:45.193] Chosen EGL config details: id:   5 rgba: 8 8 8 0 buf: 24 dep:  0 stcl: 0 int: 1-1 type: win vis_id: XRGB8888 (0x34325258)
May 13 10:09:45 XX weston[495]: [10:09:45.193] Output LVDS-1 (crtc 35) video modes:
May 13 10:09:45 XX weston[495]:                1024x600@60.0, preferred, current, 51.2 MHz
May 13 10:09:45 XX weston[495]: [10:09:45.193] associating input device event4 with output LVDS-1 (none by udev)
May 13 10:09:45 XX weston[495]: [10:09:45.194] associating input device event1 with output LVDS-1 (none by udev)
May 13 10:09:45 XX weston[495]: [10:09:45.194] associating input device event2 with output LVDS-1 (none by udev)
May 13 10:09:45 XX weston[495]: [10:09:45.194] associating input device event3 with output LVDS-1 (none by udev)
May 13 10:09:45 XX weston[495]: [10:09:45.194] Output 'LVDS-1' enabled with head(s) LVDS-1
May 13 10:09:45 XX weston[495]: [10:09:45.194] Compositor capabilities:
May 13 10:09:45 XX weston[495]:                arbitrary surface rotation: yes
May 13 10:09:45 XX weston[495]:                screen capture uses y-flip: yes
May 13 10:09:45 XX weston[495]:                cursor planes: yes
May 13 10:09:45 XX weston[495]:                arbitrary resolutions: no
May 13 10:09:45 XX weston[495]:                view mask clipping: yes
May 13 10:09:45 XX weston[495]:                explicit sync: yes
May 13 10:09:45 XX weston[495]:                color operations: no
May 13 10:09:45 XX weston[495]:                presentation clock: CLOCK_MONOTONIC, id 1
May 13 10:09:45 XX weston[495]:                presentation clock resolution: 0.000000001 s
May 13 10:09:45 XX weston[495]: [10:09:45.196] Loading module '/usr/lib/aarch64-linux-gnu/weston/kiosk-shell.so'
May 13 10:09:45 XX weston[495]: [10:09:45.201] Note: support for the deprecated wl_shell interface is disabled. If a legacy client still needs it, it can be re-enabled by passing -Ddeprecated-wl-shell=true to Meson when building Weston.
May 13 10:09:46 XX simple_browser[501]: Disabled hardware acceleration because GTK failed to initialize GL: Unable to create a GL context.
May 13 10:09:47 XX weston[501]: Could not determine the accessibility bus address

 
Does anyone know how to run a website through webkit2 so it's not too slow on imx8mm?

Labels (2)
Tags (3)
0 Kudos
1 Reply

126 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @vprachar 

The board is using mesa driver which is not released from NXP. 

We can't provide more comment about this issue.

Best Regards

Zhiming

 

0 Kudos