[avahi] Updating the state after coming out from suspend

Simon Schampijer simon at schampijer.de
Mon Nov 1 03:02:18 PDT 2010


On 10/07/2010 06:24 PM, Simon Schampijer wrote:
> Hi,
>
> at OLPC we have the following issue: when a machine comes out of suspend
> syncing up the collaboration states (until other nodes are visible)
> takes a long time. We use Avahi and Telepathy Salut [1] for that task.
>
>  From a conversation on the olpc-devel mailing list [2] we came to the
> conclusion that notifying Avahi about coming from resume could be one
> part of the solution to the issue. For example the Upower "Resuming"
> signal could be used for that [3].
>
> Avahi could then for example implement the wake-up behavior as specified
> in [4]. The spec does suggest in the section "5.5 Questions Requesting
> Unicast Responses" that one should use unicast responses instead of
> multicast responses in the resume case in order to handle the case
> efficiently.
>
> Tomeu had a quick chat with Lennart already on IRC about it, let's see
> if we can 'resume' the issue solving in this thread.
>
> Thanks in advance for sharing your thoughts,
> Simon
>
> [1] http://telepathy.freedesktop.org/wiki/CategorySalut
> [2] http://lists.laptop.org/pipermail/devel/2010-September/029955.html
> [3] http://upower.freedesktop.org/docs/UPower.html#UPower::Resuming
> [4] http://files.multicastdns.org/draft-cheshire-dnsext-multicastdns.txt

I did test with avahi-browse and avahi-publish to see what the situation 
is like in plain avahi without the layers of Sugar and Yelepathy.

Machine A is running avahi-browse and when A goes into idle-suspend (CPU 
suspend) machine B publishes a service. A few seconds later machine A is 
woken up and kept awake (machine B has idle suspend disabled). In most 
of the cases when tested here the service does not get announced on 
machine B, while keeping machine A awake for more than 5 minutes. Same 
is true when quitting a service announcement while in idle-suspend.

What are the current mechanism in avahi to handle those cases? Is there 
a timeout after which the network is scanned? Like described in my 
initial mail, using the UPower resuming signal was an option mentioned 
by Lennart. Is there a code path in avahi already that would need to be 
called? Any pointers welcome.

Of course the best option would be to be woken up bu multicast packets 
that are addressed to us, but sadly that does not seem to be possible 
for us at the moment why we look for other options.

Regards,
    Simon


More information about the avahi mailing list