# NetworkManager problems

## CamH

m having a problem with Gnome NetworkManager. I am an iBook G4 with a 2.6.27 kernel. First, I emerged the .65 version (it's unmasked by default in Portage). Nothing worked, although I COULD add it to the default runlevel with rc-update and it would start when the system booted. I wasn't able to find the Network Manager Applet or anything associated with it though.

Next, I tried the SVN .7 version from Gnome's website. Same issues.

Last, I tried the masked .66 version from portage. This one would bring up the Network Manager Configuration Editor, but it did not show any interfaces, and the Applet was nowhere to be found.

Can anyone give me a hand with this? I am able to get on my wireless network with WICD, but it is a piece of garbage and NetworkManager works much nicer on other computers I have used. I just want it to work on mine.

----------

## Beforegod

What is written in the logs?

Try to remove it from the runleves and try to start it with /etc/init.d/NetWorkManager (or something similar) and show the results.

----------

## CamH

Alright, here is the log:

 *Quote:*   

> 
> 
> Nov 12 08:17:52 ibook NetworkManager: <info>  Will activate connection 'eth0'.
> 
> Nov 12 08:17:52 ibook NetworkManager: <info>  Device eth0 activation scheduled...
> ...

 

It actually goes through that same thing multiple times in a total of about 8 seconds... I'm pretty sure I have some sort of configuration messed up. Can someone point me in the right direction?  :Smile: 

----------

## Hypnos

The only error is about not being able to get a hostname -- perhaps your machine?  What does your /etc/hosts file say?

It should have a line like this:

```
127.0.0.1   HOSTNAME.DOMAIN HOSTNAME localhost

```

where "HOSTNAME" is set in /etc/conf.d/hostname.

If you didn't mess with /etc/nsswitch.conf and /etc/host.conf the defaults should be fine; NetworkManager should set /etc/resolv.conf .

----------

## duckz

did you emerge nm-applet? and you need to remove all entry in /etc/net /etc/wireless, edit /etc/dhcp/dhclient.conf.

and if you emerge nm-applet, if you are not using gnome I think you will need to start it when you start X.

----------

## CamH

I did emerge nm-applet, yes. The version I have matches the version I have of NetworkManager. I just checked, and all of the files you mentioned are blank. When I attempt to start nm-applet from the terminal I get the following error:

 *Quote:*   

> 
> 
> nm-applet: symbol lookup error: nm-applet: undefined symbol: dbus_method_dispatcher_new
> 
> 

 

----------

## Hypnos

Do a revdep-rebuild -- that should resolve the link error.

Perhaps you upgraded dbus since installing networkmanager.

----------

## CamH

 *Hypnos wrote:*   

> Do a revdep-rebuild -- that should resolve the link error.
> 
> Perhaps you upgraded dbus since installing networkmanager.

 

Per your suggestion, I just ran revdep-rebuild and I'm still getting the same error. I should also note that some config files had to be updated after running revdep-rebuild so I ran cfg-update immediately thereafter.

----------

## Hypnos

Was networkmanager rebuilt by revdep-rebuild?  If so, this error should not occur; if not, try re-emerging it yourself (though revdep-rebuild should have picked it up).

If the error persists, something very weird is going on -- in this case, post your "emerge --info".  Also, make sure that your properly uninstalled your SVN version of NetworkManager before you emerged the version from Portage -- anything in /usr/local will likely get run before anything in/usr as it is ahead in your $PATH.

----------

## CamH

 *Hypnos wrote:*   

> Was networkmanager rebuilt by revdep-rebuild?  If so, this error should not occur; if not, try re-emerging it yourself (though revdep-rebuild should have picked it up).
> 
> If the error persists, something very weird is going on -- in this case, post your "emerge --info".  Also, make sure that your properly uninstalled your SVN version of NetworkManager before you emerged the version from Portage -- anything in /usr/local will likely get run before anything in/usr as it is ahead in your $PATH.

 

No, networkmanager was not rebuilt by revdep-rebuild. I just confirmed that everything pertaining to the SVN version of NetworkManager was uninstalled by running make uninstall on it. Next, I unmerged NetworkManager in portage and emerged the .66 version again. I am still having the same problem.

Here is the output of emerge --info:

 *Quote:*   

> 
> 
> Portage 2.1.4.5 (default/linux/powerpc/ppc32/2008.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.27-gentoo-r2 ppc)
> 
> =================================================================
> ...

 

----------

## Hypnos

(your emerge --info looks fine)

I am also using version 0.6.6 of networkmanager and nm-applet and they just "work" for me.

I am, however, using dbus-1.1.20 since I don't do deep upgrades -- I bet you are using dbus-1.2.3-r1.  One thing to try is downgrade dbus and do a revdep-rebuild.

I am still confused why revdep-rebuild doesn't pick up nm-applet if the binary won't start do to a link error, and why re-emerging nm-applet would work at all if it doesn't link.  Before you try downgrading dbus, do an "ldd /usr/bin/nm-applet" and see if it returns any error.  If it does, it means revdep-rebuild is broken (perhaps for ppc); if it doesn't, it means we are missing something

----------

## CamH

Thanks for the fast replies. I really appreciate it.  :Smile: 

Here is the output from ldd /usr/bin/nm-applet:

 *Quote:*   

> 
> 
> 	linux-vdso32.so.1 =>  (0x00100000)
> 
> 	libglade-2.0.so.0 => /usr/lib/libglade-2.0.so.0 (0x0ffc5000)
> ...

 

----------

## Hypnos

Looks like it links fine as expected.  When I run nm-applet from the terminal I see no link errors.

Just to humor me, please specify the path when running nm-applet from the terminal:

```
# /usr/bin/nm-applet
```

Anyway, try downgrading dbus and see what happens ... frustrating that we must resort to trial and error!

----------

## CamH

 *Hypnos wrote:*   

> Looks like it links fine as expected.  When I run nm-applet from the terminal I see no link errors.
> 
> Just to humor me, please specify the path when running nm-applet from the terminal:
> 
> ```
> ...

 

Alright, I tried starting it through /usr/bin/nm-applet -- same deal. I downgraded to dbus-1.1.20 and I get the exact same error when attempting to run nm-applet.

----------

## Hypnos

You did the revdep-rebuild after downgrading to dbus?

If so, I'm at a loss  :Smile: 

How does something refuse to start, giving a link error, if it builds clean and "ldd" shows no error?  The only explanations I have is that the executable being run is not what is installed, or that it's doing something cute with dynamically loading libraries that isn't working.

Could you post the entire terminal session when you run /usr/bin/nm-applet?  If you know how to use debugging tools, then running from inside gdb would be useful too.

----------

## CamH

 *Hypnos wrote:*   

> You did the revdep-rebuild after downgrading to dbus?
> 
> If so, I'm at a loss 
> 
> How does something refuse to start, giving a link error, if it builds clean and "ldd" shows no error?  The only explanations I have is that the executable being run is not what is installed, or that it's doing something cute with dynamically loading libraries that isn't working.
> ...

 

Yes, I tried revdep-rebuild after downgrading dbus. Could you please explain what you mean by posting the terminal session? I don't really understand exactly what you want me to post.  :Smile: 

----------

## Hypnos

I mean, is there anything other than

```
# /usr/bin/nm-applet

nm-applet: symbol lookup error: nm-applet: undefined symbol: dbus_method_dispatcher_new 

#

```

in the terminal when you run it?  I feel like we're missing something simple here ...

If not, it's up to you to debug starting with gdb   :Sad: 

----------

## CamH

No, sir, that's it! I'll look in to using gdb, though. Thanks for your help.  :Smile: 

----------

## duckz

I dont see dbus use flag in your emerge --info output. and no networkmanager use flag also. maybe this is the problem.

----------

## mrspam

Hi!

The cause of your problem is the nm-applet you use to connect. Everytime you make a connection with the Networkmanager, it may change your hostname. And as X only allows to connect to the display by using the hostname itself was started with, you cannot start any program which needs X.

You can see that by having a terminal open before the nm-applet (NetworkManager) starts and starting the programs from there:

```
user@OLDHOSTNAME ~ $ gedit

No protocol specified

Cannot open display:

Run 'gedit --help' to see a full list of available command line options.

user@OLDHOSTNAME ~ $ set | grep DISPLAY

DISPLAY=:0.0

user@OLDHOSTNAME ~ $ 
```

When you type 

```
hostname
```

 you will see, that your hostname changed.

To enforce nm-applet to use a static hostname (this is what I was doing to solve that problem) paste this two-liner into /etc/dhcp/dhclient.conf:

```
send host-name "oldhostname";

supersede host-name "oldhostname";
```

This solved it for me, hopefully it will to it for you as well...

----------

