Power manager no longer suspends 'power manager not authorised'

Bug #1319598 reported by Tim Hamilton
194
This bug affects 38 people
Affects Status Importance Assigned to Milestone
light-locker (Ubuntu)
Opinion
Undecided
Unassigned
light-locker-settings (Ubuntu)
Confirmed
Undecided
Unassigned
xfce4-power-manager (Ubuntu)
Invalid
Low
Unassigned

Bug Description

After upgrade to 14.04 xfce power manager no longer suspends. It does send monitors into standy and lock the desktop.

Upon relogin power manager gives the notification 'Power Manager not authorised'

Running power manager with -debug gives the following output upon logging in:

TRACE[xfpm-power.c:1126] xfpm_power_polkit_auth_changed_cb(): Auth configuration changed
TRACE[xfpm-polkit.c:455] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.upower.suspend is authorized=TRUE
TRACE[xfpm-polkit.c:455] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.upower.hibernate is authorized=TRUE
TRACE[xfpm-polkit.c:455] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.udisks.drive-set-spindown is authorized=TRUE
TRACE[xfpm-disks.c:170] xfpm_disks_get_is_auth_to_spin(): Is auth to spin down disks : 1
TRACE[xfpm-battery.c:286] xfpm_battery_refresh_icon(): Battery state 4
TRACE[xfpm-power.c:1170] xfpm_power_refresh_adaptor_visible(): Tray icon configuration: : ((XfpmShowIcon) SHOW_ICON_WHEN_BATTERY_PRESENT)
TRACE[xfpm-power.c:1134] xfpm_power_hide_adapter_icon(): Hide adaptor icon
TRACE[xfpm-battery.c:286] xfpm_battery_refresh_icon(): Battery state 4
TRACE[xfpm-power.c:1170] xfpm_power_refresh_adaptor_visible(): Tray icon configuration: : ((XfpmShowIcon) SHOW_ICON_WHEN_BATTERY_PRESENT)
TRACE[xfpm-power.c:1134] xfpm_power_hide_adapter_icon(): Hide adaptor icon
SHOW_ICON_WHEN_BATTERY_PRESENT)
TRACE[xfpm-power.c:1134] xfpm_power_hide_adapter_icon(): Hide adaptor icon
TRACE[xfpm-manager.c:380] xfpm_manager_alarm_timeout_cb(): Alarm inactivity timeout id 2
TRACE[xfpm-battery.c:286] xfpm_battery_refresh_icon(): Battery state 4

This bug also affects other Xubntu and Lubntu users: http://ubuntuforums.org/showthread.php?t=2223164

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: xfce4-power-manager 1.2.0-3ubuntu4
ProcVersionSignature: Ubuntu 3.13.0-24.47-generic 3.13.9
Uname: Linux 3.13.0-24-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.1
Architecture: amd64
CurrentDesktop: XFCE
Date: Thu May 15 08:54:34 2014
InstallationDate: Installed on 2013-05-28 (351 days ago)
InstallationMedia: Lubuntu 13.04 "Raring Ringtail" - Release amd64+mac (20130424)
SourcePackage: xfce4-power-manager
UpgradeStatus: Upgraded to trusty on 2014-05-07 (7 days ago)

Revision history for this message
Tim Hamilton (pseudomorph) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xfce4-power-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
Aaron Hopkins (newfaldon) wrote :

As the thread starter from the linked thread, obviously this also impacts me. For me it's hibernate that doesn't work. I have not tried suspend. Monitors work okay. Didn't occur until 14.04 update.

Revision history for this message
3ruce (3ruce) wrote :

I have this bug too...

Revision history for this message
3ruce (3ruce) wrote :

I thought that the ppa from xubuntu devs (below) that installs a new version of xfce4-power-manager might have fixed this, but it didn't

https://bugs.launchpad.net/ubuntu/+source/xfce4-power-manager/+bug/1303736/comments/56

Revision history for this message
J (nopejpg) wrote :

When the "Power Manager not authorized" comes up the following is output with xfce4-power-manager --debug:

TRACE[xfpm-power.c:1134] xfpm_power_hide_adapter_icon(): Hide adaptor icon
TRACE[xfpm-polkit.c:368] xfpm_polkit_init_data(): Using unix session polkit subject
TRACE[xfpm-polkit.c:455] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.upower.suspend is authorized=TRUE
TRACE[xfpm-polkit.c:455] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.upower.hibernate is authorized=FALSE
TRACE[xfpm-polkit.c:466] xfpm_polkit_changed_cb(): Auth changed
TRACE[xfpm-power.c:1126] xfpm_power_polkit_auth_changed_cb(): Auth configuration changed
TRACE[xfpm-polkit.c:455] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.upower.suspend is authorized=FALSE
TRACE[xfpm-polkit.c:455] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.upower.hibernate is authorized=FALSE
TRACE[xfpm-polkit.c:455] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.udisks.drive-set-spindown is authorized=FALSE
TRACE[xfpm-disks.c:170] xfpm_disks_get_is_auth_to_spin(): Is auth to spin down disks : 0

penalvch (penalvch)
Changed in xfce4-power-manager (Ubuntu):
importance: Undecided → Low
status: Confirmed → Triaged
Revision history for this message
J (nopejpg) wrote :

Should also note that this is an issue with light-locker. I know this because I've removed light-locker and replaced it with xscreensaver and the issue goes away.

Revision history for this message
Simon Steinbeiß (ochosi) wrote :

As suggested by the output in comment #5, the issue seem to be wrong permissions in policykit:

TRACE[xfpm-polkit.c:455] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.upower.suspend is authorized=TRUE

Not sure what exactly sets those policies, the power manager only reacts to it.
Same goes for light-locker, neither of those two should touch the policies, only react to them.

You could check the permissions that are set in /usr/share/polkit-1/actions/org.freedesktop.login1.policy (you need sudo-rights to do that) and see whether that helps with the problem.

Revision history for this message
Aaron Hopkins (newfaldon) wrote :

I can confirm #7. Removing Light-locker and reinstalling xscreensaver (plus a reboot) fixes the problem.

Revision history for this message
ole.tange (n-launchpad-net-tange-dk) wrote :

I have the same problem, but I do not have light-locker installed.

Linux Mint 17 Qiana

Revision history for this message
sudocrem (sudocrem) wrote :

Hi all,

I had the same problem. My laptop suspended fine when invoked from the keyboard (fn+power key) but not with the powermanager when idle, I found it always blocked with the message "powermanager : not authorized" when I came back.

Thanks to your clue with light-locker, it seems that the following fixed the problem permanently for me:

sudo aptitude purge light-locker light-locker-settings
sudo aptitude install light-locker light-locker-settings

I believe that removing and then re-installing fixed a policy problem somewhere.
Hope this will help...

Cheers,

Revision history for this message
Doug Shelton (dshelton-san) wrote :

Using Xubuntu 14.0.1, I also see this issue. I followed the steps in sudocrem's post but the issue persists.

Revision history for this message
Doug Shelton (dshelton-san) wrote :

note, I used "apt-get" instead of "aptitude"

Revision history for this message
Doug Shelton (dshelton-san) wrote :

I believe I found it. I modified the file /usr/share/polkit-1/actions/org.freedesktop.upower.policy/org.freedesktop.upower.policy and set

    <defaults>
      <allow_inactive>yes</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>

then went away for a while. When I returned, the machine was asleep and woke up normally.

I hope this helps.

Revision history for this message
Jonathan Polak (jpolak) wrote :

Xubuntu 14.01 - same issue. doesn't suspend on its own but no problem invoking from term or by shutting screen.

Revision history for this message
brad haack (bradhaack-g) wrote :

The allow_inactive solution shown by tigerdog fixed it for me

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

This problem is triggered by light-locker which locks the user session (VT7) and forwards the user to the unlock screen (VT8). Please read the official blog entry [1] to learn more about how screen locking works.

The result of this functionality is that the user session becomes inactive while the screen is locked. Therefore, the power manager is not authorized to perform certain actions anymore.

Possible solution are:

- enable late locking (it delays the VT switch, enable it via Light Locker Settings > Automatically lock the session when the screensaver is deactivated)
- disable automatic locking completely
- change the according upower policy (comment #14)

[1] http://xubuntu.org/news/screen-locking-in-xubuntu-14-04/

Changed in xfce4-power-manager (Ubuntu):
status: Triaged → Invalid
Changed in light-locker (Ubuntu):
status: New → Opinion
Changed in light-locker-settings (Ubuntu):
status: New → Opinion
Revision history for this message
Paul Winkler (slinkp) wrote :

Thaddaeus, sorry but I don't understand how is this invalid when the default out-of-the-box configuration is broken?
I am pretty sure that most of the users, like myself, did not explicitly choose or configure light-locker, we just got it by default when upgrading to 14.04.

Thank you for providing solutions, but IMO the default configuration should be to use one of these solutions.

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

Paul, only the status for the xfce4-power-manager package has been changed to 'invalid'.

Revision history for this message
Jarno Suni (jarnos) wrote :

As for #17 I have disabled automatic locking, but I would like to run "light-locker-command -l && xfce4-session-logout -s" occasionally, and that fails, but not always in my experience.

Revision history for this message
brad haack (bradhaack-g) wrote :

I can't believe this bug is still here. I installed xubuntu 32 bit last year & had this issue. Now I updated to 64 bit, still here. My solution is to disable light-locker, but tiger-dogs solution may be better.

Changed in light-locker-settings (Ubuntu):
status: Opinion → Confirmed
Revision history for this message
Jarno Suni (jarnos) wrote :

Solution in #14 did not work for me. Note that the file to modify is "/usr/share/polkit-1/actions/org.freedesktop.upower.policy". Command "light-locker-command -l && xfce4-session-logout -s" still failed to suspend few times, but worked after I tried it few times with and without command "light-locker-command -l".

Revision history for this message
Achim (hoffmannachim) wrote :

Bug still (!) there.
But #14 seems to work for me.
for my lubuntu 15.10:
/usr/share/polkit-1/actions/org.xfce.power.policy

Revision history for this message
Jarno Suni (jarnos) wrote :

Achim, what do you mean by /usr/share/polkit-1/actions/org.xfce.power.policy ?

Revision history for this message
Jarno Suni (jarnos) wrote :

If I use "light-locker-command -l && xfce4-session-logout -s" and have

  <defaults>
      <allow_inactive>yes</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>

in "/usr/share/polkit-1/actions/org.freedesktop.upower.policy" within <action id="org.freedesktop.upower.suspend"> block in Ubuntu (studio) 14.04.3 LTS, the suspending does not work occasionally. I get authorization prompt for suspending and besides the attached dialog.

Revision history for this message
Jarno Suni (jarnos) wrote :

When this happnes, I have to go to TTY1 and back to TTY7 to get image on screen.

Revision history for this message
Achim (hoffmannachim) wrote :

 "/usr/share/polkit-1/actions/org.xfce.power.policy" is the file name on my lubuntu 15.10 instead of "/usr/share/polkit-1/actions/org.freedesktop.upower.policy"

Revision history for this message
Achim (hoffmannachim) wrote :

But anyway, hibernation works just sometimes, sometimes not.
Still trying to find out why...

Revision history for this message
Achim (hoffmannachim) wrote :

Removing light-locker seems to be no option for me. It's not possible without removing lubuntu-desktop...

Revision history for this message
Jarno Suni (jarnos) wrote :

Achim, you don't need to remove light-locker package. Just do not run the daemon in startup and run e.g. xscreensaver instead.

Revision history for this message
Achim (hoffmannachim) wrote :

Stupid me! My swap partition was to small for my upgraded memory. So every time the RAM in use was bigger than my swap, hibernation did not work. After resizing the swap, it seems to work.
So for now I can again confirm that #14 works.
But I forgot to mention, that I had to enable hibernation in general bevor.
See:
http://askubuntu.com/questions/614662/how-to-enable-hibernation-in-15-04

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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