Bug#1070674: gnome-settings-daemon: No oom-kill notifications

segfault segfault at riseup.net
Mon May 6 23:34:26 BST 2024


Package: gnome-settings-daemon
Version: 46.0-1+b3
Severity: normal
Tags: patch upstream
X-Debbugs-Cc: segfault at riseup.net

The systemd OOM notification functionality of gnome-settings-daemon is broken
on Debian. On Fedora, a notification is shown when a process is OOM-killed. On
Debian, it only works after applying the attached patch, which calls the
Subscribe() method of org.freedesktop.systemd1.Manager. It's not clear to me
why it works without the patch on Fedora.

I also created an issue and MR upstream, but upstream is waiting on a
confirmation that the systemd behavior (not sending the PropertiesChanged
signal unless Subscribe() was called) is expected.

Upstream issue: https://gitlab.gnome.org/GNOME/gnome-settings-
daemon/-/issues/790
Upstream MR: https://gitlab.gnome.org/GNOME/gnome-settings-
daemon/-/merge_requests/366


-- System Information:
Debian Release: trixie/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'stable-updates'), (500, 'stable-security'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.7.9-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages gnome-settings-daemon depends on:
ii  gnome-settings-daemon-common                46.0-1
ii  gsettings-desktop-schemas                   46.0-1
ii  libasound2t64                               1.2.11-1+b1
ii  libc6                                       2.37-19
ii  libcairo2                                   1.18.0-3+b1
ii  libcanberra-gtk3-0t64 [libcanberra-gtk3-0]  0.30-12.2+b2
ii  libcanberra0                                0.30-16
ii  libcolord2                                  1.4.7-1+b1
ii  libcups2t64                                 2.4.7-1.2+b1
ii  libfontconfig1                              2.15.0-1.1
ii  libgck-2-2                                  4.2.0-5
ii  libgcr-4-4                                  4.2.0-5
ii  libgdk-pixbuf-2.0-0                         2.42.10+dfsg-3+b3
ii  libgeoclue-2-0                              2.7.1-2+b1
ii  libgeocode-glib-2-0                         3.26.3-6+b2
ii  libglib2.0-0t64                             2.78.4-7
ii  libgnome-desktop-3-20t64                    44.0-5
ii  libgtk-3-0t64                               3.24.41-4
ii  libgudev-1.0-0                              238-5
ii  libgweather-4-0t64                          4.4.2-1
ii  libmm-glib0                                 1.22.0-3+b1
ii  libnm0                                      1.46.0-2
ii  libnotify4                                  0.8.3-1+b1
ii  libp11-kit0                                 0.25.3-5
ii  libpam-systemd [logind]                     255.5-1
ii  libpango-1.0-0                              1.52.1+ds-1
ii  libpangocairo-1.0-0                         1.52.1+ds-1
ii  libpolkit-gobject-1-0                       124-2
ii  libpulse-mainloop-glib0                     16.1+dfsg1-5
ii  libpulse0                                   16.1+dfsg1-5
ii  libspa-0.2-bluetooth                        1.0.5-1+b3
ii  libsystemd0                                 255.5-1
ii  libupower-glib3                             1.90.3-1
ii  libwacom9                                   2.10.0-2
ii  libwayland-client0                          1.22.0-2.1+b1
ii  libx11-6                                    2:1.8.7-1+b1
ii  libxext6                                    2:1.3.4-1+b1
ii  libxfixes3                                  1:6.0.0-2+b1
ii  libxi6                                      2:1.8.1-1
ii  pipewire-audio                              1.0.5-1

Versions of packages gnome-settings-daemon recommends:
ii  iio-sensor-proxy   3.5-1+b2
ii  pipewire-audio     1.0.5-1
ii  pkexec             124-2
ii  x11-xserver-utils  7.7+10+b1

Versions of packages gnome-settings-daemon suggests:
pn  usbguard  <none>

-- no debconf information
-------------- next part --------------
diff --git a/plugins/housekeeping/gsd-systemd-notify.c b/plugins/housekeeping/gsd-systemd-notify.c
index 39984f5d..57421cc5 100644
--- a/plugins/housekeeping/gsd-systemd-notify.c
+++ b/plugins/housekeeping/gsd-systemd-notify.c
@@ -204,6 +204,22 @@ on_bus_gotten (GDBusConnection  *obj,
         }
 
         self->session = con;
+
+        // Subscribe to systemd events by calling Subscribe on
+        // org.freedesktop.systemd1.Manager
+        g_dbus_connection_call (self->session,
+                                "org.freedesktop.systemd1",
+                                "/org/freedesktop/systemd1",
+                                "org.freedesktop.systemd1.Manager",
+                                "Subscribe",
+                                NULL,
+                                G_VARIANT_TYPE ("()"),
+                                G_DBUS_CALL_FLAGS_NONE,
+                                -1,
+                                NULL,
+                                NULL,
+                                NULL);
+
         self->sub_service = g_dbus_connection_signal_subscribe (self->session,
                                                                 "org.freedesktop.systemd1",
                                                                 "org.freedesktop.DBus.Properties",



More information about the pkg-gnome-maintainers mailing list