Hi Christian,

Christian Gogolin wrote:
> the output of
> 
> $ /usr/bin/dbus-send --session --dest=org.freedesktop.PowerManagement
> --type=method_call --print-reply --reply-timeout=2000
> /org/freedesktop/PowerManagement org.freedesktop.PowerManagement.Suspend
> 
> when run as root is:
> 
> Failed to open connection to session message bus: Did not receive a
> reply. Possible causes include: the remote application did not send a
> reply, the message bus security policy blocked the reply, the reply
> timeout expired, or the network connection was broken.
> 
> So I think I have a "similar but slightly different problem".
> 
> I don't know if that matters, but I am using xmonad as window manager,
> just like Nikolay A. Panov who reported #496911. My xorg version is
> 1:7.3+15.

I guess the general problem is that I filter out the wrong kind of the
error messages. I was hoping to be able to distinguish between local and
remote errors other than "I don't know how to suspend", and I was doing
that by trying to filter for DBus related errors. Here's what I know:

- All errors return an error code.
- DBus connection errors do not start with "Error org.freedesktop".
- DBus interface mismatch errors do start with "Error org.freedesktop",
and return defined errors.
- When I forcibly uninstall pm-utils I get:

Error org.freedesktop.DBus.GLib.UnmappedError.GpmControlError.Code0:
General failure: No suspend method found

- When I replace /usr/sbin/pm-suspend by a script that does "exit 1", I
get *no error message*, just like when it does "exit 0", and I get a
return code of 0.

In effect, I think I should just take the return code of dbus-send
instead of trying to filter error messages. If the message was received
by pm-utils on the other end, even if it failed, I should look no
further, and consider it a "succeeded suspend attempt". I'll put this in.

Cheers,
Bart




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to