[xubuntu] Failing to sleep after inactivity - power manager error?

Bug #1441460 reported by Michael Kalisz
102
This bug affects 49 people
Affects Status Importance Assigned to Milestone
powermgmt-base (Ubuntu)
Expired
Undecided
Unassigned
xfce4-power-manager (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Newly installed XUbuntu 14.10 on 2 different machines but both experience the same problem.

Problem:

Failing to sleep after inactivity and a "xfce4 power manager error"

When setting the machine in xfce4-power-manager to suspend after e.g. 15 minutes the machine will fail to suspend.

This is the message that meets me when I login after a failed suspend:

Power Manager Error
GDBus.Error:org.freedesktop.DBus.Error.NoReply:
Did not receive a reply. Possible causes include: the
remote application did not send a reply, the message
bus security policy blocked the reply, the reply
timeout expired, or the network connection was
broken.

http://s27.postimg.org/l24boyvqp/Screenshot_2015_04_05_15_20_38.png

I can suspend from the logout dialog box.

The following command suspends the system just fine:
$ dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Suspend

$ xfce4-power-manager --dump
---------------------------------------------------
Xfce power manager version 1.4.1
With policykit support
With network manager support
---------------------------------------------------
Can suspend: True
Can hibernate: False
Authorized to suspend: True
Authorized to hibernate: False
Authorized to shutdown: True
Has battery: False
Has brightness panel: True
Has power button: True
Has hibernate button: True
Has sleep button: True
Has LID: False

So I guess It's some kind of auth or policykit issue.

Revision history for this message
Colin Watson (cjwatson) wrote :

I expect xfce4-power-manager isn't necessarily the right target for this, but it's certainly closer to the mark than Launchpad itself.

affects: launchpad → xfce4-power-manager (Ubuntu)
Revision history for this message
john (av6john) wrote :

I had the same error with a laptop.

Some output.
---------------------------------------------------
Xfce power manager version 1.4.3
With policykit support
With network manager support
---------------------------------------------------
Can suspend: True
Can hibernate: False
Authorized to suspend: True
Authorized to hibernate: False
Authorized to shutdown: True
Has battery: True
Has brightness panel: True
Has power button: True
Has hibernate button: True
Has sleep button: True
Has LID: True

Revision history for this message
Michael Kalisz (michael-kalisz) wrote :

Just updated to latest release:

Description: Ubuntu 15.04
Release: 15.04
Codename: vivid

An wanted to let you know that it is still ta same problem except that now after it fails to suspend you get the following auth dialog: http://i.imgur.com/Go2uGBA.png

Revision history for this message
Thaddaeus Tintenfisch (thad-fisch-deactivatedaccount) wrote :

Does the system lock the screen at some point before it tries to suspend?

Revision history for this message
Michael Kalisz (michael-kalisz) wrote :

Yes it does.

Revision history for this message
Thaddaeus Tintenfisch (thad-fisch-deactivatedaccount) wrote :

Please set light-locker to lock the session “When the screensaver is deactivated” and test again.

Revision history for this message
Michael Kalisz (michael-kalisz) wrote :

Testing... :)

Noticed though that teh setting does not seem to "stick" i.e I set "“When the screensaver is deactivated” and logout/login the setting is back to "“When the screensaver is activated”

Revision history for this message
Michael Kalisz (michael-kalisz) wrote :

changing the light-locker setting to “When the screensaver is deactivated” solves the problem :)

Just tested by setting the timeout to something low and the machine got suspended....

If we can just make this setting persistent i.e. survive a logout or reboot. Does that work for you?

Revision history for this message
Sean Davis (bluesabre) wrote :

Since you're using 15.04 now, can you try the following steps?

Light Locker now persists its own settings, so we will want to do away with the current autostart launcher. Remove the following file:
~/.config/autostart/light-locker.desktop

Log out and back in.

Then open Xfce Power Manager Settings (xfce4-power-manager-settings). Go to the Security tab and make your changes in there. The settings should all persist across multiple reboots.

Let me know if this works for you.

Revision history for this message
Michael Kalisz (michael-kalisz) wrote :

Yes, it works for me :)

Thank you for taking the time to help me out.

Revision history for this message
Thaddaeus Tintenfisch (thad-fisch-deactivatedaccount) wrote :

The initial bug will be fixed once light-locker does not depend on VT switching anymore [1].

Changing the mentioned light-locker option or allowing inactive user sessions to suspend the system (logind policy) are possible workarounds.

[1] https://github.com/the-cavalry/light-locker/issues/22

Changed in xfce4-power-manager (Ubuntu):
status: New → Invalid
Revision history for this message
Michael Kalisz (michael-kalisz) wrote :

I noticed that the above procedure works fine AFTER you login.

Another scenario is when you just start the machine and leave it at the login prompt/dialog without logging in...The machine will the not get suspended.

This is not a big issue for me...but I guess others might be bothered.

Is there a global "“When the screensaver is deactivated” setting somewhere?

Revision history for this message
Thaddaeus Tintenfisch (thad-fisch-deactivatedaccount) wrote :

This is a known limitation (bug 894484) and some workarounds may be available.

xfce4-power-manager can only do power management if 1) it is started after login and 2) the user session is not marked as inactive.
A session will be marked as inactive once you lock the screen and the VT switch occurs. Enabling the mentioned setting will delay the switch and prevent the session from becoming inactive.

Changed in xfce4-power-manager (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
Markus Kwaśnicki (mrkskwsnck) wrote :

I just stumbled over this issue, because I am experiencing similar behaviour on a freshly installed Xubuntu 17.04 Zesty Zapus:

In a logged in session my laptop cannot suspend and after some inactivity time it displays an "Access Denied" notification. The only constraint for me is, this issue occurs only when battery powered. Though, with the power cord plugged in, suspend after inactiity works, indeed.

Revision history for this message
Ulrich Norbisrath (ulno) wrote :

I confirm this issue. I am running xubuntu 17.10. i.e. xfce with lightdm on my thinkpad x230. None of the mentioned work-arounds works for me as I don't want to give up locking the screen with a password. The policy suggestions seem to have no affect (in addition to allowing me to select suspend in xfce). I can suspend manually and also suspend when closing the lid. But leaving my laptop sitting without power with a locked screen will not suspend and drain the battery.

So, the agreed work-around is NOT to use lightdm if you want power management and a password secured login? Would upgrading to bionic beaver (18.04) make any difference?

Revision history for this message
Fan Zhang (bl4ck5un) wrote :

I can confirm the issue remains in bionic beaver.

Revision history for this message
ajgreeny (ajg-charlbury) wrote :

I can also confirm this problem in both Lubuntu and Xubuntu 18.04.

Revision history for this message
Zack Smith (zack-smith) wrote :

No fix after nearly four years and nine releases. Unsubscribing since I'll be in a grave before this bug gets addressed.

Revision history for this message
Raoul Duke (drrnrss) wrote :

This fix worked for me in Xubuntu 18.04 Bionic
My laptop now successfully suspends after the inactivity period.
Note that I had to restart in order for it to take effect:

https://askubuntu.com/a/851760/

Revision history for this message
Theo Linkspfeifer (lastonestanding) wrote :

Initial report was filed against a now outdated Xubuntu release.

It is quite possible that people are encountering a similar (but different) problem now after things had been changed under the hood. New report can be found here:

https://bugs.launchpad.net/ubuntu/+source/xfce4-power-manager/+bug/1768038

Changed in xfce4-power-manager (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Patrick Boake (netscr1be) wrote :

ls -al ~/.config/autostart/light-locker.desktop
ls: cannot access '/home/patrick/.config/autostart/light-locker.desktop': No such file or directory

Revision history for this message
Patrick Boake (netscr1be) wrote :

uname -a

Linux Aspire1 5.4.0-66-generic #74~18.04.2-Ubuntu SMP Fri Feb 5 11:21:26 UTC 2021 i686 i686 i686 GNU/Linux

Revision history for this message
Chris Guiver (guiverc) wrote :

Thank you for reporting this bug to Ubuntu.

Ubuntu 17.10 (artful) reached end-of-life on July 19, 2018.
Ubuntu 17.04 (zesty) reached end-of-life on January 13, 2018.
Ubuntu 16.10 (yakkety) reached end-of-life on July 20, 2017.
Ubuntu 15.10 (wily) reached end-of-life on July 28, 2016.
Ubuntu 15.04 (vivid) reached end-of-life on February 4, 2016.
Ubuntu 14.10 (utopic) reached end-of-life on July 23, 2015.

See this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

We appreciate that this bug may be old and you might not be interested in discussing it any more. But if you are then please upgrade to the latest Ubuntu version and re-test. If you then find the bug is still present in the newer Ubuntu version, please add a comment here telling us which new version it is in.

For bionic users, please see Theo Linkspfeifer (lastonestanding) comment #20 (and bug related to later releases)

Changed in powermgmt-base (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for powermgmt-base (Ubuntu) because there has been no activity for 60 days.]

Changed in powermgmt-base (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.