r22875 - in /desktop/unstable/gnome-power-manager/debian: changelog patches/09-inhibit-consolekit-events-after-resume.patch patches/series
biebl at users.alioth.debian.org
biebl at users.alioth.debian.org
Wed Jan 27 15:21:47 UTC 2010
Author: biebl
Date: Wed Jan 27 15:21:47 2010
New Revision: 22875
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=22875
Log:
double-suspend issue when unplugging after suspend.
* debian/patches/09-inhibit-consolekit-events-after-resume.patch
- Inhibit consolekit events after resuming from suspend to fix a race
condition related to chvt when s2ram/uswsusp used. This fixes another
double-suspend issue. (Closes: #552547)
Thanks to Chow Loong Jin (hyperair) for the patch.
Added:
desktop/unstable/gnome-power-manager/debian/patches/09-inhibit-consolekit-events-after-resume.patch
Modified:
desktop/unstable/gnome-power-manager/debian/changelog
desktop/unstable/gnome-power-manager/debian/patches/series
Modified: desktop/unstable/gnome-power-manager/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-power-manager/debian/changelog?rev=22875&op=diff
==============================================================================
--- desktop/unstable/gnome-power-manager/debian/changelog [utf-8] (original)
+++ desktop/unstable/gnome-power-manager/debian/changelog [utf-8] Wed Jan 27 15:21:47 2010
@@ -2,8 +2,13 @@
* New upstream release.
- Don't rely on the cached value of the lid status, to properly fix the
- double suspend issue when unplugging after resume.
+ double-suspend issue when unplugging after suspend.
Thanks to Chow Loong Jin (hyperair) for the original patch.
+ * debian/patches/09-inhibit-consolekit-events-after-resume.patch
+ - Inhibit consolekit events after resuming from suspend to fix a race
+ condition related to chvt when s2ram/uswsusp used. This fixes another
+ double-suspend issue. (Closes: #552547)
+ Thanks to Chow Loong Jin (hyperair) for the patch.
-- Michael Biebl <biebl at debian.org> Wed, 27 Jan 2010 15:32:15 +0100
Added: desktop/unstable/gnome-power-manager/debian/patches/09-inhibit-consolekit-events-after-resume.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-power-manager/debian/patches/09-inhibit-consolekit-events-after-resume.patch?rev=22875&op=file
==============================================================================
--- desktop/unstable/gnome-power-manager/debian/patches/09-inhibit-consolekit-events-after-resume.patch (added)
+++ desktop/unstable/gnome-power-manager/debian/patches/09-inhibit-consolekit-events-after-resume.patch [utf-8] Wed Jan 27 15:21:47 2010
@@ -1,0 +1,82 @@
+From 20727a526792d975ac93aa662948accc618c59b8 Mon Sep 17 00:00:00 2001
+From: Chow Loong Jin <hyperair at gmail.com>
+Date: Wed, 27 Jan 2010 04:31:12 +0800
+Subject: [PATCH] Add just_resumed flag to inhibit consolekit events
+
+---
+ src/gpm-manager.c | 31 +++++++++++++++++++++++++++++++
+ 1 files changed, 31 insertions(+), 0 deletions(-)
+
+diff --git a/src/gpm-manager.c b/src/gpm-manager.c
+index 6b5040b..f41edbb 100644
+--- a/src/gpm-manager.c
++++ b/src/gpm-manager.c
+@@ -91,6 +91,7 @@ struct GpmManagerPrivate
+ guint32 screensaver_lid_throttle_id;
+ DkpClient *client;
+ gboolean on_battery;
++ gboolean just_resumed;
+ GtkStatusIcon *status_icon;
+ gboolean supports_notification_actions;
+ NotifyNotification *notification;
+@@ -1731,6 +1732,25 @@ gpm_manager_dpms_mode_changed_cb (GpmDpms *dpms, GpmDpmsMode mode, GpmManager *m
+ gpm_manager_update_dpms_throttle (manager);
+ }
+
++static gboolean
++gpm_manager_reset_just_resumed_cb (gpointer user_data)
++{
++ GpmManager *manager = GPM_MANAGER (user_data);
++ manager->priv->just_resumed = FALSE;
++ return FALSE;
++}
++
++/**
++ * gpm_manager_control_resume_cb
++ **/
++static void
++gpm_manager_control_resume_cb (GpmControl *control, GpmControlAction action, GpmManager *manager)
++{
++ manager->priv->just_resumed = TRUE;
++
++ g_timeout_add_seconds (1, gpm_manager_reset_just_resumed_cb, manager);
++}
++
+ /**
+ * gpm_manager_console_kit_active_changed_cb:
+ **/
+@@ -1750,6 +1770,12 @@ gpm_manager_console_kit_active_changed_cb (EggConsoleKit *console, gboolean acti
+ if (!ret)
+ return;
+
++ /* lid state might not be accurate if just resumed. Don't do anything if
++ * we've just resumed as we might end up re-suspending the machine due
++ * to pm-utils and uswsusp changing the tty */
++ if (manager->priv->just_resumed)
++ return;
++
+ /* get ac state */
+ if (!manager->priv->on_battery) {
+ egg_debug ("Performing AC policy as become active when lid down");
+@@ -1815,6 +1841,9 @@ gpm_manager_init (GpmManager *manager)
+ manager->priv->screensaver_dpms_throttle_id = 0;
+ manager->priv->screensaver_lid_throttle_id = 0;
+
++ /* init to not just_resumed */
++ manager->priv->just_resumed = FALSE;
++
+ /* don't apply policy when not active */
+ manager->priv->console = egg_console_kit_new ();
+ g_signal_connect (manager->priv->console, "active-changed",
+@@ -1901,6 +1930,8 @@ gpm_manager_init (GpmManager *manager)
+ manager->priv->control = gpm_control_new ();
+ g_signal_connect (manager->priv->control, "sleep-failure",
+ G_CALLBACK (gpm_manager_sleep_failure_cb), manager);
++ g_signal_connect (manager->priv->control, "resume",
++ G_CALLBACK (gpm_manager_control_resume_cb), manager);
+
+ egg_debug ("creating new tray icon");
+ manager->priv->tray_icon = gpm_tray_icon_new ();
+--
+1.6.6
+
Modified: desktop/unstable/gnome-power-manager/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-power-manager/debian/patches/series?rev=22875&op=diff
==============================================================================
--- desktop/unstable/gnome-power-manager/debian/patches/series [utf-8] (original)
+++ desktop/unstable/gnome-power-manager/debian/patches/series [utf-8] Wed Jan 27 15:21:47 2010
@@ -2,4 +2,5 @@
04_cast-align.patch
06-bugreport-debian.patch
08-desktop-bugreport-path.patch
+09-inhibit-consolekit-events-after-resume.patch
90_autoconf.patch
More information about the pkg-gnome-commits
mailing list