Bug#554046: debugging the infinite suspend loop
Package: gnome-power-manager Version: 2.28.1-2 Using g-p-m and lid closing and off we go into infinite cycles. Sysrq-ing out is the only option. Attached is a log of gnome-power-manager --verbose (btw, why is it so hard to explain in a short answer that the option --debug is not actually debugging anything?) Still 100% reproducible. - suspending with lid-close goes into infinite loop - suspending with click-power-icon, select suspend *works* Best wishes Norbert Norbert Preiningprein...@{jaist.ac.jp, logic.at, debian.org} JAIST, JapanTU Wien, Austria Debian TeX Task Force DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094 MARGATE (n.) A margate is a particular kind of commissionaire who sees you every day and is on cheerful Christian-name terms with you, then one day refuses to let you in because you've forgotten your identify card. --- Douglas Adams, The Meaning of Liff TI:05:18:03 TH:0x12e90e0FI:egg-debug.c FN:egg_debug_init,306 - Verbose debugging 1 (on console 0)GPM_VERBOSE TI:05:18:03 TH:0x12e90e0FI:gpm-main.c FN:main,210 - GNOME Power Manager 2.28.2 TI:05:18:03 TH:0x12e90e0FI:gpm-session.cFN:gpm_session_init,463 - idle: 0, inhibited: 0 TI:05:18:03 TH:0x12e90e0FI:gpm-session.c FN:gpm_session_register_client,324 - registered startup '(null)' to client id '/org/gnome/SessionManager/Client16' TI:05:18:03 TH:0x12e90e0FI:egg-console-kit.c FN:egg_console_kit_init,304 - ConsoleKit session ID: /org/freedesktop/ConsoleKit/Session1 TI:05:18:03 TH:0x12e90e0FI:gpm-button.c FN:gpm_button_grab_keystring,176 - Grabbed modmask=8000, keycode=124 TI:05:18:03 TH:0x12e90e0FI:gpm-button.c FN:gpm_button_grab_keystring,176 - Grabbed modmask=8000, keycode=213 TI:05:18:03 TH:0x12e90e0FI:gpm-button.c FN:gpm_button_grab_keystring,176 - Grabbed modmask=8000, keycode=150 *** WARNING *** TI:05:18:03 TH:0x12e90e0FI:gpm-button.c FN:gpm_button_xevent_key,203 - could not map keysym 1008ffa8 to keycode TI:05:18:03 TH:0x12e90e0FI:gpm-button.c FN:gpm_button_grab_keystring,176 - Grabbed modmask=8000, keycode=233 TI:05:18:03 TH:0x12e90e0FI:gpm-button.c FN:gpm_button_grab_keystring,176 - Grabbed modmask=8000, keycode=232 TI:05:18:03 TH:0x12e90e0FI:gpm-button.c FN:gpm_button_grab_keystring,176 - Grabbed modmask=8000, keycode=160 TI:05:18:03 TH:0x12e90e0FI:gpm-button.c FN:gpm_button_grab_keystring,176 - Grabbed modmask=8000, keycode=244 TI:05:18:03 TH:0x12e90e0FI:gpm-button.c FN:gpm_button_grab_keystring,176 - Grabbed modmask=8000, keycode=238 TI:05:18:03 TH:0x12e90e0FI:gpm-button.c FN:gpm_button_grab_keystring,176 - Grabbed modmask=8000, keycode=237 TI:05:18:03 TH:0x12e90e0FI:gpm-button.c FN:gpm_button_grab_keystring,176 - Grabbed modmask=8000, keycode=236 TI:05:18:03 TH:0x12e90e0FI:egg-dbus-proxy.c FN:egg_dbus_proxy_connect,73 - already connected to org.gnome.ScreenSaver TI:05:18:03 TH:0x12e90e0FI:gpm-brightness-xrandr.c FN:gpm_brightness_xrandr_update_cache,628 - screen 1 of 1 TI:05:18:03 TH:0x12e90e0FI:gpm-brightness-xrandr.c FN:gpm_brightness_xrandr_update_cache,633 - watching ::monitors_changed on 0x12f0130 TI:05:18:03 TH:0x12e90e0FI:gpm-brightness-xrandr.c FN:gpm_brightness_xrandr_update_cache,654 - adding resource 0x138c8d0 TI:05:18:03 TH:0x12e90e0FI:gpm-brightness.c FN:gpm_brightness_init,436 - detected XRANDR hardware TI:05:18:03 TH:0x12e90e0FI:egg-dbus-proxy.c FN:egg_dbus_proxy_connect,73 - already connected to org.freedesktop.Hal TI:05:18:03 TH:0x12e90e0FI:egg-dbus-proxy.c FN:egg_dbus_proxy_connect,73 - already connected to org.freedesktop.Hal TI:05:18:03 TH:0x12e90e0FI:egg-dbus-proxy.c FN:egg_dbus_proxy_connect,73 - already connected to org.freedesktop.Hal TI:05:18:03 TH:0x12e90e0FI:gpm-brightness-hal.c FN:gpm_brightness_hal_init,476 - Laptop panel levels: 9 TI:05:18:03 TH:0x12e90e0FI:gpm-brightness-hal.c FN:gpm_brightness_hal_init,492 - laptop_panel.brightness_in_hardware: True TI:05:18:03 TH:0x12e90e0FI:egg-dbus-proxy.c FN:egg_dbus_proxy_connect,73 - already connected to org.freedesktop.Hal TI:05:18:03 TH:0x12e90e0FI:gpm-brightness-hal.c FN:gpm_brightness_hal_get_hw,119 - GetBrightness returned level: 8 TI:05:18:03 TH:0x12e90e0FI:gpm-brightness-hal.c FN:gpm_brightness_hal_init,513 - Starting: (8 of 8) TI:05:18:03 TH:0x12e90e0FI:gpm-brightness.c FN:gpm_brightness_init,444 - detected HAL hardware TI:05:18:03 TH:0x12e90e0FI:gpm-prefs-server.c FN:gpm_prefs_server_set_capability,84 - capability now 4 TI:05:18:03 TH:0x12e90e0
Bug#554046: debugging the infinite suspend loop
Le lundi 28 décembre 2009 à 21:32 +0100, Norbert Preining a écrit : - suspending with lid-close goes into infinite loop - suspending with click-power-icon, select suspend *works* Is uswsusp installed? If so, does removing it help? -- .''`. Josselin Mouette : :' : `. `' “I recommend you to learn English in hope that you in `- future understand things” -- Jörg Schilling signature.asc Description: Ceci est une partie de message numériquement signée
Bug#554046: debugging the infinite suspend loop
On Mo, 28 Dez 2009, Josselin Mouette wrote: - suspending with lid-close goes into infinite loop - suspending with click-power-icon, select suspend *works* Is uswsusp installed? If so, does removing it help? Removing uswsusp did help indeed. BTW, I was exploring also some other options and found attached patch in the suse packages. It seems to deal with very similar things as clearing duplicate suspend events. Since it is for 2.28.0 I am not sure if it is necessary, but you might take a look at it. Before removing uswsusp I built a package of g-p-m with that patch added to the quilt queue and it helped a bit (only one rogue suspend) but OTOH added something strange, namely that switching to the console and back initiated a suspend ... Anyway, the bug report is https://bugzilla.novell.com/show_bug.cgi?id=540517 I have the same warnings devkit-power-gobject-DEBUG: DBUS timed out, but recovering So I am not sure how uswsusp is playing into that piece, but at least once it worked. Best wishes Norbert Norbert Preiningprein...@{jaist.ac.jp, logic.at, debian.org} JAIST, JapanTU Wien, Austria Debian TeX Task Force DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094 `Time is an illusion. Lunchtime doubly so.' you should send that in to the Reader's Digest. They've got a page for people like you.' --- Ford convincing Arthur to drink three pints in ten --- minutes at lunchtime. --- Douglas Adams, The Hitchhikers Guide to the Galaxy Index: gnome-power-manager-2.28.0/src/egg-console-kit.c === --- gnome-power-manager-2.28.0.orig/src/egg-console-kit.c +++ gnome-power-manager-2.28.0/src/egg-console-kit.c @@ -50,6 +50,9 @@ struct EggConsoleKitPrivate DBusGProxy *proxy_manager; DBusGProxy *proxy_session; gchar *session_id; + guint emit_changed_id; + gboolean last_emitted_active; + gboolean last_changed_active; }; enum { @@ -231,13 +234,37 @@ out: } /** + * egg_console_kit_emit_active_changed_cb: + **/ +static gboolean +egg_console_kit_emit_active_changed_cb (EggConsoleKit *console) +{ + egg_debug (emitting active: %i, console-priv-last_changed_active); + g_signal_emit (console, signals [EGG_CONSOLE_KIT_ACTIVE_CHANGED], 0, console-priv-last_changed_active); + console-priv-last_emitted_active = console-priv-last_changed_active; + console-priv-emit_changed_id = 0; + return FALSE; +} + +/** * egg_console_kit_active_changed_cb: **/ static void egg_console_kit_active_changed_cb (DBusGProxy *proxy, gboolean active, EggConsoleKit *console) { - egg_debug (emitting active: %i, active); - g_signal_emit (console, signals [EGG_CONSOLE_KIT_ACTIVE_CHANGED], 0, active); + if (console-priv-emit_changed_id != 0) { + g_source_remove (console-priv-emit_changed_id); + console-priv-emit_changed_id = 0; + } + + if (console-priv-last_emitted_active == active) { + egg_debug (ignoring active (same value as last emitted): %i, active); + return; + } + + egg_debug (queuing active: %i, active); + console-priv-last_changed_active = active; + console-priv-emit_changed_id = g_idle_add ((GSourceFunc) egg_console_kit_emit_active_changed_cb, console); } /** @@ -271,6 +298,8 @@ egg_console_kit_init (EggConsoleKit *con console-priv = EGG_CONSOLE_KIT_GET_PRIVATE (console); console-priv-proxy_manager = NULL; console-priv-session_id = NULL; + console-priv-emit_changed_id = 0; + console-priv-last_changed_active = FALSE; /* connect to D-Bus */ console-priv-connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, error); @@ -315,6 +344,8 @@ egg_console_kit_init (EggConsoleKit *con dbus_g_proxy_connect_signal (console-priv-proxy_session, ActiveChanged, G_CALLBACK (egg_console_kit_active_changed_cb), console, NULL); + console-priv-last_emitted_active = egg_console_kit_is_active (console); + out: return; } @@ -338,6 +369,8 @@ egg_console_kit_finalize (GObject *objec if (console-priv-proxy_session != NULL) g_object_unref (console-priv-proxy_session); g_free (console-priv-session_id); + if (console-priv-emit_changed_id != 0) + g_source_remove (console-priv-emit_changed_id); G_OBJECT_CLASS (egg_console_kit_parent_class)-finalize (object); }