! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Suspending: unplug then close lid succeeds, close lid then unplug fails
Status:
RESOLVED: WONTFIX
Product:
Xfce4-power-manager
Component:
General

Comments

Description ian 2013-08-09 10:43:30 CEST
I'm running xfce4-power-manager under Ubuntu 12.04 / awesomewm on a Dell Latitude E6510

xfce4-power-manager will successfully suspend from the context menu -> suspend, and it will successfully suspend if I switch to battery power then close the lid.

If I close the lid first and THEN unplug the power cable, it locks the screen but fails to suspend.  

Not sure if this is related to bug 9704.

Nothing extremely helpful in the console, but here's the output anyway:


$ xfce4-power-manager --no-daemon

(xfce4-power-manager:15496): GLib-WARNING **: (/build/buildd/glib2.0-2.32.3/./glib/gerror.c:390):g_error_new_valist: runtime check failed: (domain != 0)

(xfce4-power-manager:15496): xfce4-power-manager-WARNING **: Unable to connect to session managet : Failed to connect to the session manager: SESSION_MANAGER environment variable not defined

(xfce4-power-manager:15496): xfce4-power-manager-WARNING **: could not map keysym 1008ffa8 to keycode

12736

12736
15558
12736
15558
Comment 1 Simon Steinbeiss editbugs 2014-08-17 02:29:33 CEST
Actually there are different settings for what should happen when you close the laptop lid depending on whether it is connected to a power-source or on battery.

This sounds like you have different settings for the two scenarios. Could you please check your settings?
Comment 2 ian 2014-08-17 21:49:27 CEST
The settings *are* different: lock screen when the lid is closed on AC, and suspend when the lid is closed on battery.  But keeping the laptop awake just because the cord was still plugged in at the instant that the lid was closed seems like a very stupid thing for the power manager to do.  Is there a good reason for this behavior?  And does it offset the silliness of having to open and close the lid (after unplugging) to get the laptop to go to sleep?

Is there some other way that any sequence of events resulting in a simultaneous-closed-lid-and-unplugged-power-supply state will suspend the laptop?  That was the case under Ubuntu 10.10, IIRC.
Comment 3 Simon Steinbeiss editbugs 2014-08-18 01:22:33 CEST
(In reply to ian from comment #2)
> The settings *are* different: lock screen when the lid is closed on AC, and
> suspend when the lid is closed on battery.  But keeping the laptop awake
> just because the cord was still plugged in at the instant that the lid was
> closed seems like a very stupid thing for the power manager to do.  Is there
> a good reason for this behavior?  And does it offset the silliness of having
> to open and close the lid (after unplugging) to get the laptop to go to
> sleep?

First of all, keep the tone friendly. We took over the power manager after it was unmaintained for 2 years. A lot of the infrastructure around it has changed and we're trying to keep/make it working.

In one of the last few releases, Ubuntu introduced logind to handle these sort of things and xfpm carries patches for that.
Anyway, it's very odd that the behavior seems mixed up. You could check the xfconf variables for the settings, if you've upgraded from previous versions you could also try to reset the channel via xfce4-settings-editor and then configure xfpm anew and see whether that fixes the issue.
It might also help if you attach the settings xml file of xfce4-power-manager (from ~/.config/xfce4/xfconf/..)

> Is there some other way that any sequence of events resulting in a
> simultaneous-closed-lid-and-unplugged-power-supply state will suspend the
> laptop?  That was the case under Ubuntu 10.10, IIRC.

Ubuntu 10.10 was released about 4 years ago, the architecture around suspend has changed a lot since then (e.g. UPower doesn't support it anymore).
Comment 4 ian 2014-08-18 06:48:51 CEST
Created attachment 5608 
settings XML

From xfce4-power-manager 1.0.11
Ubuntu 12.04
Comment 5 ian 2014-08-18 06:52:30 CEST
Apologies for the tone, but your initial reply suggested that you did not consider this to be a bug.  

I tried resetting the channel with xfce4-settings-editor as you suggested, but the problem persists.  I've attached the settings XML file.

Are you able to reproduce this issue?
Comment 6 Simon Steinbeiss editbugs 2014-08-18 10:02:46 CEST
Holy cow, that is a really old version of the power manager. Just as a disclaimer, we're not doing maintenance releases for previous versions.

I've looked into the source of 1.0.11 and locking the screen upon closing the lid is the default action, so the fact that you don't have an entry for that in your settings.xml file is ok. The on-battery setting also looks ok, cause suspend has the value 1.

I've browsed through the git history of xfpm since 1.0.11 but couldn't see any relevant commits for your bug. However I vaguely remember having problems myself on 12.04.

The current LTS release, 14.04, has a newer version of xfpm and also uses other software for suspend (the aforementioned logind). You could try whether that helps.
Comment 7 ian 2014-08-18 15:29:13 CEST
Looks like an upgrade is in my future.  It sounds like this bug is resolved/wontfix (for this version) in any case.
Comment 8 Simon Steinbeiss editbugs 2014-08-18 16:03:42 CEST
(In reply to ian from comment #7)
> Looks like an upgrade is in my future.  It sounds like this bug is
> resolved/wontfix (for this version) in any case.

Yeah, I'm sorry I don't have better news.
Comment 9 ian 2014-08-18 16:21:01 CEST
No apology needed, because your news *is* better: there has been a lot of development work -- several versions worth -- and I just haven't taken advantage of it yet :)

Bug #10291

Reported by:
ian
Reported on: 2013-08-09
Last modified on: 2014-08-18

People

Assignee:
Ali Abdallah
CC List:
1 user

Version

Version:
1.0.11

Attachments

settings XML (754 bytes, application/xml)
2014-08-18 06:48 CEST , ian
no flags

Additional information