-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
gnome3.gnome-settings-daemon: fix #14168 #57620
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
Conversation
@@ -40,6 +40,8 @@ in | |||
|
|||
services.udev.packages = [ cfg.package ]; | |||
|
|||
security.wrappers.gsd-backlight-helper.source = "${pkgs.gnome3.gnome-settings-daemon}/libexec/gsd-backlight-helper"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm getting this when running the wrapper:
❯ gsd-backlight-helper
This program can only be used by the root user
So we're hitting this for some reason: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/blob/master/plugins/power/gsd-backlight-helper.c#L65
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this resolved with the latest version of this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left this alone for a bit because we just need to get 3.32 on master first.
Then debugging would be quick.
Though I'm not sure why we're getting https://gitlab.gnome.org/GNOME/gnome-settings-daemon/blob/master/plugins/power/gsd-backlight-helper.c#L65
bd67df9
to
4b0ebf1
Compare
So I've looked and I don't know why this isn't working. Think something like worldofpeace@c744359 would work? |
Yeah, seems like Seeing that the problem is a new polkit policy file, but an old gsd application (#14168 (comment)) your fix should hopefully work. Seems sane to me 👍 |
Strangely enough the effective id would only be 0 if I removed the layer of wrapping from
Right, think I'll go with that since we'll still be able to use polkit. |
4b0ebf1
to
a034c40
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't tested, but LGTM
# So the polkit policy can reference /run/current-system/sw/bin/gsd-backlight-helper | ||
postFixup = '' | ||
mkdir $out/bin | ||
ln -s $out/libexec/gsd-backlight-helper $out/bin/gsd-backlight-helper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use some other path that is guaranteed to be linked but not in the PATH
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a subdirectory of /bin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doing bin/gnome-settings-daemon
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could pathsToLink = [ "/libexec/gsd-backlight-helper" ];
in gnome-settings-daemon.nix
work? Seems somewhat cleaner to me, though not a big deal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah thought of that too. It'd be cleaner but I don't see it happening soon where gnome-settings-daemon
wouldn't be in environment.systemPackages
. (thusly needing that).
The issue in brief is caused by the fact that gnome-settings-daemon is non-restartable and if the policy definitions change in any way it won't propagate to the running system because of that. By patching references to the backlight helper to /run/current-system/sw/bin/gsd-backlight-helper the polkit policy will not undergo a change.
a034c40
to
f6e9229
Compare
Is the same fix as in #57620 just for Pantheon's settings daemon.
Motivation for this change
Originally from #54584 then got moved to the 3.32 pr.
However GitHub hides long discussions in prs that get really long, like the one's for major GNOME3 updates. So putting bugfixes in there, where discussion is important to be easily accessible, isn't a good idea.
This is blocked by #57027 because it depends on code addedin that release.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)