System Daemon or DBus activated service?

Dan Williams dcbw at redhat.com
Tue Oct 30 16:39:46 UTC 2018


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.  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".

Dan


More information about the ModemManager-devel mailing list