UPower Suspend/Hibernate: not authorized

Kernels & Hardware, configuring network, installing services

UPower Suspend/Hibernate: not authorized

Postby bdalenoord » 2014-05-13 08:27

Hello fellow Debian users,

I've been using Debian Jessie on my Dell Latitude E6530 for the last half year and never had a real problem. I neglected to upgrade for quite some while though and decided it would be a good idea to perform a full system upgrade yesterday. Everything seemed fine until I went to suspend my laptop.

I'm using XFCE. and the buttons in the xfce4-power-manager are disabled/grayed out. When issueing the following command:
Code: Select all
dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Suspend

I get the following reply:
Code: Select all
Error org.freedesktop.UPower.GeneralError: not authorized


After throwing this error into Google, I've found various bug reports leading to various suspicions and stating various solutions. After trying out all the solutions I've found whilst none worked, I decided to try my luck here.

The primary suspicion stated by many bug reports is the lacking of a ConsoleKit-session. However, when I run 'ck-list-sessions' I get the following output:
Code: Select all
Session3:
   unix-user = '1000'
   realname = 'Bas Dalenoord'
   seat = 'Seat1'
   session-type = ''
   active = FALSE
   x11-display = ''
   x11-display-device = ''
   display-device = '/dev/tty1'
   remote-host-name = ''
   is-local = TRUE
   on-since = '2014-05-13T07:49:23.389713Z'
   login-session-id = '4294967295'
   idle-since-hint = '2014-05-13T07:49:53.332633Z'
Session4:
   unix-user = '1000'
   realname = 'Bas Dalenoord'
   seat = 'Seat1'
   session-type = ''
   active = TRUE
   x11-display = ':0'
   x11-display-device = '/dev/tty8'
   display-device = '/dev/tty1'
   remote-host-name = ''
   is-local = TRUE
   on-since = '2014-05-13T07:49:25.310140Z'
   login-session-id = '4294967295'
Session5:
   unix-user = '1000'
   realname = 'Bas Dalenoord'
   seat = 'Seat1'
   session-type = ''
   active = FALSE
   x11-display = ':0'
   x11-display-device = '/dev/tty8'
   display-device = '/dev/tty1'
   remote-host-name = ''
   is-local = TRUE
   on-since = '2014-05-13T07:49:25.335428Z'
   login-session-id = '4294967295'

There is an active session stated... :(

I do not use a display manager, rather start XFCE in my '.xsession' with the following line:
Code: Select all
exec ck-launch-session startxfce4


In my '/etc/pam.d/common-session' I've added the following line before 'pam_ck_connector.so' (as instructed in '/usr/share/doc/xfce4-session/README.Debian'):
Code: Select all
session   optional  pam_loginuid.so


When running 'xfce4-power-manager --dump' I get the following outpu:
Code: Select all
---------------------------------------------------
       Xfce power manager version 1.2.0
With policykit support
With network manager support
With DPMS support
---------------------------------------------------
Can suspend: True
Can hibernate: False
Can spin down hard disks: True
   Authorized to suspend: False
   Authorized to hibernate: False
   Authorized to shutdown: False
   Authorized to spin down hard disks: False
Has battery: True
Has brightness panel: True
Has power button: True
Has hibernate button: True
Has sleep button: True
Has LID: True

The indented lines above confirm that it is in fact an issue with rights.

Related to this issue seems to be the fact that I cannot modify Network connections in Gnome's Network Manager.

I've been struggling with ConsoleKit under Arch and never found the cause so I'm quite sad to see the ever-so-stable Debian throwing me back down memory lane... Can anyone point me in the right direction?

Thanks!
bdalenoord
 
Posts: 2
Joined: 2014-05-13 07:55

Re: UPower Suspend/Hibernate: not authorized

Postby skreech » 2014-05-13 18:05

I am glad you have posted. I am in the exact same situation, but I update more frequently.

To show the similarity in our situation:

Code: Select all
$ dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Suspend
Error org.freedesktop.UPower.GeneralError: not authorized


In the following, note that I use 'startx' to start X.

Code: Select all
$ ck-list-sessions
Session1:
   unix-user = '1000'
   realname = ''
   seat = 'Seat1'
   session-type = ''
   active = FALSE
   x11-display = ''
   x11-display-device = ''
   display-device = '/dev/tty1'
   remote-host-name = ''
   is-local = TRUE
   on-since = '2014-05-13T17:35:39.647207Z'
   login-session-id = '1'
   idle-since-hint = '2014-05-13T17:36:30.647928Z'
Session2:
   unix-user = '1000'
   realname = ''
   seat = 'Seat1'
   session-type = ''
   active = TRUE
   x11-display = ':0'
   x11-display-device = '/dev/tty7'
   display-device = '/dev/tty1'
   remote-host-name = ''
   is-local = TRUE
   on-since = '2014-05-13T17:36:06.020437Z'
   login-session-id = '1'


.xsession follows. I have tried a lot of things related to ck-launch-session, dbus, and startxfce4. Since none of that helps now, I have reverted to the advice in '/usr/share/doc/xfce4-session/README.Debian':

Code: Select all
#!/bin/bash

exec startxfce4


Code: Select all
$ grep -C 1 pam_loginuid /etc/pam.d/common-session
session   optional   pam_systemd.so
session optional   pam_loginuid.so
session   optional   pam_ck_connector.so nox11


Showing lack of authorizations:

Code: Select all
$ xfce4-power-manager --dump
---------------------------------------------------
       Xfce power manager version 1.2.0
With policykit support
With network manager support
With DPMS support
---------------------------------------------------
Can suspend: True
Can hibernate: True
Can spin down hard disks: True
Authorized to suspend: False
Authorized to hibernate: False
Authorized to shutdown: False
Authorized to spin down hard disks: False
Has battery: True
Has brightness panel: False
Has power button: True
Has hibernate button: True
Has sleep button: True
Has LID: True


I have mined /var/log/apt/history.log. This began after a dist-upgrade that touched these packages that I suspect are involved:

Code: Select all
libpolkit-agent-1-0:amd64 (0.105-4, 0.105-5)
policykit-1:amd64 (0.105-4, 0.105-5)
libpolkit-backend-1-0:amd64 (0.105-4, 0.105-5)


I have not yet tried downgrading these packages, but it's next on my list.
skreech
 
Posts: 2
Joined: 2014-05-13 17:50

Re: UPower Suspend/Hibernate: not authorized

Postby skreech » 2014-05-13 18:15

skreech wrote:
Code: Select all
libpolkit-agent-1-0:amd64 (0.105-4, 0.105-5)
policykit-1:amd64 (0.105-4, 0.105-5)
libpolkit-backend-1-0:amd64 (0.105-4, 0.105-5)

I have not yet tried downgrading these packages, but it's next on my list.


I have now downgraded these three packages by retrieving the previous version from snapshot.debian.org.

These were the packages that i installed with 'dpkg -i':

http://snapshot.debian.org/archive/debi ... _amd64.deb
http://snapshot.debian.org/archive/debi ... _amd64.deb
http://snapshot.debian.org/archive/debi ... _amd64.deb

This was successful in rectifying the problem. If I weren't in the middle of a workday, I would have to submit a detailed bug report. Until then, I suppose I'll just mark these as held.
skreech
 
Posts: 2
Joined: 2014-05-13 17:50

Re: UPower Suspend/Hibernate: not authorized

Postby bdalenoord » 2014-05-13 18:23

Glad to hear I'm not the only one having this issue. I'll try your solution next thing in the morning as I haven't got access to the machine right now and I'll post back here.

Edit:
Your advice did indeed solve my problems. I've got the following in '.xsession' now:
Code: Select all
exec startxfce4 --with-ck-launch


This lists the following when I run 'ck-list-sessions':
Code: Select all
Session4:
   unix-user = '1000'
   realname = 'Bas Dalenoord'
   seat = 'Seat1'
   session-type = ''
   active = FALSE
   x11-display = ''
   x11-display-device = ''
   display-device = '/dev/tty1'
   remote-host-name = ''
   is-local = TRUE
   on-since = '2014-05-14T06:13:43.240288Z'
   login-session-id = '4'
   idle-since-hint = '2014-05-14T06:14:23.852450Z'
Session5:
   unix-user = '1000'
   realname = 'Bas Dalenoord'
   seat = 'Seat1'
   session-type = ''
   active = TRUE
   x11-display = ':0'
   x11-display-device = '/dev/tty7'
   display-device = '/dev/tty1'
   remote-host-name = ''
   is-local = TRUE
   on-since = '2014-05-14T06:13:44.812401Z'
   login-session-id = '4'


In both your and my before-situation, 'ck-list-sessions' listed an active session, but it was not the last session. It now is. I think the problems might have to do with this, though I'm not really sure which package contains the bug, but the 'policykit-1'-package seems the most appropriate to file a bug report.

Edit 2:
I've found a bug report which seems to be related: https://bugs.debian.org/cgi-bin/bugrepo ... bug=747882 Added a reply there handing them the info we found out.
bdalenoord
 
Posts: 2
Joined: 2014-05-13 07:55


Return to System configuration

Who is online

Users browsing this forum: No registered users and 8 guests

fashionable