RPi-Distro / chromium-browser

30 stars 7 forks source link

Missing libGLESv2.so libraries when running Chromium without GPU #32

Closed Botspot closed 2 years ago

Botspot commented 2 years ago

It is often useful to run Chromium within a nested X session (Xephyr window). Xephyr does not support hardware acceleration, so everything running within it should fall back to llvmpipe/swiftshader automatically.

The past two versions of Chromium return errors when running in a Xephyr window. The error was:

[9046:9046:0521/141428.674178:ERROR:gpu_init.cc(481)] Passthrough is not supported, GL is egl, ANGLE is 
[9046:9046:0521/141428.703442:ERROR:viz_main_impl.cc(185)] Exiting GPU process due to errors during initialization
[9085:9085:0521/141428.735902:ERROR:egl_util.cc(74)] Failed to load GLES library: /usr/lib/chromium-browser/libGLESv2.so: /usr/lib/chromium-browser/libGLESv2.so: cannot open shared object file: No such file or directory

Chromium 98 would fail to display the webpage entirely, and the new Chromium v101 version displays the same error but it successfully displays some sites.

Rather than Xephyr, I found a simpler way to make Chromium opt for swiftshader - by assigning an environment variable.

LIBGL_ALWAYS_SOFTWARE=1 chromium-browser

Although Chromium technically works, this error "cannot open shared object file: No such file or directory" is a bad error and should be fixed. The missing libraries are simply located in the wrong place: /usr/lib/chromium-browser/swiftshader/libGLESv2.so

TL;DR Either the libEGL.so and libGLESv2.so libraries should be moved out of the swiftshader folder so Chromium can find them, or Chromium should be changed to find the libraries in the swiftshader folder.

XECDesign commented 2 years ago

I don't think that's quite how it's meant to work and just replaces one set of errors with another.

You're right in that there are missing libraries (ANGLE). I am guessing that wraps around Mesa, swiftshader or whatever else chromium requests.

An updated version should show up soonish.