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.
Full log
View this message in rfc822 format
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’.
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.