Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webkitgtk: Add /run/opengl-driver to bubblewrap bind mounts #107486

Merged
merged 1 commit into from
Dec 29, 2020

Conversation

talyz
Copy link
Contributor

@talyz talyz commented Dec 23, 2020

Motivation for this change

Without access to the /run/opengl-driver directory, webkit fails to create an EGL context, since it can't identify a suitable EGL
vendor. This results in a blank window and the following error output:

Cannot get default EGL display: EGL_BAD_PARAMETER
Cannot create EGL context: invalid display (last error: EGL_SUCCESS)

Fixes #98819 and possibly #32580.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Without access to the `/run/opengl-driver` directory, webkit fails to
create an EGL context, since it can't identify a suitable EGL
vendor. This results in a blank window and the following error output:

Cannot get default EGL display: EGL_BAD_PARAMETER
Cannot create EGL context: invalid display (last error: EGL_SUCCESS)
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 101-500 labels Dec 23, 2020
@talyz talyz added the 9.needs: port to stable A PR needs a backport to the stable release. label Dec 23, 2020
@talyz talyz requested a review from a team December 23, 2020 18:38
@worldofpeace
Copy link
Contributor

Yep, makes total sense.

@austinbutler
Copy link
Member

After 2.5h compilation process, I can confirm this fixes my issues on Intel graphics, at least.

The following works fine and results in no error output when visiting my previous test case sites of Facebook, Messenger, and Hangouts.

WEBKIT_DISABLE_COMPOSITING_MODE=0 epiphany

@worldofpeace
Copy link
Contributor

What about without setting that? We'd want it to work as intended

@austinbutler
Copy link
Member

austinbutler commented Dec 29, 2020

What about without setting that? We'd want it to work as intended

It works both ways, I just wanted to show that under normal circumstances when WEBKIT_DISABLE_COMPOSITING_MODE is set to 0 (the default) it works fine, meaning the workaround of enabling WEBKIT_DISABLE_COMPOSITING_MODE is not needed, at least on my hardware.

@worldofpeace
Copy link
Contributor

@austinbutler Gotcha, thanks.

@worldofpeace worldofpeace merged commit 63d57b3 into NixOS:master Dec 29, 2020
@worldofpeace
Copy link
Contributor

@talyz If you could open a backport PR that would be great. We could possibly readd epiphany now.

@talyz talyz deleted the webkit-bubblewrap-opengl-driver branch December 30, 2020 18:15
@talyz
Copy link
Contributor Author

talyz commented Jan 3, 2021

@worldofpeace I opened two new PRs, one to revert the epiphany removal (#108107) and another to backport both that and this one (#107981).

@erictapen erictapen added 8.has: port to stable A PR already has a backport to the stable release. and removed 9.needs: port to stable A PR needs a backport to the stable release. labels Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: port to stable A PR already has a backport to the stable release. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 101-500
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gnome3.epiphany frequently crashes in webprocess
4 participants