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

google-chrome: add libxkbcommon+wayland for ozone/wayland #97201

Merged
merged 1 commit into from Sep 12, 2020

Conversation

colemickens
Copy link
Member

@colemickens colemickens commented Sep 5, 2020

Motivation for this change

As of cc45a53ce5908f1d9bd4c98694a97eea3adae4cd in chromium, it seems to have stuck this time and some Dev builds are out with ozone support.

Thus, when chromium's upstream-info.nix is next updated, the -dev builds of chromium and google-chrome will support --ozone-platform=wayland to boot a native Wayland instance.

This change is needed to the wrapper for this to work. (I have tested it after updating chromium's versions locally)

I don't really remember the conventions for updating chromium and it triggers a huge rebuild so I figured I'd leave it out.

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.

@flokli
Copy link
Contributor

flokli commented Sep 5, 2020

@colemickens I realized chromium now (accidentially?) doesn't allow disabling ozone support - is that intended? See c7a503b.

@flokli
Copy link
Contributor

flokli commented Sep 5, 2020

Also note #72932 was merged, so updating the chromium binaries should be way less cumbersome.

@colemickens
Copy link
Member Author

@flokli Yes, I figured there would be some issues with complications with chromium here. IMO we should make life easy for ourselves, remove useOzone and always build with libxkbcommon/wayland but maybe a more granular solution is warranted?

LMK what you think, I might spend some time this weekend trying builds of chromium on a big VM somewhere.

If it makes sense, maybe the version bump, google-chrome, and chromium fixes should come together.

@flokli
Copy link
Contributor

flokli commented Sep 5, 2020

I'd say it depends on upstream - if there's a somewhat (still) supported way to build chromoum without ozone, we could put it behind the useOzone flag (but invert the default to match upstream). If that's currently not supported. I'd be fine with just removing the option entirely, and always building with libxkbcommon/wayland.

@primeos
Copy link
Member

primeos commented Sep 12, 2020

@colemickens thanks!

@flokli Ozone support for Chromium M87 is in e249bac (I've been waiting for this finally becoming the default for a long time...)

@primeos primeos merged commit 1350c41 into NixOS:master Sep 12, 2020
@colemickens
Copy link
Member Author

BTW, I finally figured out that I was testing this wrong, it looks like you need to do this:
google-chrome-unstable --enable-features=UseOzonePlatform --ozone-platform=wayland. aaaand it doesn't work for me. (note, I bumped chromium's upstream-info locally)

@primeos
Copy link
Member

primeos commented Oct 15, 2020

@colemickens I also couldn't get it to work properly :o

But I just tested this again with a667bc7 (since M87 is now in the beta channel) and on my test system it does work now 🎉; at least once per boot (don't ask me why... I didn't look into it but from the printed messages it might somehow mess up some internal state of the kernel driver?).
I tested google-chrome-beta under Sway with xwayland disable. It still prints a lot of error messages due to the lack of X11 and according to chrome://gpu/ it was falling back to software rendering (though it didn't feel any slower; but then again I don't remember ever testing software rendering on that machine) but the browsing experience seemed pretty normal from a quick test (a web GL demo did work and I could even watch 4K YT videos).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants