-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
Enabling GNOME’s experimental realtime-scheduling unsets LD_LIBRARY_PATH #90201
Comments
GNOME Wayland doesn't use the environment variables defined in |
It's worth trying to comment out these lines, that helped with [another problem] for some strange reason](#86730 (comment)) (follow these directions to build the system from a git repo: nixpkgs/nixos/modules/services/x11/desktop-managers/gnome3.nix Lines 299 to 310 in 83182f4
@Cogitri while display managers doesn't setup the environment for the wayland sessions they launch, gnome-shell (through gnome-session) on wayland runs a login shell (using the user's In that vein it's worth mentioning the login shell might do different things than the X11 setup (which mostly just sources |
Exactly. My observation is the same. It seems that only I've also spent a few hours debugging why simple-scan & xsane didn't detect my network scanner unless launched from a terminal / my previous machine that used Xorg. Almost opened a bug report upstream. For clarity's sake, @hedning's suggestion for removing the override means applying this patch: diff --git i/nixos/modules/services/x11/desktop-managers/gnome3.nix w/nixos/modules/services/x11/desktop-managers/gnome3.nix
index 69cf9832172..fe2489f5e16 100644
--- i/nixos/modules/services/x11/desktop-managers/gnome3.nix
+++ w/nixos/modules/services/x11/desktop-managers/gnome3.nix
@@ -296,15 +296,9 @@ in
capabilities = "cap_sys_nice=ep";
};
- systemd.user.services.gnome-shell-wayland = let
- gnomeShellRT = with pkgs.gnome3; 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 {
+ systemd.user.services.gnome-shell-wayland = {
# Note we need to clear ExecStart before overriding it
- serviceConfig.ExecStart = ["" "${gnomeShellRT}/bin/gnome-shell"];
+ serviceConfig.ExecStart = ["" "${pkgs.gnome3.gnome-shell}/bin/gnome-shell"];
# Do not use the default environment, it provides a broken PATH
environment = mkForce {};
}; So, we don't open a PR because we don't know to explain what's wrong with the wrapper right? I have an undeveloped suspicion that it's due to the way our wrappers are created? Could it be that e.g In the meantime, @hedning could you explain a bit better the motive for 927a6fd ? I mean, why does it need RT scheduling? |
Gnome shell, or rather mutter gained the ability to run with soft realtime scheduling, which in theory should improve performance. To get this to work we need a security wrapper which provides the necessary capability. It's worth noting that it's not enough to launch with the capability, there's a gsettings switch which needs to be turned on too (mutter's
I've kinda forgot about the issue, but we should probably disable the wrapper for now since it breaks things (would be nice to get into 20.09). Regardless of our understanding the underlying issue, it's a fairly minor feature which probably aren't used by many people (especially since it's not enabled by default). Might be nice having a preference for it, but it's not a big deal tbh.
Yeah, that sounds likely. If the patch you posted works that rules out the systemd service as the culprit, which pretty much leaves the security wrapper. Edit: yeah, |
This reverts commit 927a6fd. Fixes: NixOS#90201 NixOS#90184 NixOS#86730
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
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]: #90201 (comment) [1]: #90201 [2]: #86730 (cherry picked from commit 656cd70)
I marked this as stale due to inactivity. → More info |
I'll only note that now the "conflict" in nixos between this option and configuring sane scanners, is documented thanks to https://github.com/NixOS/nixpkgs/pull/99697/files . Also, I think that sane and other scanning packages should get their environment altered in an override, and not as part of the whole system's environment. This would make this a non-issue, but still keep #86730 an issue relevant for the 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: #90201 Closes: #86730
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: #90201 Closes: #86730
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: #90201 Closes: #86730
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: #90201 Closes: #86730
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: #90201 Closes: #86730
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: #90201 Closes: #86730
When I login to a Gnome+Wayland session
LD_LIBRARY_PATH
is always empty even though it should have been set in/etc/profile
.I came across this because I have an issue with SANE. My
/etc/profile
sets these two variables (by sourcing/nix/store/hh8...q2w-set-environment
):After logging in
SANE_CONFIG_DIR
is set correctly butLD_LIBRARY_PATH
is empty. When I login to a Gnome+XServer session both variables are set as expected.To Reproduce
Steps to reproduce the behavior:
Login to a Gnome+Wayland session
check
LD_LIBRARY_PATH
Expected behavior
LD_LIBRARY_PATH
should be set like in a GNOME+XServer session:Metadata
"x86_64-linux"
Linux 5.4.45, NixOS, 20.03.2133.8946799e079 (Markhor)
yes
yes
nix-env (Nix) 2.3.6
"nixos-20.03.2133.8946799e079"
/nix/var/nix/profiles/per-user/root/channels/nixos
Maintainer information:
The text was updated successfully, but these errors were encountered: