How to get rid of the Network Manager errors at shut down

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Do not start a support topic here please. Before you post please read this

How to get rid of the Network Manager errors at shut down

Postby Husse on Sat Nov 08, 2008 8:02 am

This is a common problem. I've had it and seen that it can hit Ubuntu, Arch and Sabayon at least
When you shut down your computer there are lots of error messages from Network Manager, so many that it slows things down
There is probably some nice solution to this but I've only found a "dirty hack"
Edit by Husse
This hack does not work with Felicia as the file /etc/init.d/dhcdbd does not exist there. Another file running at shutdown must be used
End edit
Edit the file /etc/init.d/dhcdbd
Code: Select all
gksu gedit /etc/init.d/dhcdbd

A bit down you see
case "$1" in
The second case is
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
d_stop
log_end_msg $?
;;

Add
Code: Select all
killall NetworkManager # Dirty hack to avoid nasty error messages!

immediately below stop)
Nice clean shutdown after this and I can't see any dangerous side effects
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Linux Mint is funded by ads and donations.
 

Re: How to get rid of the Network Manager errors at shut down

Postby knuckles on Sat Nov 08, 2008 8:08 am

thanks for the Tip, i had the same messages.

But i think with Felicia they will gone, because on Intrepit there is that Problem..
Sorry for my BAD English!!
User avatar
knuckles
Level 3
Level 3
 
Posts: 171
Joined: Sun Aug 24, 2008 2:41 am
Location: Luxembourg

Re: How to get rid of the Network Manager errors at shut down

Postby exploder on Sat Nov 08, 2008 11:45 am

Thanks for the tip! If it works I might start making gdm themes again!

Edit: I tested this tip and it works great, no ill effects from applying this. Thanks!
exploder
Level 15
Level 15
 
Posts: 5893
Joined: Tue Feb 13, 2007 10:50 am
Location: HartfordCity, Indiana USA

Re: How to get rid of the Network Manager errors at shut down

Postby Husse on Sat Nov 08, 2008 4:44 pm

@ exploder and all the rest :)
I also posted a solution for partly destroyed usplash when booting
viewtopic.php?f=46&t=18591
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: How to get rid of the Network Manager errors at shut down

Postby NWAdawg on Sat Nov 08, 2008 6:33 pm

Thanks for the tip Husse. It worked great
Ubuntu User #24005, Linux User #480025
User avatar
NWAdawg
Level 1
Level 1
 
Posts: 22
Joined: Sun Sep 21, 2008 8:48 am
Location: NW Arkansas

Re: How to get rid of the Network Manager errors at shut down

Postby garda on Tue Nov 11, 2008 3:08 am

I've just found this post and would like to thank you for the tip. This dirty hack has made my computer's shutdown process look cleaner. :D
User avatar
garda
Level 5
Level 5
 
Posts: 744
Joined: Sat Aug 30, 2008 2:55 am
Location: /root

Re: How to get rid of the Network Manager errors at shut down

Postby dickrog on Fri Nov 21, 2008 4:50 pm

I'm a Linux neophyte so excuse my ignorance: When I enter the command in terminal as listed (gksu gedit /etc/init.d/dhcdbd) I get a blank window in the text editor. Is it a hidden file? If so, how do I unhide it? I'm using Felicia on a Toshiba 3000. Everything works beautifully except for the shutdown problem. If I quit Network Manager before shutting down, all goes well, which makes me thing the dirty hack is just the ticket. Thanks in advance.
dickrog
Level 1
Level 1
 
Posts: 2
Joined: Fri Nov 21, 2008 4:32 pm

Re: How to get rid of the Network Manager errors at shut down

Postby piratesmack on Fri Nov 21, 2008 6:01 pm

Thanks, Husse, I was wondering if there was a solution to that.
piratesmack
Level 5
Level 5
 
Posts: 710
Joined: Mon May 26, 2008 3:08 pm

Re: How to get rid of the Network Manager errors at shut down

Postby Husse on Fri Nov 21, 2008 6:07 pm

@ dickrog
This dirty hack does not work on Felicia I just discovered - the file used does not exist there
But do you really get these network manager errors when you shut down - I thought they were gone...
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: How to get rid of the Network Manager errors at shut down

Postby dickrog on Fri Nov 21, 2008 7:05 pm

Husse ... I should have been more clear. I'm not getting error messages. The machine just hangs on shutdown and the splashscreen doesn't clear. When I close Network Manager manually, the screen closes and the computer powers off just fine. Is there a hack/edit I can do to force the computer to close Network Manager during the shutdown process? It's not a big deal except for my obsessive nature. Felicia is working so well that I'd love to clear up this last little problem.
dickrog
Level 1
Level 1
 
Posts: 2
Joined: Fri Nov 21, 2008 4:32 pm

Re: How to get rid of the Network Manager errors at shut down

Postby Husse on Sat Nov 22, 2008 9:00 am

@ dickrog
We have to find another file that can be used. Let me think about it and come back to you
I don't want to use a file more or less at random....
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: How to get rid of the Network Manager errors at shut down

Postby Husse on Thu Jan 01, 2009 11:56 am

Long delayed answer
I think you could add the line to /etc/init.d/halt
Code: Select all
gksu gedit /etc/init.d/halt

between fi and the line
# See if we need to cut the power.
Does not help at reboot I think
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: How to get rid of the Network Manager errors at shut down

Postby elija on Fri Feb 20, 2009 9:09 am

Husse wrote:Long delayed answer
I think you could add the line to /etc/init.d/halt
Code: Select all
gksu gedit /etc/init.d/halt

between fi and the line
# See if we need to cut the power.
Does not help at reboot I think


I have a slightly neater way that should work both at reboot and shutdown

Open a terminal
cd /etc/init.d
sudo gedit nwm (this should create a new file called nwm)
Add the following into the file
Code: Select all
#! /bin/sh
#   Kill all Network Managers.
#   Should hopefully stop those annoying error messages
killall NetworkManager
exit 0

Save the file and exit gedit

cd ../rc6.d
sudo ln -s ../init.d/nwm K00nwn (Edited after discussion with Husse. It does make more sense this way)

When your computer enters runlevel 6 (shutting down or preparing to reboot) your new script should be the first thing that is run. So far I have experienced no ill effects from this.

Elija
Last edited by elija on Fri Feb 20, 2009 2:04 pm, edited 1 time in total.
less is more, but more more than more is, so more is less less, so use more less if you want less more, more or less.

Read my blog at the Fifth Continent
Over 50? Visit the Saga Zone
Registered Linux User: #459086
elija
Level 1
Level 1
 
Posts: 29
Joined: Sun Dec 21, 2008 9:30 am

Re: How to get rid of the Network Manager errors at shut down

Postby Husse on Fri Feb 20, 2009 11:47 am

Yes - and instead of typing a typo :) (just kidding) you could use update-rc.d
Read man update-rc.d to know how (not the easiest read :))
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: How to get rid of the Network Manager errors at shut down

Postby elija on Fri Feb 20, 2009 12:05 pm

Husse wrote:Yes - and instead of typing a typo :) (just kidding) you could use update-rc.d
Read man update-rc.d to know how (not the easiest read :))


LOL. K01awm was chosen as the name so it would run first (I think they run in name order) :D I don't know if it actually makes any difference

[edit]You wern't kidding about the easiness of the read! I would rather do it my way :D [/edit]
less is more, but more more than more is, so more is less less, so use more less if you want less more, more or less.

Read my blog at the Fifth Continent
Over 50? Visit the Saga Zone
Registered Linux User: #459086
elija
Level 1
Level 1
 
Posts: 29
Joined: Sun Dec 21, 2008 9:30 am

Re: How to get rid of the Network Manager errors at shut down

Postby Husse on Fri Feb 20, 2009 1:45 pm

You are absolutely right that it (probably) does not matter if it's called awm or nwm - it's a symbolic link
But they are normally called the same in both locations I believe (with the obvious exception for the K01)
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: How to get rid of the Network Manager errors at shut down

Postby elija on Fri Feb 20, 2009 2:02 pm

Husse wrote:You are absolutely right that it (probably) does not matter if it's called awm or nwm - it's a symbolic link
But they are normally called the same in both locations I believe (with the obvious exception for the K01)


In that case it would probably be better to name the shortcut K00nwm so that it still runs first. I'll update my original post to reflect that.
less is more, but more more than more is, so more is less less, so use more less if you want less more, more or less.

Read my blog at the Fifth Continent
Over 50? Visit the Saga Zone
Registered Linux User: #459086
elija
Level 1
Level 1
 
Posts: 29
Joined: Sun Dec 21, 2008 9:30 am

Linux Mint is funded by ads and donations.
 

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 17 guests