GNU bug report logs -
#22565
Cannot talk to upowerd over D-Bus
Previous Next
Reported by: ludo <at> gnu.org (Ludovic Courtès)
Date: Fri, 5 Feb 2016 14:33:02 UTC
Severity: normal
Tags: notabug
Done: ludo <at> gnu.org (Ludovic Courtès)
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 22565 in the body.
You can then email your comments to 22565 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#22565
; Package
guix
.
(Fri, 05 Feb 2016 14:33:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
ludo <at> gnu.org (Ludovic Courtès)
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Fri, 05 Feb 2016 14:33:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
On GuixSD as of v0.9.0-1430-g234ea8a, attempts to talk to upowerd over
D-Bus fail:
--8<---------------cut here---------------start------------->8---
$ sudo dbus-send --print-reply --system --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Suspend
Error org.freedesktop.DBus.Error.UnknownMethod: Method "Suspend" with signature "" on interface "org.freedesktop.UPower" doesn't exist
--8<---------------cut here---------------end--------------->8---
See
<https://lists.gnu.org/archive/html/guix-devel/2016-01/msg01004.html>.
Ludo’.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#22565
; Package
guix
.
(Sun, 07 Feb 2016 14:51:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 22565 <at> debbugs.gnu.org (full text, mbox):
tags 22565 notabug
close 22565
thanks
ludo <at> gnu.org (Ludovic Courtès) skribis:
> On GuixSD as of v0.9.0-1430-g234ea8a, attempts to talk to upowerd over
> D-Bus fail:
>
> $ sudo dbus-send --print-reply --system --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Suspend
> Error org.freedesktop.DBus.Error.UnknownMethod: Method "Suspend" with signature "" on interface "org.freedesktop.UPower" doesn't exist
>
> See
> <https://lists.gnu.org/archive/html/guix-devel/2016-01/msg01004.html>.
Actually the above method simply does not exist (the blog post
at <http://andrusiv.com/blog/2011/12/12/shutdown-dbus.html> is several
years old.)
If we invoke methods that do exist, everything is fine:
--8<---------------cut here---------------start------------->8---
$ dbus-send --print-reply --system --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.GetCriticalAction
method return time=1454855982.307374 sender=:1.1 -> destination=:1.51 serial=449 reply_serial=2
string "PowerOff"
$ dbus-send --print-reply --system --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.GetDisplayDevice
method return time=1454855987.010638 sender=:1.1 -> destination=:1.52 serial=450 reply_serial=2
object path "/org/freedesktop/UPower/devices/DisplayDevice"
$ dbus-send --print-reply --system --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.EnumerateDevices
method return time=1454856012.554536 sender=:1.1 -> destination=:1.53 serial=451 reply_serial=2
array [
object path "/org/freedesktop/UPower/devices/line_power_AC"
object path "/org/freedesktop/UPower/devices/battery_BAT0"
]
--8<---------------cut here---------------end--------------->8---
The thing is, poweroff/suspend/hibernate is now delegated to logind (see
src/linux/up-backend.c in UPower.)
Indeed, the ‘loginctl’ command (or, presumably, other elogind clients
such as GNOME or Xfce) can talk to elogind:
--8<---------------cut here---------------start------------->8---
$ loginctl suspend
Failed to suspend: Interactive authentication required.
--8<---------------cut here---------------end--------------->8---
I suppose we need some polkit magic to allow unprivileged users to
invoke those actions, but that’s a different issue.
Thanks,
Ludo’.
Added tag(s) notabug.
Request was from
ludo <at> gnu.org (Ludovic Courtès)
to
control <at> debbugs.gnu.org
.
(Sun, 07 Feb 2016 14:51:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
22565 <at> debbugs.gnu.org and ludo <at> gnu.org (Ludovic Courtès)
Request was from
ludo <at> gnu.org (Ludovic Courtès)
to
control <at> debbugs.gnu.org
.
(Sun, 07 Feb 2016 14:51:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#22565
; Package
guix
.
(Wed, 17 Feb 2016 22:04:02 GMT)
Full text and
rfc822 format available.
Message #15 received at 22565 <at> debbugs.gnu.org (full text, mbox):
I’m trying to figure out why we cannot use the Xfce menu to shut down or
reboot, and while doing that I found that
loginctl poweroff
(as root on the TTY) does have the intended effect. When run as a user
I see a similar error as mentioned above:
Failed to power off: Interactive authentication required.
I think this is just fine.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#22565
; Package
guix
.
(Sun, 21 Feb 2016 22:48:01 GMT)
Full text and
rfc822 format available.
Message #18 received at 22565 <at> debbugs.gnu.org (full text, mbox):
Ricardo Wurmus <rekado <at> elephly.net> skribis:
> I’m trying to figure out why we cannot use the Xfce menu to shut down or
> reboot, and while doing that I found that
>
> loginctl poweroff
>
> (as root on the TTY) does have the intended effect. When run as a user
> I see a similar error as mentioned above:
>
> Failed to power off: Interactive authentication required.
>
> I think this is just fine.
I don’t know if it’s fine. :-) I would expect that on GNOME/Xfce a
password window would pop up when that RPC is invoked, but I’m not sure
how it’s supposed to happen, or under what conditions.
Ludo’.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#22565
; Package
guix
.
(Mon, 29 Feb 2016 07:14:02 GMT)
Full text and
rfc822 format available.
Message #21 received at 22565 <at> debbugs.gnu.org (full text, mbox):
Ludovic Courtès <ludo <at> gnu.org> writes:
> Ricardo Wurmus <rekado <at> elephly.net> skribis:
>
>> I’m trying to figure out why we cannot use the Xfce menu to shut down or
>> reboot, and while doing that I found that
>>
>> loginctl poweroff
>>
>> (as root on the TTY) does have the intended effect. When run as a user
>> I see a similar error as mentioned above:
>>
>> Failed to power off: Interactive authentication required.
>>
>> I think this is just fine.
>
> I don’t know if it’s fine. :-) I would expect that on GNOME/Xfce a
> password window would pop up when that RPC is invoked, but I’m not sure
> how it’s supposed to happen, or under what conditions.
After strace’ing “xfce4-session” when clicking on the shutdown button in
the Xfce menu I see the same error returned over DBus.
xfce4-session sends “PowerOff” to “org.freedesktop.login1” via DBus and
gets “org.freedesktop.DBus.Error.InteractiveAuthorizationRequired” back,
which causes the whole thing to fail. (I wonder why it doesn’t use the
fallback mechanism to shut down, but maybe that’s because it detected
systemd/logind and committed to shutting down via DBus.)
So maybe it’s not fine after all.
~~ Ricardo
Information forwarded
to
bug-guix <at> gnu.org
:
bug#22565
; Package
guix
.
(Mon, 29 Feb 2016 09:30:02 GMT)
Full text and
rfc822 format available.
Message #24 received at 22565 <at> debbugs.gnu.org (full text, mbox):
Ricardo Wurmus <rekado <at> elephly.net> skribis:
> Ludovic Courtès <ludo <at> gnu.org> writes:
>
>> Ricardo Wurmus <rekado <at> elephly.net> skribis:
>>
>>> I’m trying to figure out why we cannot use the Xfce menu to shut down or
>>> reboot, and while doing that I found that
>>>
>>> loginctl poweroff
>>>
>>> (as root on the TTY) does have the intended effect. When run as a user
>>> I see a similar error as mentioned above:
>>>
>>> Failed to power off: Interactive authentication required.
>>>
>>> I think this is just fine.
>>
>> I don’t know if it’s fine. :-) I would expect that on GNOME/Xfce a
>> password window would pop up when that RPC is invoked, but I’m not sure
>> how it’s supposed to happen, or under what conditions.
>
> After strace’ing “xfce4-session” when clicking on the shutdown button in
> the Xfce menu I see the same error returned over DBus.
Presumably the underlying problem is the polkit issue (determining which
users are “active” and thus allowed to execute privileged operation)
that Andy has been working on and discussed on IRC and at:
https://lists.gnu.org/archive/html/guix-devel/2016-02/msg01139.html
https://lists.gnu.org/archive/html/guix-devel/2016-02/msg01000.html
https://gnunet.org/bot/log/guix/2016-02-28#T936426
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 28 Mar 2016 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 9 years and 163 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.