On Wed, 2018-10-31 at 15:37 +0800, Jonathan Kang wrote: > Hi Dan > > On Wed, Oct 31, 2018 at 12:39 AM Dan Williams <d...@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/late > > > > st/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.
Yeah, it's the ideal, but for various reasons it's a bunch of work for somewhat minimal benefit. > > > 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? PackageKit doesn't deal with hardware though, which is the big difference. Yes, all the issues can be worked around, it just takes effort that (I personally) would rather put into making modems themselves work better. But I'd certainly be happy if somebody else looked into the MM lifecycle and posted improvements. Dan > - Jonathan > _______________________________________________ > ModemManager-devel mailing list > ModemManager-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel _______________________________________________ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel