Re: gnome-power-manager: prevent multiple processes in gdm
- From: Matthias Clasen <matthias clasen gmail com>
- To: Richard Hughes <hughsient gmail com>
- Cc: GNOME 2 release team <release-team gnome org>
- Subject: Re: gnome-power-manager: prevent multiple processes in gdm
- Date: Fri, 1 Apr 2011 13:04:24 -0400
On Fri, Apr 1, 2011 at 12:55 PM, Richard Hughes <hughsient gmail com> wrote:
> From 9a502c530e43ab50be9e4f53e9e73f3f5fc510b0 Mon Sep 17 00:00:00 2001
> From: Richard Hughes <richard hughsie com>
> Date: Fri, 1 Apr 2011 17:46:29 +0100
> Subject: [PATCH] If we loose the DBus name, exit
>
> This prevents two instances of gnome-power-manager being run by gdm, which
> itself causes an issue if the user closes the laptop lid, and both processes
> tell upower to suspend.
>
> One call to upower succeeds, and one fails, and the user is left with a
> erroneous 'Your computer failed to suspend' message on resume.
>
> In 3.2, gnome-power-manager is being moved to gnome-settings-daemon, and so the
> problem goes away for good. Yay.
> ---
> src/gpm-manager.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/src/gpm-manager.c b/src/gpm-manager.c
> index 0c79aa6..aa9f5cb 100644
> --- a/src/gpm-manager.c
> +++ b/src/gpm-manager.c
> @@ -2262,6 +2262,7 @@ gpm_manager_name_lost_cb (GDBusConnection *connection,
> gpointer user_data)
> {
> g_warning ("name lost %s", name);
> + exit (1);
> }
>
I've tested this, and it fixes the issues I have been seeing at the
login screen, where gdm was running two instances of
gnome-power-manager, and suspend-on-lid-close failed. With the patch,
there's only one gpm, and suspend works.
+1/2
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]