# How to stop bcm43xx from loading at boot?

## Akaihiryuu

I have both bcm43xx and ndiswrapper on this computer.  Ndiswrapper is set to load automatically in modules.autoload.d.  bcm43xx isn't set to autoload anywhere, but udev insists on loading the module at startup.  I need to find a way to stop it from doing this...bcm43xx doesn't work well enough to use for general connections yet.  I want to keep it on my system for testing, however, but if udev insists on loading the module, it keeps ndiswrapper from loading properly (and connecting automatically).  Does anyone know how to stop udev from loading it automatically?

----------

## noice

have you tried to comment 

```
# PCI device 0x14e4:0x4320 (bcm43xx)

SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="xx:xx:xx:xx:xx:xx", NAME="eth1"
```

in /etc/udev/rules.d/70-persistent-net.rules ?

----------

## Akaihiryuu

Weird...that first line is there, but it says ndiswrapper, it doesn't mention bcm43xx, and yet something is still autoloading the module...

----------

## vaxbrat

I have an HP laptop with a builtin broadcom (eth1) and a d-link cardbus card which gets picked up by madwifi-ng (ath0).  I use the d-link for my normal networking and leave the broadcom turned off by playing games with /etc/init.d.  I only do a net.ath0 and not a net.eth1 softlink to net.lo there.

The broadcom won't get turned on until I specifically ask for it in say kismet or some other sniffer.  Then I can play games while leaving my existing ath0 connection untouched. 

I also have a wired adapter on eth0 (Realtek I think) which is not normally connected.  I just throw that to a whole different subnet than what I use to avoid any routing confusion.  I use static addresses for ath0 and eth0.

----------

## bjlockie

You could recompile the kernel without module autoloading but that is liable to break something.  :Sad: 

You could 

```
grep -R bcm43 /
```

----------

## jamapii

Akaihiryuu, I had this exact same problem months ago. I think I ended up just removing it:

find /lib/modules/$(uname -r) -name "bcm43xx*"

rm $(find /lib/modules/$(uname -r) -name "bcm43xx*")

The second line could be run from crontab or /etc/conf.d/local.stop ... but remember to comment it out when you want to test bcm43xx again  :Wink: 

----------

## Naib

either remove it from teh kernel (ie recompile... DONT just delete the module) or blacklist that module

----------

## Akaihiryuu

I ended up just removing the module again.  I'll try it again in a year or so...I've been trying it once a year to see if it's improved.  It still doesn't really work...and I'm using a Broadcom 4306!  It's not like I'm using one of the newer less-supported ones like 4311.  I can associate with access points now...but my link quality is so bad that I'm lucky to get 1mbps, and it's never stable enough for dhcpcd to pull an address.  Though granted, I am using 2.6.19.7, I'm sure there may be newer kernels in ~x86 that may have a newer version of the driver.  I just hope they don't go to 4k kernel stack (thus breaking ndiswrapper) until the native driver actually works.

----------

## ferdog

My suggestion is to edit /etc/conf.d/rc and set RC_PLUG_SERVICES="!net.ethN" (N = whatever your wireless card is) and add ndiswrapper to /etc/modules.autoload.d/kernel-2.6. That way ndiswrapper is loaded while bcm43xx is ignored on boot since you are telling it to not coldplug a module for your wireless card.

Edit: Disregard this post. This will only affect the service and not the module loading as I thought. D'oh!

----------

## smlgbl

JFYI and a bit off-topic maybe, but I am using kernel

```
2.6.21-rc5-mm4
```

and have a

```
30:00.0 Network controller: Broadcom Corporation BCM4310 UART (rev 01)
```

which, afaik, is actually a 4311, but I have to say, it works perfectly for me. I am even using WPA encryption with wpa_supplicant. The card is built into my brandnew HP nx6325! Sorry, but I am very happy about this laptop, which I was waiting for for a long time. Actually I started using this kernel because of the ACPI issues with this laptop, but the broadcom wifi nic is also very nice with the bcm43xx module and the latest version 4 firmware.

Therefore, thanks to the kernel devs. And I love Gentoo. I actually put Ubuntu on it first, in an effort to save some time (haha) but there the wifi connection was indeed not stable. But now it works perfectly.

----------

## PaulBredbury

Blacklist it.

```
echo "blacklist bcm43xx" >> /etc/modprobe.d/blacklist

update-modules

```

 *Quote:*   

> # This file lists modules which will not be loaded by udev,
> 
> # not at coldplugging and not on hotplug events.

 

----------

## Naib

 *PaulBredbury wrote:*   

> Blacklist it.
> 
> ```
> echo "blacklist bcm43xx" >> /etc/modprobe.d/blacklist
> 
> ...

 

thankyou! thats what I have been trying to say, you should never just delete a kernel module

----------

## Akaihiryuu

Wow thanks, I didn't know about the blacklist file.  That's just what I needed.

----------

## JoseJX

If you are using bcm43xx, I'd really recommend using the latest kernel possible, combined with Larry's patches (Larry provides patches for 2.6.20 and 2.6.21):

ftp://lwfinger.dynalias.org/patches

You might also see better performance by setting the rate to 11M or even 1M on cards with poor TX power levels (4318).

----------

## dch24

This post describes the difference between 'blacklist' and what you are trying to do:

 *Joey Hess wrote:*   

> Package: module-init-tools
> 
> Version: 3.3-pre11-1
> 
> Severity: normal
> ...

 

In other words, this will disable it at the modprobe level. (Then when you want to use it, just add a # to comment out the line, and run update-modules and modprobe it in. Not exactly what you wanted, but ...)

There's a good discussion in the bug #130766 thread about using /etc/conf.d/rc to disable services (so the modules are still loaded but the service doesn't get started) and about the security hole opened by autoloading evbug. The bug is closed because "Comment  #46 From Matthias Schwarzott  2007-02-13 00:16:10 0000  [reply] udev-104-r11 (and -r10) implement the wrapper-based blacklisting, by using the blacklist-lines from modprobe.conf" but I have not seen documentation or an example of how this works.

----------

