Muralitharan Perumal
unread,May 29, 2024, 9:58:07 AMMay 29Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Chromium-dev
Hi,
I tried building chromium with ozone wayland with the following args:
ozone_auto_platforms = false
ozone_platform_wayland = true
ozone_platform_headless = true
target_os = "linux"
target_cpu = "arm"
target_sysroot = "custom toolchain"
use_cups = false
has_native_accessibility = false
has_platform_accessibility_support = false
enable_accessibility_service = false
use_glib = false
use_gtk = false
rtc_use_pipewire = false
use_qt = false
dawn_enable_vulkan = false
dawn_use_swiftshader = false
enable_swiftshader = false
enable_swiftshader_vulkan = false
use_libpci = false
angle_enable_swiftshader = false
use_system_libffi = true
use_kerberos = false
use_system_minigbm = false
use_nss_certs = true
enable_validating_command_decoder = false
use_v8_context_snapshot = false
enable_gpu_client_logging = false
angle_use_wayland = false
use_wayland_gbm = false
is_debug = true
is_component_build = true
is_official_build = false
And with this I can launch chrome browser with westeros display server.
XDG_RUNTIME_DIR=/tmp WAYLAND_DISPLAY=westeros-chromium WAYLAND_DEBUG=1 ./chrome --no-sandbox --use-gl=egl --ozone-platform=wayland --in-process-gpu --window-size=1920,1080
But when I do the official or release build, we see 'eglInitialize' call is failing:
Release build
--------------
is_component_build = false
is_official_build = false
is_debug = false
Official build
--------------
is_official_build = true
[11282:11308:0517/161914.948920:ERROR:gl_display.cc(787)] eglInitialize Default failed with error EGL_NOT_INITIALIZED
[11282:11308:0517/161914.948996:ERROR:gl_display.cc(822)] Initialization of all EGL display types failed.
[11282:11308:0517/161914.949036:ERROR:gl_ozone_egl.cc(27)] GLDisplayEGL::Initialize failed.
Here is my args for official build:
ozone_auto_platforms = false
ozone_platform_wayland = true
ozone_platform_headless = false
target_os = "linux"
target_cpu = "arm"
target_sysroot = "custom toolchain"
use_cups = false
has_native_accessibility = false
has_platform_accessibility_support = false
enable_accessibility_service = false
use_glib = false
use_gtk = false
rtc_use_pipewire = false
use_qt = false
dawn_enable_vulkan = false
dawn_use_swiftshader = false
enable_swiftshader = false
enable_swiftshader_vulkan = false
use_libpci = false
angle_enable_swiftshader = false
use_system_libffi = true
use_kerberos = false
use_system_minigbm = false
use_nss_certs = false
enable_validating_command_decoder = false
use_v8_context_snapshot = false
enable_gpu_client_logging = false
angle_use_wayland = false
use_wayland_gbm = false
is_debug = false
symbol_level = 0
v8_symbol_level = 0
blink_symbol_level = 0
enable_nacl = false
is_official_build = true
chrome_pgo_phase = 0
enable_vulkan = false
This is the simpler version of the calls:
struct wl_display *display = wl_display_connect(NULL);
if (!display) {
fprintf(stderr, "Failed to connect to Wayland display.\n");
return -1;
}
EGLDisplay egl_display = eglGetDisplay((NativeDisplayType)display);
if (egl_display == EGL_NO_DISPLAY) {
EGLint error = eglGetError();
fprintf(stderr, "Failed to get EGL display. Error code: 0x%x\n", error);
wl_display_disconnect(display);
return -1;
}
if (eglInitialize(egl_display, NULL, NULL) == EGL_FALSE) {
EGLint error = eglGetError();
fprintf(stderr, "Failed to initialize EGL. Error code: 0x%x\n", error);
wl_display_disconnect(display);
return -1;
}
Even though our custom graphics library remains the same (closed source), I feel there is some chromium optimization that is triggering this type of behaviour.
Any hint or input will be very helpful.