# nm-applet (Gnome Network Manager) not starting

## gentoo_giant

I've tried doing this in both KDE and Gnome.  I try starting nm-applet...this is the error that I get:

```

** (nm-applet:15809): WARNING **: <WARN>  request_name(): Could not acquire the session service as it is already taken.  Return: 3

** (nm-applet:15809): WARNING **: <WARN>  constructor(): Couldn't initialize the D-Bus manager.

```

I already did try installing nm-applet with just KDE per instructions in the gentoo documentation (couldn't find the page to post here), but I don't think that should have affected nm-applet at all.  Please help.  Thanks.

----------

## rainer

Looks like another frontend of NetworkManager is running already - probably knetworkmanager. Try killing knetworkmanager and start nm-applet again.

----------

## gentoo_giant

I'm actually not using KNetworkManager at all...had trouble compiling it.

I got network manager working finally, but for some reason it wont' detect my wireless card.

----------

## Rexilion

Can you do:

```
/etc/init.d/NetworkManager stop

NetworkManager --no-daemon
```

And post the output of the last command?

----------

## gentoo_giant

Actually, I have NetworkManager to start up once I log in...sorry I didn't mention that.

So NetworkManager starts.  I can start up my wireless card (with /etc/init.d/netwlan0 start) and detect all the wireless networks with the command line (I can't seem to connect to any of them).  When I click on NetworkManager, under "Wireless Networks," it says "wireless is disabled."

Something else is odd.  When I try to start wireless with ifconfig (sudo ifconfig wlan0 up), I get the following error: SIOCSIFFLAGS: Unknown error 132.

----------

## Rexilion

 *gentoo_giant wrote:*   

> So NetworkManager starts. When I click on NetworkManager, under "Wireless Networks," it says "wireless is disabled."
> 
> Something else is odd.

 

You are not starting NetworkManager when you login   :Wink:  . NetworkManager is the daemon that handles everything at the low level (sets interfaces, does the associating and all that to make stuff work). What you start during login is a GUI interface (nm-applet or knetworkmanager) that communicates with NetworkManager and tells it what to do.

By using the command I gave you, you see how NetworkManager is handling everything. It provides info about how and what  :Smile:  . But:

 *gentoo_giant wrote:*   

> So NetworkManager starts.  I can start up my wireless card (with /etc/init.d/netwlan0 start) and detect all the wireless networks with the command line (I can't seem to connect to any of them).  When I click on NetworkManager, under "Wireless Networks," it says "wireless is disabled."
> 
> Something else is odd.

 

NetworkManager handles your interfaces, so no need for /etc/init.d/net.wlan0 (this interferes with NetworkManager since they do the same thing). However, it does *not* explain why NetworkManager does not see any wireless networks (it should even if you activate /etc/init.d/net.wlan0). However:

 *gentoo_giant wrote:*   

> When I try to start wireless with ifconfig (sudo ifconfig wlan0 up), I get the following error: SIOCSIFFLAGS: Unknown error 132.

 

That *might* indicate a more severe problem. It seems that the kernel has trouble handling your card. However, it is kinda weird you are able to retreive networks (with iwlist scan right?). So:

Do you see anything in dmesg after using the (ifconfig wlan0 up) command.

Also, please *do* provide the output of the command I gave you earlier  :Smile:  .

----------

## gentoo_giant

Output of sudo NetworkManager --no-daemon:

```

NetworkManager: <info>  starting...                 

 * status:  started                                 

NetworkManager: <info>  Found radio killswitch /org/freedesktop/Hal/devices/pci_168c_1c_rfkill_phy0_wlan                                                                                  

NetworkManager: <info>  (eth0): new Ethernet device (driver: 'r8169')

NetworkManager: <info>  (eth0): exported as /org/freedesktop/Hal/devices/net_00_1e_33_b5_f4_21

NetworkManager: <info>  (wlan0): driver supports SSID scans (scan_capa 0x01).

NetworkManager: <info>  (wlan0): new 802.11 WiFi device (driver: 'ath5k')

NetworkManager: <info>  (wlan0): exported as /org/freedesktop/Hal/devices/net_00_24_d2_6a_0a_50

NetworkManager: <info>  Trying to start the supplicant...

NetworkManager: <info>  Trying to start the system settings daemon...

NetworkManager: <info>  (eth0): carrier now ON (device state 1)

NetworkManager: <info>  Wireless now disabled by radio killswitch

NetworkManager: <info>  (eth0): device state change: 1 -> 2 (reason 2)

NetworkManager: <info>  (eth0): preparing device.

NetworkManager: <info>  (eth0): deactivating device (reason: 2).

-- Error received: Numerical result out of range

-- Original message: type=0x19 length=56 flags=<REQUEST,ACK> sequence-nr=1270919948 pid=4226833

NetworkManager: <WARN>  check_one_route(): (eth0) error -34 returned from rtnl_route_del(): Sucess

NetworkManager: <info>  (wlan0): device state change: 1 -> 2 (reason 2)

NetworkManager: <info>  (wlan0): bringing up device.

NetworkManager: <info>  (wlan0): deactivating device (reason: 2).

NetworkManager: <info>  (eth0): device state change: 2 -> 3 (reason 0)

```

There seems to be no dmesg output for ifconfig wlan0 up (nothing relevant pertaining to wlan0, anyway).

----------

## Rexilion

Do you have a wireless switch turned off? It says:

 *Quote:*   

> NetworkManager: <info>  Wireless now disabled by radio killswitch

 

----------

## gentoo_giant

No, I don't have my wireless switch off.   :Confused: 

BTW, do you want my wireless model?

----------

## Rexilion

Can you do:

```
emerge -q rfkill

rfkill list
```

And post the output of the last command please.

----------

## gentoo_giant

```

0: phy0: Wireless LAN

        Soft blocked: no

        Hard blocked: yes

```

I'm actually thinking now the root problem may be dbus.  I'm coming up with more symptoms that seem to stem from dbus:

 When booting up, I don't like to have my ethernet cable plugged in.  Gentoo tries to find a connect, and when it can't, it seems to error.  The only problem is that I usually need to manually connect Ethernet when I log in (DHCP won't do it for me).  the gnome WirelessManager (nm-applet) does run when I log in, so I unselect "Enable Networking" and select it again.  Then it connects ethernet.

 Sometimes applications won't start up when I click on them or try to run them.  When I restart dbus, this solves the problem.  Of course, NetworkManager is down (nm-applet disappears), and I can't seem to run NetworkManager to get it back up, so I have to run /etc/init.d/net.eth0 start to connect to the Internet again.

 When I log out to get back to KDM, the mouse disappears, and disappears when I log back in, too.  The mouse is still tracked: I see effects of mouse-overs and I can click on fields, but no cursor appears.  Also, when I log back out again, neither the keyboard nor the mouse responds.

So, to me, it seems like a dbus error.

----------

## Rexilion

 *gentoo_giant wrote:*   

> 
> 
> ```
> 
> 0: phy0: Wireless LAN
> ...

 

Thanks for providing the requested info  :Smile:  .

 *gentoo_giant wrote:*   

> I'm actually thinking now the root problem may be dbus.  I'm coming up with more symptoms that seem to stem from dbus:
> 
>  When booting up, I don't like to have my ethernet cable plugged in.  Gentoo tries to find a connect, and when it can't, it seems to error.  The only problem is that I usually need to manually connect Ethernet when I log in (DHCP won't do it for me).  the gnome WirelessManager (nm-applet) does run when I log in, so I unselect "Enable Networking" and select it again.  Then it connects ethernet.

 

That is not dbus/NetworkManager that is trying to connect. That is your /etc/init.d/net.eth0 script (it's from the Gentoo network infrastructure). If you use NetworkManager you should delete all the /etc/init.d/net.* files except /etc/init.d/net.lo (and other network devices you do *not* configure through NetworkManager.

 *gentoo_giant wrote:*   

>  Sometimes applications won't start up when I click on them or try to run them.  When I restart dbus, this solves the problem.  Of course, NetworkManager is down (nm-applet disappears), and I can't seem to run NetworkManager to get it back up, so I have to run /etc/init.d/net.eth0 start to connect to the Internet again.

 

You should try revdep-rebuild and try to rebuild dbus as well. Furthermore, check ~/.xsession-errors and dmesg (the last lines). They might give a clue.

 *gentoo_giant wrote:*   

>  When I log out to get back to KDM, the mouse disappears, and disappears when I log back in, too.  The mouse is still tracked: I see effects of mouse-overs and I can click on fields, but no cursor appears.  Also, when I log back out again, neither the keyboard nor the mouse responds.

 

I had those same problems too with the nv and nouveau (since it's based on nv) as well. You are *probably* facing the same problem.

 *gentoo_giant wrote:*   

> So, to me, it seems like a dbus error.

 

Some, not all   :Wink: 

Well, there seems to be a 'switch' somewhere that deactivates your wireless (Hard blocked: yes). I'm not sure if it permanently deactivates the wireless since it also says it's enabled (Soft blocked: no).

----------

## gentoo_giant

Yes, I do have a switch.  Security win for Toshiba.  :Wink: 

Also, I'm not sure what revdep-rebuild is.  I apologize, but I am new to Gentoo.

----------

## Rexilion

 *gentoo_giant wrote:*   

> Yes, I do have a switch.  Security win for Toshiba. 
> 
> Also, I'm not sure what revdep-rebuild is.  I apologize, but I am new to Gentoo.

 

Ah ok  :Smile:  . Revdep-rebuild rebuild programs if necessary if their dependency's have been updated, just execute as root:

```
revdep-rebuild
```

Furthermore, you do know how to disable the net.eth0 files?

----------

## rainer

You have to

```
emerge gentoolkit
```

 then you can do

```
revdep-rebuild
```

----------

## gentoo_giant

 *Quote:*   

> You have to
> 
> Code:
> 
> emerge gentoolkit
> ...

 

Did that...that didn't seem to fix anything.  On second thought...possibly.  If I plug in the ethernet as the startup scripts are trying to detect it, NetworkManager works pretty well with the ethernet.

 *Quote:*   

> Furthermore, you do know how to disable the net.eth0 files?

 

I assume rm /etc/inti.d/net.{eth0 or wlan0}.

----------

## gentoo_giant

Please help!  Ever since I got rid of net.eth0 and net.wlan0, my applications startup has gotten worse.  I can only start up applications for about a minute or so and then I'm toast.

Here is my .xsessionerrors file.

http://dpaste.com/183810/

----------

## Rexilion

 *Quote:*   

> <unknown program name>(3881)/: Communication problem with  "konsole" , it probably crashed. 
> 
> Error message was:  "org.freedesktop.DBus.Error.ServiceUnknown" : " "The name org.kde.konsole was not provided by any .service files" " 
> 
> X Error: XSyncBadAlarm 170
> ...

 

Do you have dbus running?

Can you post the output of:

```
eselect rc list
```

----------

## gentoo_giant

```

  clock                     boot    

  consolefont               boot    

  consolekit                default 

  crypto-loop                       

  cupsd                             

  dbus                              

  device-mapper                     

  dhcdbd                            

  dhcpd                     boot    

```

No, it doesn't look like dbus is running at boot (this is a snippet of the output).

Also, I'm starting to think dhcpd (or dhcpcd) is the problem for networking.  I'm having  a really hard time getting the config file (/etc/dhcpd.conf) configured.

----------

## Rexilion

Do:

```
eselect rc add NetworkManager consolekit dbus hald default
```

And then reboot. Your settings were incorrect.

As I said before, you do not need any of the /etc/init.d/net.* files (except lo) if you use NetworkManager.

The slow startup is caused by the scripts waiting for a response for something. This is better handled by the NetworkManager daemon.

----------

## gentoo_giant

```
eselect rc add NetworkManager consolekit dbus hald default
```

rc-update didn't recognize NetworkManager and all the others were already added to default.

I keep getting the problem when the applications won't start.  Sometimes I try to get applications up and running before anything else.  Thus, here is the error message if I try to run something (say kate) from the konsole:

```
No protocol specified

kate: cannot connect to X server :0.0
```

I'll try to see if it does it in Gnome, too.  From what I remember, it does...

----------

## gentoo_giant

Yeah, happens for gnome and fluxbox, too once I connect to the internet via nm-applet.  Since nm-applet doesn't detect my wireless card (yet  :Smile:  ), I use wifiradar.  Thus, I don't have the same problem when I connect to the Internet via wireless.  Below is output of my .xsession-errors file.  This is what happens when I try to run konqueror.

```
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)

kdeinit4: preparing to launch /usr/lib/libkdeinit4_kded4.so

kdeinit4: preparing to launch /usr/lib/libkdeinit4_kbuildsycoca4.so

kbuildsycoca4 running...

kdeinit4: preparing to launch /usr/lib/libkdeinit4_kconf_update.so

Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)

kdeinit4: preparing to launch /usr/bin/knotify4

Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)

kdeinit4: preparing to launch /usr/lib/kde4/libexec/kdontchangethehostname

Warning: No session management specified.

No protocol specified

: cannot connect to X server :0.0
```

Also, is there a way to automatically connect Ethernet without nm-applet?  I'm not too keen on ifconfig to connect with dhcp.

----------

## Rexilion

 *gentoo_giant wrote:*   

> Yeah, happens for gnome and fluxbox, too once I connect to the internet via nm-applet.

 

That is beacause NetworkManager changes your hostname. Do this:

/etc/NetworkManager/nm-system-settings.conf:

 *Quote:*   

> [main]
> 
> plugins=keyfile
> 
> # add the lines below and change 'Alpha' to your hostname.
> ...

 

----------

## gentoo_giant

Hostname affects X applications?  Hm, Gentoo seems more complicated than I thought.   :Confused: 

I discovered with nm-applet out of the way, though, (I unmerged it) that I can just plug in my Ethernet cable, and I'm fine from there!

----------

## Rexilion

The relation between hostname <-> X authorization is not gentoo specific.

Good work finding your way  :Smile:  .

----------

## jean-michel

Greetings,

I had wireless working until an emerge -Duv world a couple of months ago, and since then have been unable to get it running (this is on an older Dell Latitude D630).  Although I was able to configure a wireless connection and apply it using Network Managers configuration GUI, Network manager insists the wireless is unavalable.  cnetworkmanager (which used to work) now also exists with errors.

rfkill reveals the following:

```
# rfkill list

0: dell-wifi: Wireless LAN

        Soft blocked: yes

        Hard blocked: yes

1: phy0: Wireless LAN

        Soft blocked: no

        Hard blocked: yes
```

catting the rkill state and type shows:

```

# cat /sys/class/rfkill/*/state

2

2

```

```

# cat /sys/class/rfkill/*/type

wlan

wlan

```

while nm-tool shows:

```

# nm-tool

NetworkManager Tool

State: connected

- Device: wlan0 ----------------------------------------------------------------

  Type:              802.11 WiFi

  Driver:            iwl3945

  State:             unavailable

  Default:           no

  HW Address:        00:1C:BF:32:AC:56

  Capabilities:

  Wireless Properties

    WEP Encryption:  yes

    WPA Encryption:  yes

    WPA2 Encryption: yes

  Wireless Access Points 

- Device: eth0  [Auto eth0] ----------------------------------------------------

  Type:              Wired

  Driver:            tg3

  State:             connected

  Default:           no

  HW Address:        00:1C:23:12:4B:E8

  Capabilities:

    Carrier Detect:  yes

    Speed:           1000 Mb/s

  Wired Properties

    Carrier:         on

  IPv4 Settings:

    Address:         192.168.1.64

    Prefix:          24 (255.255.255.0)

    Gateway:         0.0.0.0

    DNS:             192.168.1.254

```

Any help or pointers would be greatly appreciated.

Many thanks,

Jean

----------

## Rexilion

It's better if you open a new thread, that way your problem will get a lot more exposure.

However, I do think you are probably missing Wireless Extensions or nl80211 in your kernel .config?

----------

