Skip to content

mesa: Attempt to upgrade the drivers with a minimal rebuild impact#100712

Closed
primeos wants to merge 1 commit intoNixOS:masterfrom
primeos:mesa-efficient-driver-upgrades
Closed

mesa: Attempt to upgrade the drivers with a minimal rebuild impact#100712
primeos wants to merge 1 commit intoNixOS:masterfrom
primeos:mesa-efficient-driver-upgrades

Conversation

@primeos
Copy link
Copy Markdown
Member

@primeos primeos commented Oct 16, 2020

Motivation for this change

See #44831, though this is a more extreme approach.

Not sure yet if this is a stupid idea or a good way to quickly apply Mesa updates. This mainly makes sense under the assumption that minor/patch releases only update the drivers (mesa.drivers) anyway. The plan would be to freeze mesa at X.Y.1 (first stable release of a series) and update mesa_drivers to X.Y.1+N without going through staging first. Or another idea would be to simultaneously update mesa via staging and mesa_drivers via master.

Personally I'm already using that approach to test Mesa updates and it seemed to be fine so far (though I only did very minimal testing). However with lsof I can always see a few references to the previous Mesa version, though mainly(/only?) for libgbm IIRC (e.g. /nix/store/***-mesa-X.Y.Z/lib/libgbm.so.1.0.0). For that reasons it might make sense to simultaneously update mesa via staging or implement the approach from #44831.

Note: The update to 20.1.10 doesn't make sense since 20.2.1 is already in staging, it only serves as an example.

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.

@primeos primeos changed the title Mesa efficient driver upgrades mesa: Attempt to upgrade the drivers with a minimal rebuild impact Oct 16, 2020
@ofborg ofborg bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: package (new) This PR adds a new package labels Oct 16, 2020
@ofborg ofborg bot requested a review from vcunat October 16, 2020 11:38
@ofborg ofborg bot added 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Oct 16, 2020
@primeos primeos force-pushed the mesa-efficient-driver-upgrades branch from dadc27a to c15cc31 Compare November 7, 2020 20:23
@primeos primeos marked this pull request as ready for review November 7, 2020 20:23
@primeos
Copy link
Copy Markdown
Member Author

primeos commented Nov 7, 2020

@vcunat what do you think about this? Is this worth a shot or a stupid idea?

I guess there are the following drawbacks:

  • Nothing in Nixpkgs should use mesa_drivers as a dependency (might be avoidable, e.g. at least CI should complain if we define it as alias)
  • Everyone who overrides hardware.opengl.package won't get patch releases anymore
  • mesa might lack some changes (e.g. if libgbm changes)

@primeos primeos force-pushed the mesa-efficient-driver-upgrades branch from c15cc31 to 5a26268 Compare November 8, 2020 21:59
@primeos primeos mentioned this pull request Nov 8, 2020
10 tasks
@primeos primeos marked this pull request as draft November 24, 2020 18:52
@gebner gebner mentioned this pull request Apr 4, 2021
10 tasks
@primeos
Copy link
Copy Markdown
Member Author

primeos commented Apr 13, 2021

This hacky idea isn't required anymore thanks to #118479 (see #118753 (comment)) :)

@primeos primeos closed this Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant