You are not logged in.

#1 2012-10-12 05:17:07

GutenYe
Member
From: China
Registered: 2011-11-27
Posts: 44
Website

[SOLVED] NetworkManager auto restart even though I stop it.

Hi,

I enable NetworkManager at system boot.

# systemctl enable NetworkManager.service

After I stop NetworkManager manually, and run chromium/firefox, it restart NetworkManager again.

# systemctl stop NetworkManager
> Active: inactive (dead) since Fri, 12 Oct 2012 12:37:51 +0800; 24min ago

$ chromium

! NetworkManager auto restarted.

# sysetmctl status NetworkManager
> Active: active (running) since Fri, 12 Oct 2012 12:44:13 +0800; 17min ago

After a little dig by myself, I found out the restart was called by D-Bus.

$ journalctl _SYSTEMD_UNIT=dbus.service -f

Oct 12 12:44:13 -- dbus-daemon[566]: dbus[566]: [system] Activating via systemd: service name='org.freedesktop.NetworkManager' unit='dbus-org.freedesktop.NetworkManager.service'
Oct 12 12:44:13 -- dbus[566]: [system] Activating via systemd: service name='org.freedesktop.NetworkManager' unit='dbus-org.freedesktop.NetworkManager.service'
Oct 12 12:44:13 -- dbus-daemon[566]: dbus[566]: [system] Activating via systemd: service name='org.bluez' unit='dbus-org.bluez.service'
Oct 12 12:44:13 -- dbus[566]: [system] Activating via systemd: service name='org.bluez' unit='dbus-org.bluez.service'
Oct 12 12:44:13 -- dbus[566]: [system] Activation via systemd failed for unit 'dbus-org.bluez.service': Unit dbus-org.bluez.service failed to load: No such file or directory. See system logs and 'systemctl status dbus-org.bluez.service' for details.
Oct 12 12:44:13 -- dbus-daemon[566]: dbus[566]: [system] Activation via systemd failed for unit 'dbus-org.bluez.service': Unit dbus-org.bluez.service failed to load: No such file or directory. See system logs and 'systemctl status dbus-org.bluez.service' for details.
Oct 12 12:44:13 -- dbus-daemon[566]: dbus[566]: [system] Successfully activated service 'org.freedesktop.NetworkManager'
Oct 12 12:44:13 -- dbus[566]: [system] Successfully activated service 'org.freedesktop.NetworkManager'

So, my problem is, How can I stop NetworkManager permanently?, so that I can use both netcfg and NetworkManager side by side, but I don't want to disable NetworkManager at system boot.

Thanks for any help.

Last edited by GutenYe (2012-10-13 00:59:23)


Linux, Vim, Ruby, Javascript and Go.

Offline

#2 2012-10-12 05:27:14

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: [SOLVED] NetworkManager auto restart even though I stop it.

GutenYe wrote:

So, my problem is, How can I stop NetworkManager permanently?, so that I can use both netcfg and NetworkManager side by side, but I don't want to disable NetworkManager at system boot.

I don't understand this.  You want to stop something "permanently" while somehow keeping it enabled, WTF?

Offline

#3 2012-10-12 05:41:48

GutenYe
Member
From: China
Registered: 2011-11-27
Posts: 44
Website

Re: [SOLVED] NetworkManager auto restart even though I stop it.

WonderWoofy wrote:

I don't understand this.  You want to stop something "permanently" while somehow keeping it enabled, WTF?

Sorry for the confusion, I mean after I stop NetworkManger, and start chromium, I don't want NetowrkManager auto restart in background.


Linux, Vim, Ruby, Javascript and Go.

Offline

#4 2012-10-12 06:05:47

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 4,961

Re: [SOLVED] NetworkManager auto restart even though I stop it.

WW's question is why do you have NetworkManager start on boot just to disable it later? Are you low enough on memory that you need to disable it to run your browser?

To answer you question, though, I would try copying the NetworkManager.service file from /usr/lib/systemd/system to /etc/systemd/system/multi-user.target.wants and adding Restart=no under the service section.

Last edited by Scimmia (2012-10-12 06:15:30)

Offline

#5 2012-10-12 06:32:19

GutenYe
Member
From: China
Registered: 2011-11-27
Posts: 44
Website

Re: [SOLVED] NetworkManager auto restart even though I stop it.

I'm more in favor of transparent, I want something to stop, it is stopped, period. If I want to use it again, I'll start it.

Anyway, the real problem I occur is sometime, I need to debug the network. I stop NetworkManager, and use netcfg or some other tools to configure wlan0 interface. The auto-restart just mess thing up.

I also want to know how does the auto-restart works under the hood. and I'm not familiar with dbus.

I tried to add Restart=no, but it doesn't work.

Last edited by GutenYe (2012-10-12 06:43:12)


Linux, Vim, Ruby, Javascript and Go.

Offline

#6 2012-10-13 00:58:42

GutenYe
Member
From: China
Registered: 2011-11-27
Posts: 44
Website

Re: [SOLVED] NetworkManager auto restart even though I stop it.

I finally found same issue and solution at https://bugzilla.redhat.com/show_bug.cgi?id=815243

If you want to disable NetworkManager auto-restart feature, follow bellow

# cp  /usr/lib/systemd/system/NetworkManager.service /etc/systemd/system

# vi /etc/systemd/system/NetworkManager.service

  #Alias=dbus-org.freedesktop.NetworkManager.service  # comment it.

# rm /etc/systemd/system/dbus-org.freedesktop.NetworkManager.service

Thanks for the helping.

Last edited by GutenYe (2012-10-13 00:59:04)


Linux, Vim, Ruby, Javascript and Go.

Offline

#7 2012-12-17 23:30:20

breecummins
Member
Registered: 2012-10-31
Posts: 11

Re: [SOLVED] NetworkManager auto restart even though I stop it.

Thank you! The link was very informative. This worked for me:

1. Remove the file
   /usr/share/dbus-1/system-services/org.freedesktop.NetworkManager.service
2. Comment this line from /usr/lib/systemd/system/NetworkManager.service:
   Alias=dbus-org.freedesktop.NetworkManager.service
3.Remove this symlink:
   /etc/systemd/system/dbus-org.freedesktop.NetworkManager.service

Offline

#8 2014-02-26 17:36:51

gbc921
Member
From: Brazil
Registered: 2011-08-05
Posts: 62
Website

Re: [SOLVED] NetworkManager auto restart even though I stop it.

I needed to reload the systemctl daemon to make it works:

# systemctl daemon-reload

"Nothing is impossible, impossible just takes longer"

Offline

#9 2014-03-26 18:31:47

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,071

Re: [SOLVED] NetworkManager auto restart even though I stop it.

gbc921, the thread is more than a year old. Do not necrobump. https://wiki.archlinux.org/index.php/Fo … Bumping.22

Closing...


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

Board footer

Powered by FluxBB