Bug#1060132: bookworm-pu: package mate-settings-daemon/1.26.0-1+deb12u1
Package: release.debian.org
Severity: normal
Tags: bookworm
User: release.debian.org@packages.debian.org
Usertags: pu
X-Debbugs-Cc: mate-settings-daemon@packages.debian.org
Control: affects -1 + src:mate-settings-daemon
While prepare a new upstream release upload for unstable, this
bookworm-pu has also been prepared, cherry-picking various fixes from the
current upstream release (v1.26.1).
[ Reason ]
Resolved issues:
* two memleaks resolved
* auto-enable HiDPI for QHD displays
* handle race conditions during rfkill hotkey events
[ Impact ]
The above issues will stay unresolved if this upload gets rejected.
[ Tests ]
Manually.
[ Risks ]
For MATE desktop users, in case regressions occur.
[ Checklist ]
[x] *all* changes are documented in the d/changelog
[x] I reviewed all changes and I approve them
[x] attach debdiff against the package in (old)stable
[x] the issue is verified as fixed in unstable
[ Changes ]
+ [ Martin Wimpress ]
+ * debian/patches:
+ + Add 1002-debounce_multiple_rfkill_events.patch (LP: #1936956)
+
+ [ Mike Gabriel ]
+ * debian/patches:
+ + Add 0003-datetime-fix-memory-leak.patch and 0004-mate-settings-manager-
+ fix-memory-leak.patch. Fix two memory leaks. (Cherry-picked from v1.26.1).
+ + Add 0005-Relax-High-DPI-limits.patch. Set DPI_LIMIT to 90% of 2x
+ DPI_FALLBACK, to catch QHD laptop screens. (Cherry-picked from v1.26.1).
[ Other info ]
None.
diff -Nru mate-settings-daemon-1.26.0/debian/changelog mate-settings-daemon-1.26.0/debian/changelog
--- mate-settings-daemon-1.26.0/debian/changelog 2021-12-11 16:57:53.000000000 +0100
+++ mate-settings-daemon-1.26.0/debian/changelog 2024-01-06 09:05:33.000000000 +0100
@@ -1,3 +1,18 @@
+mate-settings-daemon (1.26.0-1+deb12u1) bookworm; urgency=medium
+
+ [ Martin Wimpress ]
+ * debian/patches:
+ + Add 1002-debounce_multiple_rfkill_events.patch (LP: #1936956)
+
+ [ Mike Gabriel ]
+ * debian/patches:
+ + Add 0003-datetime-fix-memory-leak.patch and 0004-mate-settings-manager-
+ fix-memory-leak.patch. Fix two memory leaks. (Cherry-picked from v1.26.1).
+ + Add 0005-Relax-High-DPI-limits.patch. Set DPI_LIMIT to 90% of 2x
+ DPI_FALLBACK, to catch QHD laptop screens. (Cherry-picked from v1.26.1).
+
+ -- Mike Gabriel <sunweaver@debian.org> Sat, 06 Jan 2024 09:05:33 +0100
+
mate-settings-daemon (1.26.0-1) unstable; urgency=medium
[ Martin Wimpress ]
diff -Nru mate-settings-daemon-1.26.0/debian/patches/0003-datetime-fix-memory-leak.patch mate-settings-daemon-1.26.0/debian/patches/0003-datetime-fix-memory-leak.patch
--- mate-settings-daemon-1.26.0/debian/patches/0003-datetime-fix-memory-leak.patch 1970-01-01 01:00:00.000000000 +0100
+++ mate-settings-daemon-1.26.0/debian/patches/0003-datetime-fix-memory-leak.patch 2024-01-06 09:04:30.000000000 +0100
@@ -0,0 +1,51 @@
+From 0a7512040ff4e9e6354d8d519cd74dfb50fb7825 Mon Sep 17 00:00:00 2001
+From: rbuj <robert.buj@gmail.com>
+Date: Thu, 21 Oct 2021 16:15:39 +0200
+Subject: [PATCH 3/5] datetime: fix memory leak
+
+Signed-off-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+---
+ plugins/datetime/msd-datetime-mechanism.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/plugins/datetime/msd-datetime-mechanism.c b/plugins/datetime/msd-datetime-mechanism.c
+index 0a604f6..75a7615 100644
+--- a/plugins/datetime/msd-datetime-mechanism.c
++++ b/plugins/datetime/msd-datetime-mechanism.c
+@@ -228,7 +228,7 @@ msd_datetime_mechanism_new (void)
+ static gboolean
+ _check_polkit_for_action (MsdDatetimeMechanism *mechanism, DBusGMethodInvocation *context, const char *action)
+ {
+- const char *sender;
++ char *sender;
+ GError *error;
+ PolkitSubject *subject;
+ PolkitAuthorizationResult *result;
+@@ -238,6 +238,7 @@ _check_polkit_for_action (MsdDatetimeMechanism *mechanism, DBusGMethodInvocation
+ /* Check that caller is privileged */
+ sender = dbus_g_method_get_sender (context);
+ subject = polkit_system_bus_name_new (sender);
++ g_free (sender);
+
+ result = polkit_authority_check_authorization_sync (mechanism->priv->auth,
+ subject,
+@@ -587,7 +588,7 @@ check_can_do (MsdDatetimeMechanism *mechanism,
+ const char *action,
+ DBusGMethodInvocation *context)
+ {
+- const char *sender;
++ char *sender;
+ PolkitSubject *subject;
+ PolkitAuthorizationResult *result;
+ GError *error;
+@@ -595,6 +596,7 @@ check_can_do (MsdDatetimeMechanism *mechanism,
+ /* Check that caller is privileged */
+ sender = dbus_g_method_get_sender (context);
+ subject = polkit_system_bus_name_new (sender);
++ g_free (sender);
+
+ error = NULL;
+ result = polkit_authority_check_authorization_sync (mechanism->priv->auth,
+--
+2.39.2
+
diff -Nru mate-settings-daemon-1.26.0/debian/patches/0004-mate-settings-manager-fix-memory-leak.patch mate-settings-daemon-1.26.0/debian/patches/0004-mate-settings-manager-fix-memory-leak.patch
--- mate-settings-daemon-1.26.0/debian/patches/0004-mate-settings-manager-fix-memory-leak.patch 1970-01-01 01:00:00.000000000 +0100
+++ mate-settings-daemon-1.26.0/debian/patches/0004-mate-settings-manager-fix-memory-leak.patch 2024-01-06 09:04:30.000000000 +0100
@@ -0,0 +1,37 @@
+From e504604afc8f1a5b3bd9efdcb97b02fce4e53f57 Mon Sep 17 00:00:00 2001
+From: rbuj <robert.buj@gmail.com>
+Date: Mon, 14 Mar 2022 13:31:00 +0100
+Subject: [PATCH 4/5] mate-settings-manager: fix memory leak
+
+Signed-off-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+---
+ mate-settings-daemon/mate-settings-manager.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/mate-settings-daemon/mate-settings-manager.c b/mate-settings-daemon/mate-settings-manager.c
+index 91b5d13..8c511a1 100644
+--- a/mate-settings-daemon/mate-settings-manager.c
++++ b/mate-settings-daemon/mate-settings-manager.c
+@@ -427,15 +427,18 @@ static void
+ mate_settings_manager_init (MateSettingsManager *manager)
+ {
+ char *schema;
+- GSettings *settings;
+
+ manager->priv = mate_settings_manager_get_instance_private (manager);
+
+ schema = g_strdup_printf ("%s.plugins", DEFAULT_SETTINGS_PREFIX);
+ if (is_schema (schema)) {
++ GSettings *settings;
++
+ settings = g_settings_new (schema);
+ manager->priv->init_load_priority = g_settings_get_int (settings, "init-load-priority");
++ g_object_unref (settings);
+ }
++ g_free (schema);
+ }
+
+ static void
+--
+2.39.2
+
diff -Nru mate-settings-daemon-1.26.0/debian/patches/0005-Relax-High-DPI-limits.patch mate-settings-daemon-1.26.0/debian/patches/0005-Relax-High-DPI-limits.patch
--- mate-settings-daemon-1.26.0/debian/patches/0005-Relax-High-DPI-limits.patch 1970-01-01 01:00:00.000000000 +0100
+++ mate-settings-daemon-1.26.0/debian/patches/0005-Relax-High-DPI-limits.patch 2024-01-06 09:04:30.000000000 +0100
@@ -0,0 +1,34 @@
+From 669fa3007a661c033a16526ee2dc7672d164d5f7 Mon Sep 17 00:00:00 2001
+From: Fabio Pugliese Ornellas <fabio.ornellas@gmail.com>
+Date: Thu, 8 Sep 2022 23:44:35 +0100
+Subject: [PATCH 5/5] Relax High DPI limits
+
+Signed-off-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+---
+ plugins/xsettings/msd-xsettings-manager.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/plugins/xsettings/msd-xsettings-manager.c b/plugins/xsettings/msd-xsettings-manager.c
+index ec7d079..c8199da 100644
+--- a/plugins/xsettings/msd-xsettings-manager.c
++++ b/plugins/xsettings/msd-xsettings-manager.c
+@@ -76,12 +76,14 @@
+ #define DPI_HIGH_REASONABLE_VALUE 500
+
+ /* The minimum resolution at which we turn on a window-scale of 2 */
+-#define HIDPI_LIMIT (DPI_FALLBACK * 2)
++/* Set this to 90% of 2x DPI_FALLBACK, to catch QHD laptop screens */
++/* that are just below the 2x DPI_FALLBACK mark */
++#define HIDPI_LIMIT (DPI_FALLBACK * 2 * 90 / 100)
+
+ /* The minimum screen height at which we turn on a window-scale of 2;
+ * below this there just isn't enough vertical real estate for GNOME
+ * apps to work, and it's better to just be tiny */
+-#define HIDPI_MIN_HEIGHT 1500
++#define HIDPI_MIN_HEIGHT 1440
+
+ #define GPOINTER_TO_BOOLEAN(i) ((gboolean) ((GPOINTER_TO_INT(i) == 2) ? TRUE : FALSE))
+ #define GBOOLEAN_TO_POINTER(i) (GINT_TO_POINTER ((i) ? 2 : 1))
+--
+2.39.2
+
diff -Nru mate-settings-daemon-1.26.0/debian/patches/1002-debounce_multiple_rfkill_events.patch mate-settings-daemon-1.26.0/debian/patches/1002-debounce_multiple_rfkill_events.patch
--- mate-settings-daemon-1.26.0/debian/patches/1002-debounce_multiple_rfkill_events.patch 1970-01-01 01:00:00.000000000 +0100
+++ mate-settings-daemon-1.26.0/debian/patches/1002-debounce_multiple_rfkill_events.patch 2024-01-06 08:46:10.000000000 +0100
@@ -0,0 +1,51 @@
+Description: When pressing airplane mode hotkey on many HP laptops, the AT keyboard,
+HP Wireless device (HPQ6001) and Intel HID device (INT33D5) can all send
+rfkill hotkey event.
+
+Preferably we should just leave one device and unregister the others. In
+practice this is hard to achieve, becuase the presence of a device
+doesn't necessarily mean it can generate rfkill hotkey event, we can
+only know what devices are capable to generate rfkill event when the
+hotkey gets pressed.
+
+So add a delay between each rfkill event to workaround the issue. This
+is also how the other OS handles multiple rfkill events.
+
+Author: Martin Wimpress <code@wimpress.io>
+
+diff --git a/plugins/media-keys/msd-media-keys-manager.c b/plugins/media-keys/msd-media-keys-manager.c
+index 4abb4af..facf2ac 100644
+--- a/plugins/media-keys/msd-media-keys-manager.c
++++ b/plugins/media-keys/msd-media-keys-manager.c
+@@ -84,6 +84,7 @@ struct _MsdMediaKeysManagerPrivate
+
+ /* RFKill stuff */
+ guint rfkill_watch_id;
++ guint64 rfkill_last_time;
+ GDBusProxy *rfkill_proxy;
+ GCancellable *rfkill_cancellable;
+
+@@ -977,6 +978,7 @@ do_rfkill_action (MsdMediaKeysManager *manager,
+ {
+ const char *has_mode, *hw_mode, *mode;
+ gboolean new_state;
++ guint64 current_time;
+ RfkillData *data;
+
+ dialog_init (manager);
+@@ -988,6 +990,15 @@ do_rfkill_action (MsdMediaKeysManager *manager,
+ if (manager->priv->rfkill_proxy == NULL)
+ return;
+
++ /* Some hardware can generate multiple rfkill events from different
++ * drivers, on a single hotkey press. Only process the first event and
++ * debounce the others */
++ current_time = g_get_monotonic_time ();
++ if (current_time - manager->priv->rfkill_last_time < G_USEC_PER_SEC)
++ return;
++
++ manager->priv->rfkill_last_time = current_time;
++
+ if (get_rfkill_property (manager, has_mode) == FALSE)
+ return;
+
diff -Nru mate-settings-daemon-1.26.0/debian/patches/series mate-settings-daemon-1.26.0/debian/patches/series
--- mate-settings-daemon-1.26.0/debian/patches/series 2020-02-13 11:21:31.000000000 +0100
+++ mate-settings-daemon-1.26.0/debian/patches/series 2024-01-06 09:04:30.000000000 +0100
@@ -1 +1,5 @@
1001_RDA-Don-t-apply-stored-monitor-configuration-if-sess.patch
+1002-debounce_multiple_rfkill_events.patch
+0003-datetime-fix-memory-leak.patch
+0004-mate-settings-manager-fix-memory-leak.patch
+0005-Relax-High-DPI-limits.patch
Reply to: