diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2022-02-19 07:03:02 +0100 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2022-03-25 15:02:32 +0100 |
commit | 185522691f5cd562a80a511b3560844780a58953 (patch) | |
tree | eb07e5ff82b38f764bcdf0f1a4e1b5bde8c832d2 /nixos | |
parent | 47dbd9f99a44e728f12058ce6c95874954ba30e3 (diff) | |
download | nixlib-185522691f5cd562a80a511b3560844780a58953.tar nixlib-185522691f5cd562a80a511b3560844780a58953.tar.gz nixlib-185522691f5cd562a80a511b3560844780a58953.tar.bz2 nixlib-185522691f5cd562a80a511b3560844780a58953.tar.lz nixlib-185522691f5cd562a80a511b3560844780a58953.tar.xz nixlib-185522691f5cd562a80a511b3560844780a58953.tar.zst nixlib-185522691f5cd562a80a511b3560844780a58953.zip |
nixos/gnome: Remove realtime scheduling option
It is now accomplished using rtkit rather than setcap wrapper: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2060 Replace the option with `security.rtkit.enable`. Closes: https://github.com/NixOS/nixpkgs/issues/90201 Closes: https://github.com/NixOS/nixpkgs/issues/86730
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/doc/manual/from_md/release-notes/rl-2205.section.xml | 10 | ||||
-rw-r--r-- | nixos/doc/manual/release-notes/rl-2205.section.md | 2 | ||||
-rw-r--r-- | nixos/modules/services/x11/desktop-managers/gnome.nix | 59 |
3 files changed, 16 insertions, 55 deletions
diff --git a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml index 0b01c4e08847..51184ba0a2c6 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml @@ -672,6 +672,16 @@ </listitem> <listitem> <para> + <literal>services.gnome.experimental-features.realtime-scheduling</literal> + option has been removed, as GNOME Shell now + <link xlink:href="https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2060">uses + rtkit</link>. Use + <literal>security.rtkit.enable = true;</literal> instead. As + before, you will need to have it enabled using GSettings. + </para> + </listitem> + <listitem> + <para> If you previously used <literal>/etc/docker/daemon.json</literal>, you need to incorporate the changes into the new option diff --git a/nixos/doc/manual/release-notes/rl-2205.section.md b/nixos/doc/manual/release-notes/rl-2205.section.md index 5b93b644eea9..9caec0ac07f5 100644 --- a/nixos/doc/manual/release-notes/rl-2205.section.md +++ b/nixos/doc/manual/release-notes/rl-2205.section.md @@ -275,6 +275,8 @@ In addition to numerous new and upgraded packages, this release has the followin - The `gnome-passwordsafe` package updated to [version 6.x](https://gitlab.gnome.org/World/secrets/-/tags/6.0) and renamed to `gnome-secrets`. +- `services.gnome.experimental-features.realtime-scheduling` option has been removed, as GNOME Shell now [uses rtkit](https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2060). Use `security.rtkit.enable = true;` instead. As before, you will need to have it enabled using GSettings. + - If you previously used `/etc/docker/daemon.json`, you need to incorporate the changes into the new option `virtualisation.docker.daemon.settings`. - Ntopng (`services.ntopng`) is updated to 5.2.1 and uses a separate Redis instance if `system.stateVersion` is at least `22.05`. Existing setups shouldn't be affected. diff --git a/nixos/modules/services/x11/desktop-managers/gnome.nix b/nixos/modules/services/x11/desktop-managers/gnome.nix index 4bbf59c0d158..98e240f66100 100644 --- a/nixos/modules/services/x11/desktop-managers/gnome.nix +++ b/nixos/modules/services/x11/desktop-managers/gnome.nix @@ -132,6 +132,10 @@ in [ "environment" "gnome3" "excludePackages" ] [ "environment" "gnome" "excludePackages" ] ) + (mkRemovedOptionModule + [ "services" "gnome" "experimental-features" "realtime-scheduling" ] + "Set `security.rtkit.enable = true;` to make realtime scheduling possible. (Still needs to be enabled using GSettings.)" + ) ]; options = { @@ -142,38 +146,6 @@ in core-utilities.enable = mkEnableOption "GNOME core utilities"; core-developer-tools.enable = mkEnableOption "GNOME core developer tools"; games.enable = mkEnableOption "GNOME games"; - - experimental-features = { - realtime-scheduling = mkOption { - type = types.bool; - default = false; - description = '' - Makes mutter (which propagates to gnome-shell) request a low priority real-time - scheduling which is only available on the wayland session. - To enable this experimental feature it requires a restart of the compositor. - Note that enabling this option only enables the <emphasis>capability</emphasis> - for realtime-scheduling to be used. It doesn't automatically set the gsetting - so that mutter actually uses realtime-scheduling. This would require adding <literal> - rt-scheduler</literal> to <literal>/org/gnome/mutter/experimental-features</literal> - with dconf-editor. You cannot use extraGSettingsOverrides because that will only - change the default value of the setting. - - Please be aware of these known issues with the feature in nixos: - <itemizedlist> - <listitem> - <para> - <link xlink:href="https://github.com/NixOS/nixpkgs/issues/90201">NixOS/nixpkgs#90201</link> - </para> - </listitem> - <listitem> - <para> - <link xlink:href="https://github.com/NixOS/nixpkgs/issues/86730">NixOS/nixpkgs#86730</link> - </para> - </listitem> - </itemizedlist> - ''; - }; - }; }; services.xserver.desktopManager.gnome = { @@ -480,29 +452,6 @@ in ]; }) - # Enable soft realtime scheduling, only supported on wayland - (mkIf serviceCfg.experimental-features.realtime-scheduling { - security.wrappers.".gnome-shell-wrapped" = { - source = "${pkgs.gnome.gnome-shell}/bin/.gnome-shell-wrapped"; - owner = "root"; - group = "root"; - capabilities = "cap_sys_nice=ep"; - }; - - systemd.user.services.gnome-shell-wayland = let - gnomeShellRT = with pkgs.gnome; pkgs.runCommand "gnome-shell-rt" {} '' - mkdir -p $out/bin/ - cp ${gnome-shell}/bin/gnome-shell $out/bin - sed -i "s@${gnome-shell}/bin/@${config.security.wrapperDir}/@" $out/bin/gnome-shell - ''; - in { - # Note we need to clear ExecStart before overriding it - serviceConfig.ExecStart = ["" "${gnomeShellRT}/bin/gnome-shell"]; - # Do not use the default environment, it provides a broken PATH - environment = mkForce {}; - }; - }) - # Adapt from https://gitlab.gnome.org/GNOME/gnome-build-meta/blob/gnome-3-38/elements/core/meta-gnome-core-utilities.bst (mkIf serviceCfg.core-utilities.enable { environment.systemPackages = |