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

nixos/gnome3: add realtime-scheduling option #99697

Merged

Conversation

worldofpeace
Copy link
Contributor

@worldofpeace worldofpeace commented Oct 6, 2020

This adds an option services.gnome3.experimental-features.realtime-scheduling
See this comment for the motivation 0.
Having gnome-shell launched with capability seemed harmless at first,
but it caused these issues 1 2 for people who aren't even using
the feature. It makes more sense to make this optional.

Motivation for this change
Things done

I built the nixos manual.

  • 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.

This adds an option services.gnome3.experimental-features.realtime-scheduling
See this comment for the motivation [0].
Having gnome-shell launched with capability seemed harmless at first,
but it caused these issues [1] [2] for people who aren't even using
the feature. It makes more sense to make this optional.

[0]: NixOS#90201 (comment)
[1]: NixOS#90201
[2]: NixOS#86730
@worldofpeace worldofpeace requested a review from a team October 6, 2020 06:00
@worldofpeace worldofpeace added this to the 20.09 milestone Oct 6, 2020
@worldofpeace worldofpeace added the 9.needs: port to stable A PR needs a backport to the stable release. label Oct 6, 2020
@worldofpeace worldofpeace added this to In Progress in GNOME Oct 6, 2020
@@ -68,6 +68,38 @@ in
core-shell.enable = mkEnableOption "GNOME Shell services";
core-utilities.enable = mkEnableOption "GNOME core utilities";
games.enable = mkEnableOption "GNOME games";

experimental-features = {
Copy link
Member

Choose a reason for hiding this comment

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

Style nit: why kebab case rather than camel case? Just mimicking nix's experimental-features flag/configuration option?

(Doesn't really matter, but it seems we use camel case everywhere else.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The options above mimic the element names for GNOME OS from gnome-build-meta. The actual dconf key this setting operates on is /org/gnome/mutter/experimental-features, and they just throw whatever feature in there. In the future it would be nice to have #54150 to extend with more experimental-feature options. (though I do see how it's named similar to how nix has experimental-features). I just happened to group it in services.gnome3 because that namespace made the most sense.

Though, you're correct we mix casing for options. But for these ones it would be really ugly to read in camel.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, OK, fair enough. Carry on :)

@TredwellGit
Copy link
Member

Thanks for writing this. I was going to add the option myself but was busier than expected last week.

Copy link
Contributor

@hedning hedning left a comment

Choose a reason for hiding this comment

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

LGTM, should probably be backported too?

@TredwellGit
Copy link
Member

Please backport since it is really not obvious that this is why scanners do not work.

@worldofpeace worldofpeace merged commit d83e5a1 into NixOS:master Oct 6, 2020
GNOME automation moved this from In Progress to Done Oct 6, 2020
@worldofpeace
Copy link
Contributor Author

LGTM, should probably be backported too?

Yep, absolutely.

@worldofpeace worldofpeace deleted the rt-sched-optional-and-off-by-default branch October 6, 2020 20:30
@worldofpeace
Copy link
Contributor Author

backported to 20.09 in 001334b

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

Successfully merging this pull request may close these issues.

None yet

4 participants