System Daemon or DBus activated service?

Jonathan Kang jonathankang at gnome.org
Wed Oct 31 07:37:46 UTC 2018


Hi Dan

On Wed, Oct 31, 2018 at 12:39 AM Dan Williams <dcbw at redhat.com> wrote:

> On Tue, 2018-10-30 at 12:42 +0100, Aleksander Morgado wrote:
> > Hey!
> >
> > > According to this[1], it says
> > > > ModemManager is a system daemon
> > >
> > > and
> > > > ModemManager is a DBus system bus activated service (meaning it's
> > > > started automatically when a request arrives).
> > >
> > > A system daemon means that MM is running all the time. Doesn't that
> > > conflict with DBus activated service? Besides, can ModemManager
> > > quit when let's say, it's not needed, just like what PackageKit
> > > does. Is it possible?
> > >
> > > *[1] https://www.freedesktop.org/software/ModemManager/api/latest/r
> > > ef-overview-introduction.html
> > >
> >
> > This depends on how the system works. In the pre-systemd setups MM
> > was
> > DBus-activated by NetworkManager on boot, but in all new setups using
> > systemd the ModemManager process is managed via a systemd service so
> > the lifecycle of the process is that of a system daemon. It would
> > probably be wise to stop talking about DBus activation for MM I
> > assume, we should update the docs.
>
> Yeah.  Also in the pre-systemd world, NM needed to start MM very early
> to detect modems anyway.  So it was effectively a system daemon, just
> that it wasn't started by a SYSV initscript or upstart job or whatever.
>
>
> The ideal system would be that MM would be started whenever certain
> hardware was inserted (or cold-detected), eg whenever any device driven
> by cdc-acm, qmi_wwan, cdc-mbim, cdc-wdm, sierra, qcserial, etc was
> found by the kernel.  MM would run and if it found a modem would keep
> running, otherwise it would quit.


This sounds quite promising.

> But reality is that this is too
> complicated to get reliably correct, and clients (NetworkManager,
> mmcli, etc) can't distinguish between "MM couldn't find any modems and
> quit" and "MM wasn't started at all due to misconfiguration".
>
> PackageKit somehow manage this, maybe that's because they provide
libraries instead of DBus Calls?

- Jonathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20181031/82b07511/attachment.html>


More information about the ModemManager-devel mailing list