From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#22565: Cannot talk to upowerd over D-Bus Date: Sun, 07 Feb 2016 15:49:56 +0100 Message-ID: <871t8oy3qj.fsf@gnu.org> References: <87powbgrdi.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35271) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSQg5-0000c1-OF for bug-guix@gnu.org; Sun, 07 Feb 2016 09:51:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aSQg2-0003Vy-EV for bug-guix@gnu.org; Sun, 07 Feb 2016 09:51:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:56205) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSQg2-0003Vu-AZ for bug-guix@gnu.org; Sun, 07 Feb 2016 09:51:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aSQg2-0004i6-3V for bug-guix@gnu.org; Sun, 07 Feb 2016 09:51:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87powbgrdi.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Fri, 05 Feb 2016 15:32:09 +0100") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: 22565@debbugs.gnu.org Cc: swedebugia@riseup.net, request@debbugs.gnu.org tags 22565 notabug close 22565 thanks ludo@gnu.org (Ludovic Court=C3=A8s) 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=3Dorg.freedesktop.UPower /= org/freedesktop/UPower org.freedesktop.UPower.Suspend > Error org.freedesktop.DBus.Error.UnknownMethod: Method "Suspend" with sig= nature "" on interface "org.freedesktop.UPower" doesn't exist > > See > . Actually the above method simply does not exist (the blog post at 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=3Dorg.freedesktop.UPower /org/fre= edesktop/UPower org.freedesktop.UPower.GetCriticalAction method return time=3D1454855982.307374 sender=3D:1.1 -> destination=3D:1.51= serial=3D449 reply_serial=3D2 string "PowerOff" $ dbus-send --print-reply --system --dest=3Dorg.freedesktop.UPower /org/fre= edesktop/UPower org.freedesktop.UPower.GetDisplayDevice method return time=3D1454855987.010638 sender=3D:1.1 -> destination=3D:1.52= serial=3D450 reply_serial=3D2 object path "/org/freedesktop/UPower/devices/DisplayDevice" $ dbus-send --print-reply --system --dest=3Dorg.freedesktop.UPower /org/fre= edesktop/UPower org.freedesktop.UPower.EnumerateDevices method return time=3D1454856012.554536 sender=3D:1.1 -> destination=3D:1.53= serial=3D451 reply_serial=3D2 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 =E2=80=98loginctl=E2=80=99 command (or, presumably, other elogi= nd clients such as GNOME or Xfce) can talk to elogind: --8<---------------cut here---------------start------------->8--- $ loginctl suspend=20 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=E2=80=99s a different issue. Thanks, Ludo=E2=80=99.