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

chromiumOzone: init new chromium derivative package for Wayland #50486

Closed

Conversation

colemickens
Copy link
Member

@colemickens colemickens commented Nov 17, 2018

Motivation for this change
  1. firefox-nightly-bin packages from nixpkgs-mozilla now have Wayland support enabled by default.

  2. Chromium has some Wayland support via Ozone, but it's not the default build config.

  3. The Chromium build infra is not simple, and I also don't have time to create a chromium-git to place in an overlay, which might be preferable to adding more variants of Chromium to nixpkgs.

  4. This is working, in that as much work as is expected for an Ozone/Wayland build.

  5. I'm pushing builds of chromiumOzone to nixpkgs-wayland's cachix repo. More info: https://github.com/colemickens/nixpkgs-wayland. (Though I'm building this against nixos-unstable, whereas this PR targets master.)

Signed-off-by: Cole Mickens cole.mickens@gmail.com

LINKS ABOUT CHROMIUM/OZONE

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-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)
  • Fits CONTRIBUTING.md.

@colemickens
Copy link
Member Author

Shamelessly tagging @volth since you have been working with Chromium a lot lately and might have good insight. Thanks in advance.


# package customization
, enableNaCl ? false
, enableWideVine ? false
, useOzoneWayland ? false
Copy link
Member Author

Choose a reason for hiding this comment

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

possibly should just be "useOzone" since there is an x11 backend for Ozone and I currently have it enabled.

Copy link
Member

Choose a reason for hiding this comment

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

That would be less confusing.

@@ -252,6 +255,13 @@ let
proprietary_codecs = true;
enable_hangout_services_extension = true;
ffmpeg_branding = "Chrome";
} // optionalAttrs useOzoneWayland {
Copy link
Member

Choose a reason for hiding this comment

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

Is chromium going to be mutual exclusive with x11 support?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, Ozone does not mean any sort of mutual exclusivity, and the GN flags here explicitly enable both the x11 and wayland backends for Ozone. The toggle here is really useOzone: ie, useOzone=false means the existing shipping Chromium display tech (GTK and X11), and useOzone=true means to switch to the new Chromium display stack (Ozone) and enable both the X11 and Wayland backends for it.

@colemickens
Copy link
Member Author

So, I've got it building, and getting past the initial minigbm problems. However, I can't get it working due to issues with libGLESv2.so.2.

I've tried having libGL in buildInputs, as well as, libglvnd, but they both result in the same error. I'm not sure if some additional source patches are needed to work properly with nixpkgs's usage of GL?

[6662:6662:1129/191754.584226:ERROR:egl_util.cc(59)] Failed to load GLES library: libGLESv2.so.2: cannot open shared object file: No such file or directory

@colemickens
Copy link
Member Author

Actually, it should have already had libGL anyway, since it has libGLU_combined by default.

@colemickens colemickens force-pushed the nixpkgs-chromium-wayland branch 2 times, most recently from 5349f7d to b59d7fe Compare November 30, 2018 11:04
@@ -113,7 +117,7 @@ let
ninja which python2Packages.python perl pkgconfig
python2Packages.ply python2Packages.jinja2 nodejs
gnutar
];
] ++ optional (versionAtLeast version "72") jdk;
Copy link
Member Author

Choose a reason for hiding this comment

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

this can probably be dropped since jdk.jre is in buildInputs now...

@colemickens
Copy link
Member Author

For anyone watching, this is now producing working builds of Chromium. (It doesn't handle high DPI well right now, just as a heads up).

Thanks to @Mic92 for getting me pointed in the right direction with regards to GL handling.

I need to test the regular Chromium builds to make sure I didn't regress anything, otherwise this can be reviewed...

@colemickens colemickens changed the title [need help] chromiumWayland: add new chromium derivative package chromiumOzone: init new chromium derivative package for Wayland Nov 30, 2018
@jtojnar jtojnar added this to Non-mainstream DE in Wayland Dec 26, 2018
@jtojnar jtojnar moved this from Non-mainstream DE to General in Wayland Dec 26, 2018
@colemickens colemickens force-pushed the nixpkgs-chromium-wayland branch 2 times, most recently from ee41cbb to b3e1ccb Compare February 18, 2019 08:51
@colemickens
Copy link
Member Author

NOTE FOR POTENTIAL REVIEWERS: Lots of this is still in flux in Chromium repos and it may be prudent to hold off a bit. For example, building and using libminigbm should stop being required in Dev channels soon, in favor of using system mesa instead

@bendlas
Copy link
Contributor

bendlas commented Mar 5, 2019

I like the work on vaapi, this should be useful, even independently of Ozone.

  • Could you put that into a separate PR?
  • Have you looked into vdpau support as well, by chance?

@colemickens
Copy link
Member Author

@bendlas

  1. There's another PR with a probably more correct approach to enabling vaapi: chromium: Add optional vaapi hw video decoding support #56794. I didn't actually mean to push the non-Ozone stuff to this branch, I'll try to get this a bit more organized soon. I haven't managed to get Ozone + Vaapi working yet (actually haven't gotten vaapi tested as working by itself yet either).

  2. I don't really understand vaapi/vdpau well enough to understand if I need both. Would this be for NVIDIA users that don't have a vaapi impl? I was under the impression there was some sort of vaapi-vdpau compatibility layer that they could use? If you can give me some more hints here I can dig in.

@bendlas
Copy link
Contributor

bendlas commented Mar 6, 2019

@colemickens colemickens force-pushed the nixpkgs-chromium-wayland branch 3 times, most recently from 11bcdbe to b9fd4f3 Compare March 6, 2019 04:55
@colemickens colemickens deleted the nixpkgs-chromium-wayland branch March 17, 2019 00:16
@ghost ghost mentioned this pull request Jun 12, 2019
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Wayland
  
General
Development

Successfully merging this pull request may close these issues.

None yet

4 participants