[avahi] Impact on battery life of avahi-daemon and Avahi clients

Till Kamppeter till.kamppeter at gmail.com
Fri Nov 23 03:21:27 PST 2012


In CUPS 1.6.x the CUPS broadcasting/browsing mechanism to let print 
queues on a server automatically appear on clients was removed, and 
instead, CUPS servers do broadcasting of their shared print queues only 
by Bonjour, but the CUPS damon dos no Bonjour browsing to let the 
server's queues automatically show up on clients.



One reason why the author of CUPS, Mike Sweet, dropped CUPS 
broadcasting/browsing is that it does not work well on mobile devices 
which suspend to save battery power.

Now my idea is the following:

On every modern Linux machine avahi-daemon is running for various 
reasons, so it is already present and you can see services in your 
network, including CUPS print queues, at any time, for example with 

This will be made use of using two methods:

1. Print dialogs of both GTK and Qt should browse Bonjour-broadcasted 
remote printers and add them to the list of available printers, using 
the new cupsEnumDests() function of the CUPS library. I have informed 
the upstream maintainers of the print dialogs asking for this feature. 
This also eliminates the need of a local CUPS daemon on a machine with 
no local print queues, making printing with configuration-less clients 
more mobile-friendly.

2. Extra daemon (cups-browsed) for legacy applications not using method 
(1). The daemon will browse Bonjour broadcasts of remote printers and 
create/remove local raw queues pointing to these printers appropriately. 
This recovers the automatic appearing of remote queues in all-CUPS-1.6.x 
environments. This extra daemon should be derived from 
examples/client-browse-services.c but with the callback function setting 
up and removing the local CUPS queues when remote printers appear and 

Now my questions are:

1. What is the impact of a running avahi-daemon on battery life?

2. Can a system suspend and keep suspended with avahi-daemon running?

3. When waking up from suspend, how quickly does avahi-daemon get 
updated on the current state of available services in the network?

4. How would be the impact on battery life of the extra daemon I 
mentioned in (2) above?

5. Can a system suspend and keep suspended with the extra daemon running?

6. When waking up from suspend, how quickly does the extra daemon get 
updated on the current state of available printers in the network?

I am asking this because one of the development goals for Linux 
distributions is mobile, see for example:



More information about the avahi mailing list