[systemd-devel] PropertiesChanged signal not sent unless Subscribe called
Carlos Garnacho
carlosg at gnome.org
Fri Apr 12 11:40:46 UTC 2024
Hi,
On Thu, Apr 11, 2024 at 11:45 PM segfault <segfault at riseup.net> wrote:
>
> Hi,
>
> I noticed that some functionality of gnome-settings-daemon doesn't work
> as expected on some systems. I tracked that down to the fact that
> gnome-settings-daemon subscribes to the
> org.freedesktop.DBus.Properties.PropertiesChanged signal of
> org.freedesktop.systemd1 but doesn't call the
> org.freedesktop.systemd1.Manager.Subscribe() method first.
>
> On the issue I created for that [1], there is some confusion about
> whether it's expected that this signal is only sent after calling
> org.freedesktop.systemd1.Manager.Subscribe(). The argument is that the
> PropertiesChanged signal is part of the D-Bus standard and not defined
> in the org.freedesktop.systemd1.Manager interface, so it's unexpected
> that it's not sent by default.
>
> [1] https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/issues/790
Adding some more information, the gnome-settings-daemon code[1]
listens to PropertiesChanged on any path offering either of the
org.freedesktop.systemd1.Service / org.freedesktop.systemd1.Scope
interfaces, matching on the "Result" property which IIUC the code/docs
should notify on changes for both of those interfaces.
Cheers,
Carlos
[1] https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/blob/9a1c1412/plugins/housekeeping/gsd-systemd-notify.c#L185-L227
More information about the systemd-devel
mailing list