NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.29k stars 13.54k forks source link

Which Chromium flavors to build on Hydra? #82443

Closed primeos closed 3 years ago

primeos commented 4 years ago

Currently we only build the following package on Hydra:

But since the build times are very high, it might make sense to add additional popular flavors.

Potential candidates (+ combinations):

Unlikely candidates:

Testing: chromium should always work, other flavors should be provided on a best effort basis (or have a dedicated maintainer).

Ideally we'd have at most two different flavors to keep it manageable and avoid unnecessary Hydra overhead.

What other distributions do: TODO, see e.g. https://repology.org/projects/?search=chromium Additional resources:

Status: WIP, please add feedback, suggestions, general thoughts, etc.

nixos-discourse commented 4 years ago

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/would-it-be-possible-to-provide-binary-cache-for-chromium-vaapi/6229/2

dR3b commented 4 years ago

Please that would be a very good improvement. It would have a positive effect on the battery. On my Intel NUC it takes over 16 hours to compile... I'd be delighted.

nixos-discourse commented 4 years ago

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/nixos-unstable-hasnt-been-updated-in-a-while/6584/13

primeos commented 4 years ago

There's now a draft for chromium-vaapi: https://github.com/NixOS/nixpkgs/pull/85076 But IMO (and as already discussed in that PR) chromium-vaapi isn't really worth the overhead (building + maintaining). Therefore I'm more in favor of enabling VA-API by default (vs. an additional package)

As an alternative I considered adding chromium-experimental with Ozone + VA-API (and possibly additional features). I'd prefer that approach, but unfortunately that works less reliable and seems not ready for Nixpkgs yet (e.g. it required custom patches or a Nixpkgs package for minigbm when I tested it with M80).

Back to enabling VA-API by default: One issue is that Chromium seems to lacks a more fine grained control than ignore-gpu-blacklist (which ignores all entries - not just VA-API - which is mainly important as some users might already use that flag for other purposes). Another issue is that VA-API causes some overhead to maintain (e.g. M81 required two additional patches: https://github.com/NixOS/nixpkgs/commit/b533f103452d5f39dace33a1b76ff88ac8f0f21f) and might break as it is not officially supported. Therefore I'd suggest that we try to enable it by default as an experimental feature, but disable it again if it causes too many problems. It is important to note that VA-API was already enabled once by default and that didn't work out. However, I think if we discuss this first, run some tests before enabling it, and don't backport it to stable right away we should be able to merge such a change without causing too many problems at once (which would require reverting that change).

E.g. one interesting possibility to look into would be to enable disable-accelerated-video-decode and disable-accelerated-video-encode by default. If that works as expected this shouldn't break any existing setups, even with ignore-gpu-blacklist.

misuzu commented 4 years ago

E.g. one interesting possibility to look into would be to enable disable-accelerated-video-decode and disable-accelerated-video-encode by default. If that works as expected this shouldn't break any existing setups, even with ignore-gpu-blacklis

How about this:

chromium-vaapi = callPackage ../applications/networking/browsers/chromium ((config.chromium or {}) // { useVaapi = true; });
chromium = chromium-vaapi.override { commandLineArgs = "--disable-accelerated-video-decode --disable-accelerated-video-encode"; };

chromium-vaapi and chromium should only have different wrappers so no rebuilds required!

stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info

primeos commented 3 years ago

The situation has significantly improved since I opened this issue and (IMO) we can close it now :tada:

We currently build the following on Hydra: