# NetworkManager doesn't start ModemManager openrc

## EyeOfCat

hello.

yesterday I'v updated ~280 packages (most of them was from kde) and today ModemManager didn't start with NetworkManager.

if I manually start ModemManager executing it's binary - networkmanager can see it over dbus and works correctly with broadband connections.

in /var/log/messages i didn\t see anything pointing that NetworkManager try to start ModemManager over dbus (as I suppose it was before)

dbus-monitor don't show anything about this. I downgrade dbus from 1.8.4 to 1.8.2 for some reaseon - makes no sense.

also I've encountered the same issue on my laptop. But that system uses systemd, so I just added ModemManager service to autostart.

here on openrc there is no service for ModemManager. And I didn't find anything about modemmanger in man pages for NetworkManager and NetworkManager.conf

I saw several topics here about "how make NetworkManager not to start ModemManager" but didn't find there a solution.

PS: sorry for my english )

----------

## freifunk_connewitz

Hi EyeOfCat,

thanks for opening my eyes on that. I had the very same problem of the broadband connection not being an option in NM anymore and was searching for the reason without success. But now I see it. Same prob like you, same solution (starting ModemManager manually). But actually that is only a workaround, not a solution.

I also noticed some time ago that NM-applet stopped to display signal strength on the GSM/UMTS connection (that was before it stopped activating it altogether). So maybe the connection between NM and MM was degrading slowly  :Smile: 

However: I'm not sure if this is a NM issue or a Gentoo/openrc issue. My feeling says we should start with Gentoo...

----------

## kavra

 *freifunk_connewitz wrote:*   

> Hi EyeOfCat,
> 
> thanks for opening my eyes on that. I had the very same problem of the broadband connection not being an option in NM anymore and was searching for the reason without success. But now I see it. Same prob like you, same solution (starting ModemManager manually). But actually that is only a workaround, not a solution.
> 
> I also noticed some time ago that NM-applet stopped to display signal strength on the GSM/UMTS connection (that was before it stopped activating it altogether). So maybe the connection between NM and MM was degrading slowly 
> ...

 

generate a init script

#cat /etc/init.d/ModemManager 

```
#!/sbin/runscript

# Distributed under the terms of the GNU General Purpose License v2

description="ModemManager daemon. The service is marked as started only \

when a network connection is established."

depend() {

        need dbus

        provide net

}

start() {

    ebegin "Starting ModemManager"

    start-stop-daemon --background --start --exec /usr/sbin/ModemManager \

    --make-pidfile --pidfile /run/ModemManager/ModemManager.pid

    eend $?

}

stop() {

    ebegin "Stopping ModemManager"

    start-stop-daemon --stop --exec /usr/sbin/ModemManager \

    --pidfile /run/ModemManager/ModemManager.pid

    eend $?

}
```

#mkdir /run/ModemManager

#/etc/init.d/ModemManager start

#rc-update add ModemManager default

----------

## UberLord

Wow, that's a lot of code.

openrc has a template system now

```
#!/sbin/runscript

command=/usr/sbin/ModemManager

command_background=yes

pidfile=/run/ModemManager/ModemManager.pid 

name="ModemManager daemon"

depend()

{

   provide net

   need dbus

}
```

Totally untested, but does the same job.

----------

## Randy Andy

Hi Folks,

after updating my machine yesterday, I started today with having similar trouble regarding networkmanager.

After looking into elogv I read this message which could help you eventually fixing the problem in a different way.   :Wink: 

 *Quote:*   

> 
> 
> INFO: setup                                                                                                                        │
> 
> │Package:    net-misc/networkmanager-0.9.10.0-r1                                                                                    │
> ...

 

[Edit, after fiddling around for a while]

In my case, the networkmanager stays at rc-status as started, but inactive.

I can't setup a new connection via GUI, cause no nic/device was recognized or listed into the GUI.

Even after deleting (moving to a secure place) two config files in:

```
/etc/NetworkManager/NetworkManager.conf
```

and all connection files listed here:

```
/etc/NetworkManager/system-connections/Connection*
```

and after restarting my system *(or minimalistic restarting the NetworkManager service of course), everthing works as expected.

* I used the chance to get rid of LP/Sievers systemd optimized udev, with the (un)predictable Network Names and do a downgrade (which is a real upgrade) to eudev.  :Wink: 

Best, Andy.

----------

## kavra

 *UberLord wrote:*   

> Wow, that's a lot of code.
> 
> openrc has a template system now
> 
> ```
> ...

 

thanks!!!

 it works fine, it's better

----------

