Don't think this is a bug in indicator-session. Basically indicator-
session is just calling two dbus methods on org.gnome.ScreenSaver; Lock
and SimulateUserActivity. It seems that the SimulateUserActivity call is
not returning immediately. I can illustrate this with a simple script:

#!/bin/bash

dbus-send --session --print-reply --dest=org.gnome.ScreenSaver \
  /org/gnome/ScreenSaver org.gnome.ScreenSaver.Lock
dbus-send --session --print-reply --dest=org.gnome.ScreenSaver \
  /org/gnome/ScreenSaver org.gnome.ScreenSaver.SimulateUserActivity

which when run, locks the screen and then shows the lock screen
immediately. When you unlock the screen, the script will still be
blocked until the timeout is reached, where we get:

method return sender=:1.79 -> dest=:1.103 reply_serial=2
Error org.freedesktop.DBus.Error.NoReply: 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.

The first line is from the successful call to Lock. The call to
SimulateUserActivity is also successful since the lock screen appears
immediately, but we never get a reply.

A decent workaround might be to set the timeout to some low value, say 1
second. It seems to work when setting --reply-timeout=1 in  the script,
I'm going to try rebuilding indicator-session with that value and see if
it helps (though I am curious why we never get a reply).

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1067515

Title:
  Locking from user menu fails second time

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/indicator-session/+bug/1067515/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to