EGL_BAD_ATTRIBUTE with chromium-based browsers

Reporting BUG

Synopsis:

[1395:1395:0903/091957.495403:ERROR:ui/gl/egl_util.cc:92] EGL Driver message (Error) eglCreateContext: Requested version is not supported
Warning: eglCreateContext failed with EGL_BAD_ATTRIBUTE
 - While trying to discover a BackendType::OpenGL adapter.
    at CheckEGL (../../third_party/dawn/src/dawn/native/opengl/UtilsEGL.cpp:98)

Brief Description:

When visiting the chrome://gpu info page of a chromium-based browser, a slew of EGL-related errors occurs and the UI flashes rapidly while loading.

Steps to Reproduce and Frequency:

  1. Install the chromium package
  2. launch chromium and visit the chrome://gpu/ page

This is 100% reproducible on Chromium and Brave.

System Configuration: [System model][Operating System][Desktop Environment][GPU][Monitors - Model and Refresh Rates]

  • kernel 6.16.4
  • hyprland 0.50.1 (-DNO_XWAYLAND:STRING=true)
  • sway 1.11 (Native Wayland)
  • wlroots 0.19 (Vulkan Backend) (-Dxwayland=disabled)
  • vulkan-icd-loader 1.4.321
  • nVidia 580.82.07

Display (PHL 328E1): 3840x2160 @ 60 Hz (as 2883x1622) in 32" [External]
Display (DELL U2711): 1440x2560 @ 60 Hz (as 1350x2401) in 27" [External]

Additional details: [Screenshots, Screencapture, console output, logs or any details that can help with debugging]

Note: These errors have been occurring for many driver releases and chromium versions. Not new, just newly reported.

Note: This occurs when using latest git versions of egl-wayland and egl-wayland2, whether each loaded individually or both side-by-side.

Snippet of errors:

[1395:1395:0903/091957.495403:ERROR:ui/gl/egl_util.cc:92] EGL Driver message (Error) eglCreateContext: Requested version is not supported
Warning: eglCreateContext failed with EGL_BAD_ATTRIBUTE
 - While trying to discover a BackendType::OpenGL adapter.
    at CheckEGL (../../third_party/dawn/src/dawn/native/opengl/UtilsEGL.cpp:98)

[1395:1395:0903/091957.518913:ERROR:ui/gl/angle_platform_impl.cc:47] SyncEGL.cpp:69 (operator()): eglCreateSync failed with 0x00003009
ERR: SyncEGL.cpp:69 (operator()): eglCreateSync failed with 0x00003009
[1395:1395:0903/091957.519065:ERROR:gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc:404] MakeFromBackendTexture() failed.
[1395:1395:0903/091957.519116:ERROR:gpu/command_buffer/service/shared_image/shared_image_representation.cc:385] Unable to initialize SkSurface
[1395:1395:0903/091957.519157:ERROR:gpu/command_buffer/service/raster_decoder.cc:1953] [.BrowserWorker-0x1b6c01a34780]GL ERROR :GL_INVALID_VALUE : glCopySubTexture: Dest shared image is not writable
[1395:1395:0903/091957.519280:ERROR:gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc:404] MakeFromBackendTexture() failed.
[1395:1395:0903/091957.519310:ERROR:gpu/command_buffer/service/shared_image/shared_image_representation.cc:385] Unable to initialize SkSurface
[1395:1395:0903/091957.519336:ERROR:gpu/command_buffer/service/raster_decoder.cc:1953] [.BrowserWorker-0x1b6c01a34780]GL ERROR :GL_INVALID_VALUE : glCopySubTexture: Dest shared image is not writable
[1395:1395:0903/091957.519409:ERROR:gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc:404] MakeFromBackendTexture() failed.
[1395:1395:0903/091957.519431:ERROR:gpu/command_buffer/service/shared_image/shared_image_representation.cc:385] Unable to initialize SkSurface
[1395:1395:0903/091957.519453:ERROR:gpu/command_buffer/service/raster_decoder.cc:1953] [.BrowserWorker-0x1b6c01a34780]GL ERROR :GL_INVALID_VALUE : glCopySubTexture: Dest shared image is not writable
[1395:1395:0903/091957.519554:ERROR:gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc:404] MakeFromBackendTexture() failed.
[1395:1395:0903/091957.519591:ERROR:gpu/command_buffer/service/shared_image/shared_image_representation.cc:385] Unable to initialize SkSurface
[1395:1395:0903/091957.519617:ERROR:gpu/command_buffer/service/raster_decoder.cc:1953] [.BrowserWorker-0x1b6c01a34780]GL ERROR :GL_INVALID_VALUE : glCopySubTexture: Dest shared image is not writable
[1395:1395:0903/091957.519711:ERROR:gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc:404] MakeFromBackendTexture() failed.
[1395:1395:0903/091957.519734:ERROR:gpu/command_buffer/service/shared_image/shared_image_representation.cc:385] Unable to initialize SkSurface
[1395:1395:0903/091957.519757:ERROR:gpu/command_buffer/service/raster_decoder.cc:1953] [.BrowserWorker-0x1b6c01a34780]GL ERROR :GL_INVALID_VALUE : glCopySubTexture: Dest shared image is not writable
[1395:1395:0903/091957.519869:ERROR:gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc:404] MakeFromBackendTexture() failed.
[1395:1395:0903/091957.519893:ERROR:gpu/command_buffer/service/shared_image/shared_image_representation.cc:385] Unable to initialize SkSurface
[1395:1395:0903/091957.519915:ERROR:gpu/command_buffer/service/raster_decoder.cc:1953] [.BrowserWorker-0x1b6c01a34780]GL ERROR :GL_INVALID_VALUE : glCopySubTexture: Dest shared image is not writable
[1395:1395:0903/091957.520269:ERROR:gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc:404] MakeFromBackendTexture() failed.
[1395:1395:0903/091957.520301:ERROR:gpu/command_buffer/service/shared_image/shared_image_representation.cc:385] Unable to initialize SkSurface
[1395:1395:0903/091957.520329:ERROR:gpu/command_buffer/service/raster_decoder.cc:2960] [.RenderWorker-0x2cc40013f600]GL ERROR :GL_INVALID_OPERATION : glBeginRasterCHROMIUM: failed to create surface
[1395:1395:0903/091957.520355:ERROR:gpu/command_buffer/service/raster_decoder.cc:3027] [.RenderWorker-0x2cc40013f600]GL ERROR :GL_INVALID_OPERATION : glRasterCHROMIUM: RasterCHROMIUM without BeginRasterCHROMIUM
[1395:1395:0903/091957.520384:ERROR:gpu/command_buffer/service/raster_decoder.cc:3156] [.RenderWorker-0x2cc40013f600]GL ERROR :GL_INVALID_OPERATION : glEndRasterCHROMIUM: EndRasterCHROMIUM without BeginRasterCHROMIUM
[1395:1395:0903/091957.520466:ERROR:gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc:404] MakeFromBackendTexture() failed.
[1395:1395:0903/091957.520489:ERROR:gpu/command_buffer/service/shared_image/shared_image_representation.cc:385] Unable to initialize SkSurface
[1395:1395:0903/091957.520512:ERROR:gpu/command_buffer/service/raster_decoder.cc:2960] [.RenderWorker-0x2cc40013f600]GL ERROR :GL_INVALID_OPERATION : glBeginRasterCHROMIUM: failed to create surface
[1395:1395:0903/091957.520537:ERROR:gpu/command_buffer/service/raster_decoder.cc:3027] [.RenderWorker-0x2cc40013f600]GL ERROR :GL_INVALID_OPERATION : glRasterCHROMIUM: RasterCHROMIUM without BeginRasterCHROMIUM
[1395:1395:0903/091957.520561:ERROR:gpu/command_buffer/service/raster_decoder.cc:3156] [.RenderWorker-0x2cc40013f600]GL ERROR :GL_INVALID_OPERATION : glEndRasterCHROMIUM: EndRasterCHROMIUM without BeginRasterCHROMIUM
[1395:1395:0903/091957.520630:ERROR:gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc:404] MakeFromBackendTexture() failed.
[1395:1395:0903/091957.520652:ERROR:gpu/command_buffer/service/shared_image/shared_image_representation.cc:385] Unable to initialize SkSurface
[1395:1395:0903/091957.520673:ERROR:gpu/command_buffer/service/raster_decoder.cc:2960] [.RenderWorker-0x2cc40013f600]GL ERROR :GL_INVALID_OPERATION : glBeginRasterCHROMIUM: failed to create surface
[1395:1395:0903/091957.520717:ERROR:gpu/command_buffer/service/raster_decoder.cc:3027] [.RenderWorker-0x2cc40013f600]GL ERROR :GL_INVALID_OPERATION : glRasterCHROMIUM: RasterCHROMIUM without BeginRasterCHROMIUM
[1395:1395:0903/091957.520759:ERROR:gpu/command_buffer/service/raster_decoder.cc:3027] [.RenderWorker-0x2cc40013f600]GL ERROR :GL_INVALID_OPERATION : glRasterCHROMIUM: RasterCHROMIUM without BeginRasterCHROMIUM
[1395:1395:0903/091957.520785:ERROR:gpu/command_buffer/service/raster_decoder.cc:3156] [.RenderWorker-0x2cc40013f600]GL ERROR :GL_INVALID_OPERATION : glEndRasterCHROMIUM: EndRasterCHROMIUM without BeginRasterCHROMIUM
[1395:1395:0903/091957.520845:ERROR:gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc:404] MakeFromBackendTexture() failed.
[1395:1395:0903/091957.520867:ERROR:gpu/command_buffer/service/shared_image/shared_image_representation.cc:385] Unable to initialize SkSurface
[1395:1395:0903/091957.520888:ERROR:gpu/command_buffer/service/raster_decoder.cc:2960] [.RenderWorker-0x2cc40013f600]GL ERROR :GL_INVALID_OPERATION : glBeginRasterCHROMIUM: failed to create surface
[1395:1395:0903/091957.520912:ERROR:gpu/command_buffer/service/raster_decoder.cc:3027] [.RenderWorker-0x2cc40013f600]GL ERROR :GL_INVALID_OPERATION : glRasterCHROMIUM: RasterCHROMIUM without BeginRasterCHROMIUM
[1395:1395:0903/091957.520935:ERROR:gpu/command_buffer/service/raster_decoder.cc:3156] [.RenderWorker-0x2cc40013f600]GL ERROR :GL_INVALID_OPERATION : glEndRasterCHROMIUM: EndRasterCHROMIUM without BeginRasterCHROMIUM
[1395:1395:0903/091957.520977:ERROR:gpu/command_buffer/service/shared_image/shared_image_representation.cc:540] Attempt to read from an uninitialized SharedImage. Initialized region: (0, 0, 0, 0) Size: (3840, 512)
[1395:1395:0903/091957.523511:ERROR:gpu/command_buffer/service/shared_image/shared_image_representation.cc:540] Attempt to read from an uninitialized SharedImage. Initialized region: (0, 0, 0, 0) Size: (3840, 512)
[1395:1395:0903/091957.525780:ERROR:gpu/command_buffer/service/shared_image/shared_image_representation.cc:540] Attempt to read from an uninitialized SharedImage. Initialized region: (0, 0, 0, 0) Size: (3840, 512)
[1395:1395:0903/091957.528052:ERROR:gpu/command_buffer/service/shared_image/shared_image_representation.cc:540] Attempt to read from an uninitialized SharedImage. Initialized region: (0, 0, 0, 0) Size: (3840, 512)
[1395:1395:0903/091957.529916:ERROR:ui/gl/angle_platform_impl.cc:47] SyncEGL.cpp:69 (operator()): eglCreateSync failed with 0x00003009
ERR: SyncEGL.cpp:69 (operator()): eglCreateSync failed with 0x00003009
[1395:1395:0903/091957.530377:ERROR:ui/gl/angle_platform_impl.cc:47] SyncEGL.cpp:69 (operator()): eglCreateSync failed with 0x00003009
ERR: SyncEGL.cpp:69 (operator()): eglCreateSync failed with 0x00003009

Attaching an nVidia Bug Report and full log of the errors.

nvidia-egl-errors-chromium-gpu-page.log (244.4 KB)

nvidia-bug-report.log.gz (1.5 MB)

1 Like

The message Requested version is not supported doesn’t appear in any of the driver software I can find except for the version of libGLESv2.so that is shipped with Chromium, which as far as I can tell comes from the swiftshader software renderer. I can’t find that string in the source code from that repository but it does appear in /usr/lib/chromium/libGLESv2.so on my system.

Never mind, swiftshader got replaced by a software renderer in ANGLE and that’s where the message is coming from: src/libANGLE/Context.cpp - angle/angle - Git at Google

Thanks for the feedback!

So, do you think this is a chromium issue, or is my GPU not supporting new enough EGL?

Wayland platform:
EGL API version: 1.5
EGL vendor string: NVIDIA
EGL version string: 1.5
EGL client APIs: OpenGL_ES OpenGL
OpenGL core profile vendor: NVIDIA Corporation
OpenGL core profile renderer: NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2
OpenGL core profile version: 4.6.0 NVIDIA 580.82.07
OpenGL core profile shading language version: 4.60 NVIDIA
OpenGL compatibility profile vendor: NVIDIA Corporation
OpenGL compatibility profile renderer: NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2
OpenGL compatibility profile version: 4.6.0 NVIDIA 580.82.07
OpenGL compatibility profile shading language version: 4.60 NVIDIA
OpenGL ES profile vendor: NVIDIA Corporation
OpenGL ES profile renderer: NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2
OpenGL ES profile version: OpenGL ES 3.2 NVIDIA 580.82.07
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.20

Seems likely to be an ANGLE issue, since ANGLE is the GLES vendor in this case. It has a bunch of different backends and it’s not clear to me exactly which one it’s trying to use when it generates this error.

I managed to get it to cough up some more specific errors:

[44555:44555:1001/062513.636112:ERROR:gpu/command_buffer/service/shared_context_state.cc:235] Skia shader compilation error (was cached = 0)
------------------------
#version 300 es

#extension GL_NV_shader_noperspective_interpolation : require
uniform highp vec2 u_skRTFlip;
precision mediump float;
precision mediump sampler2D;
out mediump vec4 sk_FragColor;
uniform highp vec4 ucircle_S1_c0;
flat in mediump vec4 vcolor_S0;
void main() {
highp     vec4 sk_FragCoord = vec4(gl_FragCoord.x, u_skRTFlip.x + u_skRTFlip.y * gl_FragCoord.y, gl_FragCoord.z, gl_FragCoord.w);
mediump vec4 outputColor_S0 = vcolor_S0;
mediump float _3_d = (1.0 - length((ucircle_S1_c0.xy - sk_FragCoord.xy) * ucircle_S1_c0.w)) * ucircle_S1_c0.z;
mediump vec4 output_S1 = vec4(clamp(_3_d, 0.0, 1.0));
{
sk_FragColor = outputColor_S0 * output_S1;
}
}

Errors:

[44555:44555:1001/062513.642692:ERROR:ui/gl/angle_platform_impl.cc:42] SyncEGL.cpp:69 (operator()): eglCreateSync failed with 0x00003009
ERR: SyncEGL.cpp:69 (operator()): eglCreateSync failed with 0x00003009
[44555:44555:1001/062513.651194:ERROR:gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc:404] MakeFromBackendTexture() failed.
[44555:44555:1001/062513.651207:ERROR:gpu/command_buffer/service/shared_image/shared_image_representation.cc:385] Unable to initialize SkSurface
[44555:44555:1001/062513.651243:ERROR:gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc:404] MakeFromBackendTexture() failed.
[44555:44555:1001/062513.651255:ERROR:gpu/command_buffer/service/shared_image/shared_image_representation.cc:385] Unable to initialize SkSurface
[44555:44555:1001/062513.651463:ERROR:gpu/command_buffer/service/shared_image/shared_image_representation.cc:540] Attempt to read from an uninitialized SharedImage. Initialized region: (0, 0, 0, 0) Size: (256, 256)
[44555:44555:1001/062513.651512:ERROR:gpu/command_buffer/service/shared_image/shared_image_representation.cc:540] Attempt to read from an uninitialized SharedImage. Initialized region: (0, 0, 0, 0) Size: (256, 256)
[44555:44555:1001/062513.651868:ERROR:gpu/command_buffer/service/shared_context_state.cc:235] Skia shader compilation error (was cached = 0)
------------------------
#version 300 es

#extension GL_NV_shader_noperspective_interpolation : require
uniform highp vec2 u_skRTFlip;
precision mediump float;
precision mediump sampler2D;
out mediump vec4 sk_FragColor;
uniform highp vec4 ucircle_S1_c0;
flat in mediump vec4 vcolor_S0;
void main() {
highp     vec4 sk_FragCoord = vec4(gl_FragCoord.x, u_skRTFlip.x + u_skRTFlip.y * gl_FragCoord.y, gl_FragCoord.z, gl_FragCoord.w);
mediump vec4 outputColor_S0 = vcolor_S0;
mediump float _3_d = (1.0 - length((ucircle_S1_c0.xy - sk_FragCoord.xy) * ucircle_S1_c0.w)) * ucircle_S1_c0.z;
mediump vec4 output_S1 = vec4(clamp(_3_d, 0.0, 1.0));
{
sk_FragColor = outputColor_S0 * output_S1;
}
}

I'll file an issue with the `chromium` project as well.

To be clear… this does not affect browser usage. It is exclusive to the chrome://gpu page.

In the same vein as the old glvkspirv thread, which should now be closed/solved/locked, as that issue is long gone.

  • chromium 140.0.7339.207
  • nvidia 580.95.05