diff --git a/gnome-settings-daemon-upower-fix.patch b/gnome-settings-daemon-upower-fix.patch new file mode 100644 index 0000000..323a8b6 --- /dev/null +++ b/gnome-settings-daemon-upower-fix.patch @@ -0,0 +1,30 @@ +Index: gnome-settings-daemon-3.10.2/plugins/power/gsd-power-manager.c +=================================================================== +--- gnome-settings-daemon-3.10.2.orig/plugins/power/gsd-power-manager.c ++++ gnome-settings-daemon-3.10.2/plugins/power/gsd-power-manager.c +@@ -909,7 +909,7 @@ device_perhaps_recall (GsdPowerManager * + static void + engine_device_add (GsdPowerManager *manager, UpDevice *device) + { +- gboolean recall_notice; ++ gboolean recall_notice = FALSE; + GsdPowerManagerWarning warning; + UpDeviceState state; + UpDeviceKind kind; +@@ -936,6 +936,7 @@ engine_device_add (GsdPowerManager *mana + + if (kind == UP_DEVICE_KIND_BATTERY) { + g_debug ("updating because we added a device"); ++ g_ptr_array_add (manager->priv->devices_array, g_object_ref (device)); + engine_update_composite_device (manager); + + /* reset those values for the composite device */ +@@ -1014,8 +1015,6 @@ engine_coldplug (GsdPowerManager *manage + static void + engine_device_added_cb (UpClient *client, UpDevice *device, GsdPowerManager *manager) + { +- /* add to list */ +- g_ptr_array_add (manager->priv->devices_array, g_object_ref (device)); + engine_device_add (manager, device); + engine_check_recall (manager, device); + diff --git a/gnome-settings-daemon.changes b/gnome-settings-daemon.changes index 9245079..c833cb4 100644 --- a/gnome-settings-daemon.changes +++ b/gnome-settings-daemon.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Feb 6 15:03:34 UTC 2014 - lpechacek@suse.cz + +- Add gnome-settings-daemon-upower-fix.patch: avoid immediate + hibernation/poweroff caused by GSD power plugin not being able to + determine battery charge. (bnc#861365) + ------------------------------------------------------------------- Fri Dec 20 00:16:59 UTC 2013 - mgorse@suse.com diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index 29e0d34..4a27cee 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -1,7 +1,7 @@ # # spec file for package gnome-settings-daemon # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -53,6 +53,7 @@ Patch19: gnome-settings-daemon-notify-idle-resumed.patch Patch20: gnome-settings-daemon-export-Gtk_ShellShowsDesktop-setting.patch # PATCH-FEATURE-UPSTREAM gnome-settings-daemon-upower-backport.patch mgorse@suse.com -- Update for libupower-glib API changes. Patch21: gnome-settings-daemon-upower-backport.patch +Patch22: gnome-settings-daemon-upower-fix.patch BuildRequires: cups-devel BuildRequires: fdupes BuildRequires: gnome-common @@ -148,6 +149,7 @@ translation-update-upstream %patch19 -p1 %patch20 -p1 %patch21 -p1 +%patch22 -p1 %build autoreconf -f -i