Skip to content

Commit

Permalink
chromium: Add installation of libGLESv2.so
Browse files Browse the repository at this point in the history
The following errors occur when you start Chromium prior to this commit:

[2534:2534:0625/202928.673160:ERROR:gl_implementation.cc(246)] Failed to
load .../libexec/chromium/swiftshader/libGLESv2.so:
../libexec/chromium/swiftshader/libGLESv2.so: cannot open shared object
file: No such file or directory
[2534:2534:0625/202928.674434:ERROR:gpu_child_thread.cc(174)] Exiting
GPU process due to errors during initialization

While in theory we do not strictly need libGLESv2.so, in practice this
means that the GPU process isn't starting up at all which in turn leads
to crawling rendering performance on some sites.

So let's install all shared libraries in swiftshader.

I've tested this with the chromium.stable NixOS VM test and also locally
on my machine and the errors as well as the performance issues are gone.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
  • Loading branch information
aszlig committed Jun 25, 2017
1 parent c43a2d3 commit bd63daa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkgs/applications/networking/browsers/chromium/browser.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ mkChromiumDerivation (base: rec {
sandboxExecutableName = "__chromium-suid-sandbox";

installPhase = ''
mkdir -p "$libExecPath"
mkdir -p "$libExecPath/swiftshader"
cp -v "$buildPath/"*.pak "$buildPath/"*.bin "$libExecPath/"
cp -v "$buildPath/icudtl.dat" "$libExecPath/"
cp -vLR "$buildPath/locales" "$buildPath/resources" "$libExecPath/"
cp -v "$buildPath/swiftshader/"*.so "$libExecPath/swiftshader/"
cp -v "$buildPath/chrome" "$libExecPath/$packageName"
if [ -e "$buildPath/libwidevinecdmadapter.so" ]; then
Expand Down

2 comments on commit bd63daa

@joepie91
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to have made it into the 17.03 branch, and WebGL and hardware acceleration are now completely broken for me there.

@aszlig
Copy link
Member Author

@aszlig aszlig commented on bd63daa Sep 22, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joepie91: This shouldn't be necessary anymore with Chromium 61.*, which has landed in release-17.03 10 days ago.

Emphasis is on shouldn't be, because I haven't tested this upgrade by myself. So which version are you running?

Please sign in to comment.