GNOME Bugzilla – Bug 622026
Laptop suspends when I connect/disconnect AC
Last modified: 2010-06-22 08:14:03 UTC
Originally reported at: https://bugs.launchpad.net/bugs/481312 The underlying problem here is that upower always reports lid closed for these particular laptops. (Upower report coming...) What makes this worse is that g-p-m initially assumes the lid is open, so it performs the lid closed action the first time it notices that it's closed. WORKAROUND: change lid-closed action to Blank Screen in Power Management properties. FIX is something like: --- src/gpm-button.c +++ src/gpm-button.c @@ -322,8 +322,11 @@ button->priv->last_button = NULL; button->priv->timer = g_timer_new (); - button->priv->lid_is_closed = FALSE; button->priv->client = dkp_client_new (); + // sometimes lid is closed now, don't assume it's open (LP #481312) + g_object_get (button->priv->client, + "lid-is-closed", &button->priv->lid_is_closed, + NULL); g_signal_connect (button->priv->client, "changed", G_CALLBACK (gpm_button_client_changed_cb), button); So far my patch is untested, but I'll post here if it does fix the issue.
An affected user reports that this patch fixes the issue.
commit df44925b580ff0aa4a4f0619f3d50987c939506d Author: Richard Hughes <richard@hughsie.com> Date: Tue Jun 22 09:13:29 2010 +0100 Do not assume the lid is open at boot. Fixes #622026 Inspired from a patch by David Tombs, many thanks.