<div dir="ltr">Hi Dan<br><br><div class="gmail_quote"><div dir="ltr">On Wed, Oct 31, 2018 at 12:39 AM Dan Williams <<a href="mailto:dcbw@redhat.com">dcbw@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, 2018-10-30 at 12:42 +0100, Aleksander Morgado wrote:<br>
> Hey!<br>
> <br>
> > According to this[1], it says<br>
> > > ModemManager is a system daemon<br>
> > <br>
> > and<br>
> > > ModemManager is a DBus system bus activated service (meaning it's<br>
> > > started automatically when a request arrives).<br>
> > <br>
> > A system daemon means that MM is running all the time. Doesn't that<br>
> > conflict with DBus activated service? Besides, can ModemManager<br>
> > quit when let's say, it's not needed, just like what PackageKit<br>
> > does. Is it possible?<br>
> > <br>
> > *[1] <a href="https://www.freedesktop.org/software/ModemManager/api/latest/r" rel="noreferrer" target="_blank">https://www.freedesktop.org/software/ModemManager/api/latest/r</a><br>
> > ef-overview-introduction.html<br>
> > <br>
> <br>
> This depends on how the system works. In the pre-systemd setups MM<br>
> was<br>
> DBus-activated by NetworkManager on boot, but in all new setups using<br>
> systemd the ModemManager process is managed via a systemd service so<br>
> the lifecycle of the process is that of a system daemon. It would<br>
> probably be wise to stop talking about DBus activation for MM I<br>
> assume, we should update the docs.<br>
<br>
Yeah.  Also in the pre-systemd world, NM needed to start MM very early<br>
to detect modems anyway.  So it was effectively a system daemon, just<br>
that it wasn't started by a SYSV initscript or upstart job or whatever.<br>
<br>
<br>
The ideal system would be that MM would be started whenever certain<br>
hardware was inserted (or cold-detected), eg whenever any device driven<br>
by cdc-acm, qmi_wwan, cdc-mbim, cdc-wdm, sierra, qcserial, etc was<br>
found by the kernel.  MM would run and if it found a modem would keep<br>
running, otherwise it would quit.  </blockquote><div><br></div><div>This sounds quite promising.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">But reality is that this is too<br>
complicated to get reliably correct, and clients (NetworkManager,<br>
mmcli, etc) can't distinguish between "MM couldn't find any modems and<br>
quit" and "MM wasn't started at all due to misconfiguration".<br><br></blockquote><div>PackageKit somehow manage this, maybe that's because they provide libraries instead of DBus Calls?</div><div><br></div><div>- Jonathan </div></div></div>