diff -Nru unity-settings-daemon-15.04.1+18.04.20180216/debian/bzr-builder.manifest unity-settings-daemon-15.04.1+18.04.20180413/debian/bzr-builder.manifest --- unity-settings-daemon-15.04.1+18.04.20180216/debian/bzr-builder.manifest 2018-04-06 14:01:16.000000000 +0000 +++ unity-settings-daemon-15.04.1+18.04.20180413/debian/bzr-builder.manifest 2018-10-25 17:26:22.000000000 +0000 @@ -1,2 +1,2 @@ -# bzr-builder format 0.3 deb-version 15.04.1+18.04.20180216-0ubuntu1+201804061401 -lp:~khurshid-alam/unity-settings-daemon/accountservice-background-fix revid:khurshid.alam@linuxmail.org-20180319140147-f9b0a1vh3gc4j8lj +# bzr-builder format 0.3 deb-version {debversion}+201810251726 +lp:~khurshid-alam/unity-settings-daemon/media-keys-fix revid:khurshid.alam@linuxmail.org-20181025140617-7qpzftebabn0vds0 diff -Nru unity-settings-daemon-15.04.1+18.04.20180216/debian/changelog unity-settings-daemon-15.04.1+18.04.20180413/debian/changelog --- unity-settings-daemon-15.04.1+18.04.20180216/debian/changelog 2018-04-06 14:01:16.000000000 +0000 +++ unity-settings-daemon-15.04.1+18.04.20180413/debian/changelog 2018-10-25 17:26:22.000000000 +0000 @@ -1,8 +1,40 @@ -unity-settings-daemon (15.04.1+18.04.20180216-0ubuntu1+201804061401~ubuntu18.04.1) bionic; urgency=low +unity-settings-daemon (15.04.1+18.04.20180413-0ubuntu2+201810251726~ubuntu18.04.1) bionic; urgency=low * Auto build. - -- Khurshid Alam Fri, 06 Apr 2018 14:01:16 +0000 + -- Khurshid Alam Thu, 25 Oct 2018 17:26:22 +0000 + +unity-settings-daemon (15.04.1+18.04.20180413-0ubuntu2) cosmic; urgency=medium + + [ Kai-Heng Feng ] + * power: Choose correct backlight device on laptops with hybrid graphics + (LP: #1683445) + Backported from gnome-settings-daemon commit ed7c2744 + + -- Sebastien Bacher Tue, 03 Jul 2018 11:27:01 +0200 + +unity-settings-daemon (15.04.1+18.04.20180413-0ubuntu1) bionic; urgency=medium + + [ Marco Trevisan (Treviño) ] + * gsd-rr-config: rename monitor config files to unity-monitors.xml* + (LP: #1763806) + * debian: + - build-depends on dh-migrations and run dh_migrations on post-install + - add debian/unity-settings-daemon.migrations to install migration files + * scripts/01-usd-migration-monitors-xml.sh: + - Move monitors.xml to unity-monitors.xml if migration is needed + (LP: #1763806) + + [ Robert Ancell ] + * Support new AccountsService method of setting background file. + + -- Marco Trevisan (Treviño) Fri, 13 Apr 2018 21:33:54 +0000 + +unity-settings-daemon (15.04.1+18.04.20180216-0ubuntu1) bionic; urgency=medium + + * No-change rebuild against latest gnome-desktop3 + + -- Jeremy Bicha Fri, 16 Feb 2018 01:57:58 +0000 unity-settings-daemon (15.04.1+18.04.20180214.1-0ubuntu1) bionic; urgency=medium diff -Nru unity-settings-daemon-15.04.1+18.04.20180216/debian/control unity-settings-daemon-15.04.1+18.04.20180413/debian/control --- unity-settings-daemon-15.04.1+18.04.20180216/debian/control 2018-04-06 14:01:15.000000000 +0000 +++ unity-settings-daemon-15.04.1+18.04.20180413/debian/control 2018-10-25 17:26:21.000000000 +0000 @@ -7,6 +7,7 @@ gnome-pkg-tools, gtk-doc-tools, dh-autoreconf, + dh-migrations, autotools-dev, intltool (>= 0.37.1), libdbus-glib-1-dev (>= 0.74), diff -Nru unity-settings-daemon-15.04.1+18.04.20180216/debian/rules unity-settings-daemon-15.04.1+18.04.20180413/debian/rules --- unity-settings-daemon-15.04.1+18.04.20180216/debian/rules 2018-04-06 14:01:15.000000000 +0000 +++ unity-settings-daemon-15.04.1+18.04.20180413/debian/rules 2018-10-25 17:26:21.000000000 +0000 @@ -29,8 +29,10 @@ find debian -name '*.a' -delete find debian -name '*.la' -delete +binary-post-install/unity-settings-daemon:: + dh_migrations + common-binary-post-install-arch:: list-missing clean:: rm -f gnome-settings-daemon/gnome-update-wallpaper-cache - diff -Nru unity-settings-daemon-15.04.1+18.04.20180216/debian/unity-settings-daemon.migrations unity-settings-daemon-15.04.1+18.04.20180413/debian/unity-settings-daemon.migrations --- unity-settings-daemon-15.04.1+18.04.20180216/debian/unity-settings-daemon.migrations 1970-01-01 00:00:00.000000000 +0000 +++ unity-settings-daemon-15.04.1+18.04.20180413/debian/unity-settings-daemon.migrations 2018-10-25 17:26:21.000000000 +0000 @@ -0,0 +1 @@ +scripts/*-usd-migration-* diff -Nru unity-settings-daemon-15.04.1+18.04.20180216/gnome-settings-daemon/gsd-rr-config.c unity-settings-daemon-15.04.1+18.04.20180413/gnome-settings-daemon/gsd-rr-config.c --- unity-settings-daemon-15.04.1+18.04.20180216/gnome-settings-daemon/gsd-rr-config.c 2018-04-06 14:01:15.000000000 +0000 +++ unity-settings-daemon-15.04.1+18.04.20180413/gnome-settings-daemon/gsd-rr-config.c 2018-10-25 17:26:21.000000000 +0000 @@ -43,8 +43,8 @@ #include "edid.h" #include "gsd-rr-private.h" -#define CONFIG_INTENDED_BASENAME "monitors.xml" -#define CONFIG_BACKUP_BASENAME "monitors.xml.backup" +#define CONFIG_INTENDED_BASENAME "unity-monitors.xml" +#define CONFIG_BACKUP_BASENAME "unity-monitors.xml.backup" /* Look for DPI_FALLBACK in: * http://git.gnome.org/browse/gnome-settings-daemon/tree/plugins/xsettings/gsd-xsettings-manager.c diff -Nru unity-settings-daemon-15.04.1+18.04.20180216/plugins/media-keys/gsd-media-keys-manager.c unity-settings-daemon-15.04.1+18.04.20180413/plugins/media-keys/gsd-media-keys-manager.c --- unity-settings-daemon-15.04.1+18.04.20180216/plugins/media-keys/gsd-media-keys-manager.c 2018-04-06 14:01:15.000000000 +0000 +++ unity-settings-daemon-15.04.1+18.04.20180413/plugins/media-keys/gsd-media-keys-manager.c 2018-10-25 17:26:21.000000000 +0000 @@ -223,7 +223,7 @@ GDBusConnection *connection; GCancellable *bus_cancellable; GDBusProxy *xrandr_proxy; - GCancellable *cancellable; + GCancellable *cancellable; /* Only used for XRandR operations */ guint start_idle_id; @@ -699,6 +699,7 @@ { GsdMediaKeysManager *manager = data; + g_debug ("Retrying to grab accelerators"); grab_media_keys (manager); return FALSE; } @@ -718,8 +719,10 @@ if (error) { retry = (error->code == G_DBUS_ERROR_UNKNOWN_METHOD); - if (!retry) - g_warning ("%d: %s", error->code, error->message); + if (!retry && !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) + g_warning ("Failed to grab accelerators: %s (%d)", error->message, error->code); + else if (retry) + g_debug ("Failed to grab accelerators, will retry: %s (%d)", error->message, error->code); g_error_free (error); } else { int i; @@ -768,9 +771,14 @@ { GrabData *data = user_data; MediaKey *key = data->key; + GError *error = NULL; - shell_key_grabber_call_grab_accelerator_finish (SHELL_KEY_GRABBER (object), - &key->accel_id, result, NULL); + if (!shell_key_grabber_call_grab_accelerator_finish (SHELL_KEY_GRABBER (object), + &key->accel_id, result, &error)) { + if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) + g_warning ("Failed to grab accelerator: %s", error->message); + g_error_free (error); + } g_slice_free (GrabData, data); } @@ -838,8 +846,14 @@ gpointer user_data) { GsdMediaKeysManager *manager = user_data; - shell_key_grabber_call_ungrab_accelerator_finish (SHELL_KEY_GRABBER (object), - NULL, result, NULL); + + GError *error = NULL; + if (!shell_key_grabber_call_ungrab_accelerator_finish (SHELL_KEY_GRABBER (object), + NULL, result, &error)) { + if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) + g_warning ("Failed to ungrab accelerator: %s", error->message); + g_error_free (error); + } } static void @@ -1390,7 +1404,7 @@ priv->screen_saver_proxy = gnome_settings_bus_get_screen_saver_proxy (); gsd_screen_saver_call_lock (priv->screen_saver_proxy, - priv->cancellable, + priv->bus_cancellable, (GAsyncReadyCallback) on_screen_locked, manager); } @@ -2275,7 +2289,7 @@ guint first; gint i, n; - if (g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "ubuntu") != 0) + if (g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "unity") != 0) if (!priv->have_legacy_keygrabber) return; @@ -2817,6 +2831,9 @@ { guint i; + g_debug ("Received accel id %u (device-id: %u, timestamp: %u", + accel_id, deviceid, timestamp); + for (i = 0; i < manager->priv->keys->len; i++) { MediaKey *key; @@ -2831,6 +2848,8 @@ do_action (manager, deviceid, key->key_type, timestamp); return; } + + g_warning ("Could not find accelerator for accel id %u", accel_id); } static void @@ -2962,12 +2981,17 @@ gpointer data) { GsdMediaKeysManager *manager = data; + GError *error = NULL; manager->priv->key_grabber = - shell_key_grabber_proxy_new_for_bus_finish (result, NULL); + shell_key_grabber_proxy_new_for_bus_finish (result, &error); - if (!manager->priv->key_grabber) + if (!manager->priv->key_grabber) { + if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) + g_warning ("Failed to create proxy for key grabber: %s", error->message); + g_error_free (error); return; + } g_signal_connect (manager->priv->key_grabber, "accelerator-activated", G_CALLBACK (on_accelerator_activated), manager); @@ -2979,7 +3003,7 @@ session_has_key_grabber (void) { const gchar *session = g_getenv ("DESKTOP_SESSION"); - return g_strcmp0 (session, "gnome") == 0 || g_strcmp0 (session, "ubuntu") == 0; + return g_strcmp0 (session, "gnome") == 0 || g_strcmp0 (session, "unity") == 0; } static void @@ -3379,7 +3403,8 @@ res = g_dbus_proxy_call_with_unix_fd_list_finish (proxy, &fd_list, result, &error); if (res == NULL) { - g_warning ("Unable to inhibit keypresses: %s", error->message); + if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) + g_warning ("Unable to inhibit keypresses: %s", error->message); g_error_free (error); } else { g_variant_get (res, "(h)", &idx); @@ -3478,7 +3503,8 @@ manager->priv->xrandr_proxy = g_dbus_proxy_new_finish (res, &error); if (manager->priv->xrandr_proxy == NULL) { - g_warning ("Failed to get proxy for XRandR operations: %s", error->message); + if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) + g_warning ("Failed to get proxy for XRandR operations: %s", error->message); g_error_free (error); } } @@ -3492,8 +3518,9 @@ manager->priv->power_proxy = g_dbus_proxy_new_finish (res, &error); if (manager->priv->power_proxy == NULL) { - g_warning ("Failed to get proxy for power: %s", - error->message); + if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) + g_warning ("Failed to get proxy for power: %s", + error->message); g_error_free (error); } } @@ -3507,8 +3534,9 @@ manager->priv->power_screen_proxy = g_dbus_proxy_new_finish (res, &error); if (manager->priv->power_screen_proxy == NULL) { - g_warning ("Failed to get proxy for power (screen): %s", - error->message); + if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) + g_warning ("Failed to get proxy for power (screen): %s", + error->message); g_error_free (error); } } @@ -3522,8 +3550,9 @@ manager->priv->power_keyboard_proxy = g_dbus_proxy_new_finish (res, &error); if (manager->priv->power_keyboard_proxy == NULL) { - g_warning ("Failed to get proxy for power (keyboard): %s", - error->message); + if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) + g_warning ("Failed to get proxy for power (keyboard): %s", + error->message); g_error_free (error); } } @@ -3536,15 +3565,11 @@ GDBusConnection *connection; GError *error = NULL; - if (manager->priv->bus_cancellable == NULL || - g_cancellable_is_cancelled (manager->priv->bus_cancellable)) { - g_warning ("Operation has been cancelled, so not retrieving session bus"); - return; - } connection = g_bus_get_finish (res, &error); if (connection == NULL) { - g_warning ("Could not get session bus: %s", error->message); + if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) + g_warning ("Could not get session bus: %s", error->message); g_error_free (error); return; } diff -Nru unity-settings-daemon-15.04.1+18.04.20180216/plugins/power/gsd-backlight-linux.c unity-settings-daemon-15.04.1+18.04.20180413/plugins/power/gsd-backlight-linux.c --- unity-settings-daemon-15.04.1+18.04.20180216/plugins/power/gsd-backlight-linux.c 2018-04-06 14:01:15.000000000 +0000 +++ unity-settings-daemon-15.04.1+18.04.20180413/plugins/power/gsd-backlight-linux.c 2018-10-25 17:26:21.000000000 +0000 @@ -41,6 +41,40 @@ } return NULL; } + +/* + * Search for a raw backlight interface, raw backlight interfaces registered + * by the drm driver will have the drm-connector as their parent, check the + * drm-connector's enabled sysfs attribute so that we pick the right LCD-panel + * connector on laptops with hybrid-gfx. Fall back to just picking the first + * raw backlight interface if no enabled interface is found. + */ +static gchar * +gsd_backlight_helper_get_raw (GList *devices) +{ + GUdevDevice *parent; + const gchar *attr; + GList *d; + + for (d = devices; d != NULL; d = d->next) { + attr = g_udev_device_get_sysfs_attr (d->data, "type"); + if (g_strcmp0 (attr, "raw") != 0) + continue; + + parent = g_udev_device_get_parent (d->data); + if (!parent) + continue; + + attr = g_udev_device_get_sysfs_attr (parent, "enabled"); + if (!attr || g_strcmp0 (attr, "enabled") != 0) + continue; + + return g_strdup (g_udev_device_get_sysfs_path (d->data)); + } + + return gsd_backlight_helper_get_type (devices, "raw"); +} + #endif /* HAVE_GUDEV */ char * @@ -70,7 +104,7 @@ *type = GSD_BACKLIGHT_TYPE_PLATFORM; goto out; } - path = gsd_backlight_helper_get_type (devices, "raw"); + path = gsd_backlight_helper_get_raw (devices); if (path != NULL) { if (type) *type = GSD_BACKLIGHT_TYPE_RAW; diff -Nru unity-settings-daemon-15.04.1+18.04.20180216/plugins/xrandr/gsd-xrandr-manager.c unity-settings-daemon-15.04.1+18.04.20180413/plugins/xrandr/gsd-xrandr-manager.c --- unity-settings-daemon-15.04.1+18.04.20180216/plugins/xrandr/gsd-xrandr-manager.c 2018-04-06 14:01:15.000000000 +0000 +++ unity-settings-daemon-15.04.1+18.04.20180413/plugins/xrandr/gsd-xrandr-manager.c 2018-10-25 17:26:21.000000000 +0000 @@ -560,8 +560,8 @@ /* ENOENT means the original file didn't exist. That is *not* an error; * the backup was not created because there wasn't even an original - * monitors.xml (such as on a first-time login). Note that *here* there - * is a "didn't work" monitors.xml, so we must delete that one. + * unity-monitors.xml (such as on a first-time login). Note that *here* + * there is a "didn't work" unity-monitors.xml, so we must delete that one. */ if (saved_errno == ENOENT) unlink (intended_filename); diff -Nru unity-settings-daemon-15.04.1+18.04.20180216/scripts/01-usd-migration-monitors-xml.sh unity-settings-daemon-15.04.1+18.04.20180413/scripts/01-usd-migration-monitors-xml.sh --- unity-settings-daemon-15.04.1+18.04.20180216/scripts/01-usd-migration-monitors-xml.sh 1970-01-01 00:00:00.000000000 +0000 +++ unity-settings-daemon-15.04.1+18.04.20180413/scripts/01-usd-migration-monitors-xml.sh 2018-10-25 17:26:21.000000000 +0000 @@ -0,0 +1,25 @@ +#!/bin/bash + +MONITORS_FILES="monitors.xml monitors.xml.backup monitors-v1-backup.xml" +config_path="$HOME/.config" + +if [ -n "$XDG_CONFIG_HOME" ]; then + config_path="$XDG_CONFIG_HOME"; +fi + +for monitor_file in $MONITORS_FILES; do + old_monitors="$config_path/$monitor_file" + new_monitors="$config_path/unity-$monitor_file" + + if [ -f "$old_monitors" ]; then + if grep ']*>' "$old_monitors" | grep -Fq 'version="1"'; then + cp -v "$old_monitors" "$new_monitors" + fi + fi +done + +if [ -f "$config_path/unity-monitors-v1-backup.xml" ] && + [ ! -f "$config_path/unity-monitors.xml" ]; then + cp -v "$config_path/unity-monitors-v1-backup.xml" \ + "$config_path/unity-monitors.xml" +fi