Bug 223190

Summary: devel/dbus: Error org.freedesktop.DBus.Error.UnknownMethod: No such method 'Suspend'
Product: Ports & Packages Reporter: Piotr Kubaj <pkubaj>
Component: Individual Port(s)Assignee: freebsd-gnome (Nobody) <gnome>
Status: Closed Feedback Timeout    
Severity: Affects Only Me CC: arrowd
Priority: --- Flags: bugzilla: maintainer-feedback? (gnome)
Version: Latest   
Hardware: Any   
OS: Any   

Description Piotr Kubaj freebsd_committer 2017-10-23 16:02:22 UTC
I'm trying to make my laptop suspend. I run 11.1-STABLE with KDE. I can suspend just fine with zzz, but can't do it from KDE.

Running:
qdbus org.kde.kded /org/freedesktop/PowerManagement CanSuspend
prints:
true

Running:
qdbus org.kde.kded /org/freedesktop/PowerManagement Suspend
only locks the sceen.

I have traced the problem to DBUS. When I run:
dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Suspend, I get:
Error org.freedesktop.DBus.Error.UnknownMethod: No such method 'Suspend'
Comment 1 Gleb Popov freebsd_committer 2020-04-25 13:30:28 UTC
According to docs [1], nothing in UPower implements Suspend method.

However, there is local.org_kde_powerdevil service, which has org/freedesktop/PowerManagement object, which implements "Suspend". Does that suit you?

[1] https://upower.freedesktop.org/docs/UPower.html