# Network manager doesn't start wlan0 device

## myha

Hi,

I am having problems with NetworkManager... It won't start my wlan device on boot...

This is my device:

```
Network controller: Broadcom Corporation BCM4312 802.11a/b/g
```

I use ndiswrapper and win drivers and wpa_supplicant for encryption...

any ideas?

----------

## RazielFMX

Please post the output of iwconfig.  Also, you need to disable wpa_supplicant and your /etc/init.d/net.eth* and /etc/init.d/net.wlan* scripts.  It's all in the wiki:

http://gentoo-wiki.com/NetworkManager

The reason I ask about iwconfig is to see if you interface is even being recognized properly.

----------

## myha

Hi,

thanks for your time...

Firstly, ifconfig and iwconfig only show the eth0 device, wlan0 is missing and I believe this is the problem...

I have removed eth and wlan from default runlevel so they are not started.

brm

----------

## RazielFMX

I dont have my laptop on me, so I'll give you more info when I get home.  You need to set something in a conf file so the init process doesnt try to hotplug your eth0 device (also fixable by removing the /etc/init.d/net.eth0 symlink, but I use that when network manager borks or X is down, so I do the conf way).

If someone knows the exact file and setting, feel free to post.  if not I'll post tonight.

As for your wlan not showing up...

Please show the ouput of lspci (if you dont have it, emerge pciutils).  Also, please show ndiswrapper -l.  Finally, please show lsmod | grep ndis.

Thanks!

----------

## myha

hi,

here are the requested outputs:

```
gentoo ~ # lspci

00:00.0 Host bridge: ATI Technologies Inc RS480 Host Bridge (rev 10)

00:01.0 PCI bridge: ATI Technologies Inc RS480 PCI Bridge

00:04.0 PCI bridge: ATI Technologies Inc RS480 PCI Bridge

00:05.0 PCI bridge: ATI Technologies Inc RS480 PCI Bridge

00:06.0 PCI bridge: ATI Technologies Inc RS480 PCI Bridge

00:12.0 IDE interface: ATI Technologies Inc 4379 Serial ATA Controller (rev 80)

00:13.0 USB Controller: ATI Technologies Inc IXP SB400 USB Host Controller (rev 80)

00:13.1 USB Controller: ATI Technologies Inc IXP SB400 USB Host Controller (rev 80)

00:13.2 USB Controller: ATI Technologies Inc IXP SB400 USB2 Host Controller (rev 80)

00:14.0 SMBus: ATI Technologies Inc IXP SB400 SMBus Controller (rev 81)

00:14.1 IDE interface: ATI Technologies Inc Standard Dual Channel PCI IDE Controller (rev 80)

00:14.2 Audio device: ATI Technologies Inc SB450 HDA Audio (rev 01)

00:14.3 ISA bridge: ATI Technologies Inc IXP SB400 PCI-ISA Bridge (rev 80)

00:14.4 PCI bridge: ATI Technologies Inc IXP SB400 PCI-PCI Bridge (rev 80)

00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration

00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map

00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller

00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control

01:05.0 VGA compatible controller: ATI Technologies Inc RS485 [Radeon Xpress 1100 IGP]

02:01.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5788 Gigabit Ethernet (rev 03)

02:04.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller

02:04.1 FireWire (IEEE 1394): Texas Instruments PCIxx12 OHCI Compliant IEEE 1394 Host Controller

30:00.0 Network controller: Broadcom Corporation BCM4312 802.11a/b/g (rev 01)

gentoo ~ # ndiswrapper -l

bcmwl5 : driver installed

        device (14E4:4312) present

gentoo ~ # lsmod | grep ndis

ndiswrapper           187072  0 

gentoo ~ # 
```

thanks,

brm

----------

## Bigun

Umm... broadcom drivers are available without using ndiswrapper.

Aside from that, can you post the output of these commands

```

dmesg | grep "ndis"

```

```

ndiswrapper -l

```

----------

## RazielFMX

 *Bigun wrote:*   

> Umm... broadcom drivers are available without using ndiswrapper.
> 
> Aside from that, can you post the output of these commands
> 
> ```
> ...

 

Yeah, but the default kernel drivers only give you 11MB.

As far as I can tell, everything looks ok.  I vaguely remember an issue I had with NetworkManager.  Can you show the output of the following?

```
emerge -p dhcp
```

I had to mask dhcp at one point to correct an issue with NetworkManager (though I can't remember what the issue was):

```

#(from /etc/portage/package.mask)

## Block newer dhcp until Network Manager no longer needs dhcpdb

>=net-misc/dhcp-3.1

```

And the change you need to make that I mentioned above so that you can leave your /etc/init.d/net.* symlinks are the following two entries in /etc/conf.d/rc:

```

alexiea ~ # grep -i net /etc/conf.d/rc | grep -v ^\#

RC_PLUG_SERVICES="!net.*"

RC_NET_STRICT_CHECKING="no"

alexiea ~ #

```

Just change those two settings as above and you will be NetworkManager compliant  :Smile: 

Back to your issue, as Bigun stated, a "dmesg | grep ndis" would be huge.  Thanks!

EDIT:

Please also post the following output:

```

grep CONFIG_IEEE80211 /usr/src/linux/.config

```

Example:

```

alexiea ~ # grep CONFIG_IEEE80211 /usr/src/linux/.config

CONFIG_IEEE80211=y

# CONFIG_IEEE80211_DEBUG is not set

CONFIG_IEEE80211_CRYPT_WEP=y

CONFIG_IEEE80211_CRYPT_CCMP=y

CONFIG_IEEE80211_CRYPT_TKIP=y

CONFIG_IEEE80211_SOFTMAC=y

# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set

```

You need to have support for wireless networking in your kernel even if you use ndiswraper (ndiswrapper means you dont need a kernel based driver).

----------

## myha

Hi,

sorry it was nighttime here...   :Smile: 

Here are the outputs:

```
gentoo mihap # grep CONFIG_IEEE80211 /usr/src/linux/.config 

CONFIG_IEEE80211=y

# CONFIG_IEEE80211_DEBUG is not set

CONFIG_IEEE80211_CRYPT_WEP=y

CONFIG_IEEE80211_CRYPT_CCMP=y

CONFIG_IEEE80211_CRYPT_TKIP=y

# CONFIG_IEEE80211_SOFTMAC is not set
```

```
gentoo mihap # dmesg | grep ndis

ndiswrapper version 1.52 loaded (smp=yes, preempt=no)

ndiswrapper (link_pe_images:576): fixing KI_USER_SHARED_DATA address in the driver

ndiswrapper: driver bcmwl5 (Broadcom,07/11/2007, 4.150.29.0) loaded

ndiswrapper: using IRQ 18

gentoo mihap # 
```

```
gentoo mihap # emerge -pv dhcp

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild   R   ] net-misc/dhcp-3.1.0  USE="-doc -minimal (-selinux) -static" 0 kB 

Total: 1 package (1 reinstall), Size of downloads: 0 kB

gentoo mihap # 
```

As far as config for hotplug goes I already disabled autostart for eth0 which was starting automatically:

```
gentoo mihap # grep -i net /etc/conf.d/rc | grep -v ^\# 

RC_PLUG_SERVICES="!net.eth0"

RC_NET_STRICT_CHECKING="no"
```

I will try to set above to !net.* if anything will change, but I only saw loopback and eth0 autostarting when it was not set.

And I still have net.* symlinks for console use.

Thanks,

brm

----------

## myha

Hi,

sorry, the above output was when I manually started wlan device via init script, here are the ones from boottime:

```
gentoo ~ # ndiswrapper -l

bcmwl5 : driver installed

        device (14E4:4312) present
```

```
gentoo ~ # dmesg | grep ndis

gentoo ~ #
```

```
gentoo ~ # ifconfig

eth0      Link encap:Ethernet  HWaddr 00:17:A4:DB:5A:29

          UP BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

          Interrupt:23

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
```

When I installed networkmanager it was working on first launch, I was able to connect to wireless networks....

And also I have the openvpn module installed for nm.... 

```
net-misc/networkmanager-openvpn

      Latest version available: 0.3.2_p20070621

      Latest version installed: 0.3.2_p20070621

      Size of files: 456 kB

      Homepage:      http://www.gnome.org/projects/NetworkManager/

      Description:   NetworkManager OpenVPN plugin.

      License:       GPL-2

net-misc/networkmanager

      Latest version available: 0.6.5_p20070823

      Latest version installed: 0.6.5_p20070823

      Size of files: 939 kB

      Homepage:      http://www.gnome.org/projects/NetworkManager/

      Description:   Network configuration and management in an easy way. Desktop environment independent.

      License:       GPL-2
```

brm

----------

## RazielFMX

I am convinced NetworkManager is not the issue.  It should at least be working for wired connections as far as I can tell.

I have a couple of silly questions, because I'm currently low on ideas:

1)  What changed since the last time wireless worked and when it stopped working?  Where there any kernel updates?  If so, did you rebuild ndiswrapper?

2)  What version of the windows driver are you using?  Where did you get the driver?

3)  What version of ndiswrapper are you using?  I had some problems with it and had to unmask it awhile back.  Also, 1.51 and 1.52 were recently added, and if you are unmasking it, it could be those versions don't work for you.  1.5 has been stable since Decemeber, so depending on your frequency of "uDN world", it could be that version as well.

```

*  net-wireless/ndiswrapper

      Latest version available: 1.52

      Latest version installed: 1.52

      Size of files: 193 kB

      Homepage:      http://ndiswrapper.sourceforge.net/

      Description:   Wrapper for using Windows drivers for some wireless cards

      License:       GPL-2

```

EDIT:  Try this for me too please:

```
grep ndis /var/log/messages
```

----------

## myha

hi,

first the output from today's logs:

```
Feb 27 08:01:20 gentoo ndiswrapper version 1.52 loaded (smp=yes, preempt=no)

Feb 27 08:01:20 gentoo ndiswrapper (link_pe_images:576): fixing KI_USER_SHARED_DATA address in the driver

Feb 27 08:01:20 gentoo ndiswrapper: driver bcmwl5 (Broadcom,07/11/2007, 4.150.29.0) loaded

Feb 27 08:01:20 gentoo ndiswrapper: using IRQ 18

Feb 27 08:05:11 gentoo NetworkManager: <info>  wlan0: Device is fully-supported using driver 'ndiswrapper'.

Feb 27 08:22:31 gentoo ndiswrapper version 1.52 loaded (smp=yes, preempt=no)

Feb 27 08:22:31 gentoo ndiswrapper (link_pe_images:576): fixing KI_USER_SHARED_DATA address in the driver

Feb 27 08:22:31 gentoo ndiswrapper: driver bcmwl5 (Broadcom,07/11/2007, 4.150.29.0) loaded

Feb 27 08:22:31 gentoo ndiswrapper: using IRQ 18

Feb 27 19:48:12 gentoo ndiswrapper version 1.52 loaded (smp=yes, preempt=no)

Feb 27 19:48:13 gentoo ndiswrapper (link_pe_images:576): fixing KI_USER_SHARED_DATA address in the driver

Feb 27 19:48:13 gentoo ndiswrapper: driver bcmwl5 (Broadcom,07/11/2007, 4.150.29.0) loaded

Feb 27 19:48:13 gentoo ndiswrapper: using IRQ 18

```

ndiswrapper: driver was downloaded directly from HP's support site for my laptop, extracted on winxp and then copied to my machine. Wlan otherwise works fine, have absolutely no problems with it besides networkmanager issue. 

```

gentoo mihap # ndiswrapper -v

utils version: '1.9', utils version needed by module: '1.9'

module details:

filename:       /lib/modules/2.6.23-gentoo-r8/misc/ndiswrapper.ko

version:        1.52

vermagic:       2.6.23-gentoo-r8 SMP mod_unload 

gentoo mihap # 
```

nm worked only the first time I started it I guess (I installed gentoo few days ago), no kernel updates were done from that time.

This is strange:

```
gentoo mihap # emerge -Ca ndiswrapper

>>> These are the packages that would be unmerged:

 net-wireless/ndiswrapper

    selected: 1.52 

   protected: none 

     omitted: none 

gentoo mihap # emerge -pv ndiswrapper

These are the packages that would be merged, in order:

Calculating dependencies \

!!! All ebuilds that could satisfy "net-wireless/ndiswrapper" have been masked.

!!! One of the following masked packages is required to complete your request:

- net-wireless/ndiswrapper-1.52 (masked by: ~amd64 keyword)

- net-wireless/ndiswrapper-1.51 (masked by: ~amd64 keyword)

- net-wireless/ndiswrapper-1.50 (masked by: ~amd64 keyword)

- net-wireless/ndiswrapper-1.49 (masked by: ~amd64 keyword)

- net-wireless/ndiswrapper-1.48 (masked by: ~amd64 keyword)

- net-wireless/ndiswrapper-1.47 (masked by: ~amd64 keyword)

For more information, see MASKED PACKAGES section in the emerge man page or 

refer to the Gentoo Handbook.

gentoo mihap # grep -i ndis /etc/portage/package.*

```

How could it be installed if I haven't unmask it...? ž

Will try to reinstall the latest package...

----------

## coolsnowmen

 *myha wrote:*   

> 
> 
> ```
> gentoo ~ # ifconfig
> 
> ...

 

you should post 

```
ifconfig -a
```

 and 

```
iwconfig
```

ifconfig will not list all network devices present if they are not in a certain on state.

----------

## myha

Hi,

iwconfig also shows only the eth0 and loo devices with "no wireless extensions"...

I reemerged networkmanager and ndiswrapper and stilll the same...

Here is an update - I can start it like this:

 start the wlan via init script

 stop the wlan via init script   //now I see it on iwconfig and ifconfig

 then I have to restart the NetworkManager and start nm-applet --sm-disable manually as root (doesn't work via autoload as user, crashes withput reason)

 and then I can connect to my network (have to input everything manually each time (key, network name) -I think it cannot save it to keyring because I run it as user)

I guess the only problem is to make networkmanager start the wlan and it should work then (and the user-starting issue)...

----------

## myha

Hi,

got it working... I am not quite sure what happened, but it looks like there was some problem loading ndiswrapper module... I noticed that I didn't have ndiswrapper in /etc/modules.autoload.d/kernel-2.6 -> after I added it it started working fine...

What I don't understand is how it could work via init script...?

----------

