Saturday, 1 November 2014

Getting a network connection in Ubuntu 14.04 (Trusty) on a Dell Inspiron 6400 with Broadcom wired and wireless chipset

Symptom:

The computer had no wired or wireless connection.
When clicking the Network manager icon, the first line read No network devices available.
This was an ancient Dell Inspiron 6400 laptop with Broadcom BCM4311 wireless network adapter and Broadcom BCM4411 wired ethernet adapter. If your computer is not the same, this solution may not work.

 
user@inspiron6400:~$ nm-tool
 

NetworkManager Tool
 

State: disconnected


user@inspiron6400:~$ ifconfig
lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:139 errors:0 dropped:0 overruns:0 frame:0
          TX packets:139 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:10783 (10.7 KB)  TX bytes:10783 (10.7 KB)


user@inspiron6400:~$ lspci -vvnn | grep -A 8 Ethernet
03:00.0 Ethernet controller [0200]: Broadcom Corporation BCM4401-B0 100Base-TX [14e4:170c] (rev 02)
    Subsystem: Dell Inspiron 6400 [1028:01af]
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 64
    Interrupt: pin A routed to IRQ 4
    Region 0: Memory at ef9fe000 (32-bit, non-prefetchable) [size=8K]
    Capabilities: <access denied>

user@inspiron6400:~$ lspci -vvnn | grep -A 9 Network
0b:00.0 Network controller [0280]: Broadcom Corporation BCM4311 802.11b/g WLAN [14e4:4311] (rev 01)
    Subsystem: Dell Wireless 1390 WLAN Mini-Card [1028:0007]
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0, Cache Line Size: 64 bytes
    Interrupt: pin A routed to IRQ 16
    Region 0: Memory at efdfc000 (32-bit, non-prefetchable) [size=16K]
    Capabilities: <access denied>
    Kernel driver in use: wl

Note the part marked in red. The solution will only work if you see the same kernel driver in use. If you can't see any kernel driver at all, see solution further down.

Solution:

The solution was to blacklist the "wl" driver:
sudo sh -c 'echo "blacklist wl" >> /etc/modprobe.d/blacklist-broadcom-wireless.conf'
update-initramfs -u  # Probably not needed, but some guides suggest it

Before this (or after, it doesn't matter), you need to install the Broadcom B43 driver following the instructions here: https://help.ubuntu.com/community/WifiDocs/Driver/bcm43xx#b43_-_No_Internet_access

Then execute the following commands, telling the system to stop using all the related wireless drivers and then telling it to load one specific one (b43):
sudo modprobe -r b43 bcma
sudo modprobe -r brcmsmac bcma
sudo modprobe -r wl
sudo modprobe b43
If you get an error message after sudo modprobe -r wl saying the module is in use, then a restart would likely fix that issue given that you blacklisted the module already.

If that does not work

If this has no effect, it may be that due to various attempts to fix the problem, the bcmwl driver was installed. This automatically blacklists all the other drivers, including the B43 driver we wish to use. You can check if this is the case by looking for the blacklist file it generates:
cat /etc/modprobe.d/blacklist-bcm43.conf

If the file exists, you'll probably have a system that looks like this:
user@inspiron6400:~$ lspci -vvnn | grep -A 8 Ethernet
03:00.0 Ethernet controller [0200]: Broadcom Corporation BCM4401-B0 100Base-TX [14e4:170c] (rev 02)
    Subsystem: Dell Inspiron 6400 [1028:01af]
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 64
    Interrupt: pin A routed to IRQ 4
    Region 0: Memory at ef9fe000 (32-bit, non-prefetchable) [size=8K]
    Capabilities: <access denied>

user@inspiron6400:~$ lspci -vvnn | grep -A 8 Network
0b:00.0 Network controller [0280]: Broadcom Corporation BCM4311 802.11b/g WLAN [14e4:4311] (rev 01)
    Subsystem: Dell Wireless 1390 WLAN Mini-Card [1028:0007]
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0, Cache Line Size: 64 bytes
    Interrupt: pin A routed to IRQ 4
    Region 0: Memory at efdfc000 (32-bit, non-prefetchable) [size=16K]
    Capabilities: <access denied>

Note that none of the network adapters have a Kernel driver in use line. This is because the bcmwl driver blacklists the b43 and b44 drivers that we need, and we have blacklisted the wl driver...

Solution:

sudo apt-get purge bcmwl-kernel-source
sudo modprobe b44  # should enable wired network after a few seconds
sudo modprobe b43  # should enable wireless network after a few seconds

When working fine, it looks like this:

user@inspiron6400:~$ nm-tool

NetworkManager Tool

State: connected (global)

- Device: eth4  [Wired connection 1] -------------------------------------------
  Type:              Wired
  Driver:            b44 

  State:             connected
  Default:           yes
  HW Address:        zz:zz:zz:zz:zz:zz

  Capabilities:
    Carrier Detect:  yes
    Speed:           100 Mb/s

  Wired Properties
    Carrier:         on

  IPv4 Settings:
    Address:         192.168.2.57
    Prefix:          24 (255.255.255.0)
    Gateway:         192.168.2.1

    DNS:             8.8.8.8
    DNS:             8.8.4.4
 

- Device: wlan4  [Office] --------------------------------------------------------
  Type:              802.11 WiFi
  Driver:            b43 

  State:             connected
  Default:           yes
  HW Address:        xx:xx:xx:xx:xx:xx

  Capabilities:
    Speed:           54 Mb/s

  Wireless Properties
    WEP Encryption:  yes
    WPA Encryption:  yes
    WPA2 Encryption: yes

  Wireless Access Points (* = current AP)
    *Office:         Infra, xx:xx:xx:xx:xx:xx, Freq 2462 MHz, Rate 54 Mb/s, Strength 100 WPA2
    Home:            Infra, yy:yy:yy:yy:yy:yy, Freq 2462 MHz, Rate 54 Mb/s, Strength 83 WPA2

  IPv4 Settings:
    Address:         192.168.2.60
    Prefix:          24 (255.255.255.0)
    Gateway:         192.168.2.1

    DNS:             8.8.8.8
    DNS:             8.8.4.4


user@inspiron6400:~$ ifconfig
eth4      Link encap:Ethernet  HWaddr zz:zz:zz:zz:zz:zz 
          inet addr:192.168.2.57  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::219:b9ff:fe57:fc38/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:590 errors:0 dropped:0 overruns:0 frame:0
          TX packets:574 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:64979 (64.9 KB)  TX bytes:259728 (259.7 KB)
          Interrupt:17

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1143 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1143 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:108951 (108.9 KB)  TX bytes:108951 (108.9 KB)

wlan4     Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx 
          inet addr:192.168.2.60  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::219:7dff:fe6f:b26e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9583 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7323 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6760753 (6.7 MB)  TX bytes:1998214 (1.9 MB)


user@inspiron6400:~$ lspci -vvnn | grep -A 9 Ethernet
03:00.0 Ethernet controller [0200]: Broadcom Corporation BCM4401-B0 100Base-TX [14e4:170c] (rev 02)
    Subsystem: Dell Inspiron 6400 [1028:01af]
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 64
    Interrupt: pin A routed to IRQ 17
    Region 0: Memory at ef9fe000 (32-bit, non-prefetchable) [size=8K]
    Capabilities: <access denied>
    Kernel driver in use: b44

user@inspiron6400:~$ lspci -vvnn | grep -A 9 Network
0b:00.0 Network controller [0280]: Broadcom Corporation BCM4311 802.11b/g WLAN [14e4:4311] (rev 01)
    Subsystem: Dell Wireless 1390 WLAN Mini-Card [1028:0007]
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0, Cache Line Size: 64 bytes
    Interrupt: pin A routed to IRQ 16
    Region 0: Memory at efdfc000 (32-bit, non-prefetchable) [size=16K]
    Capabilities: <access denied>
    Kernel driver in use: b43-pci-bridge

4 comments:

  1. you've probably long forgotten about this post, or maybe didn't think it would help anyone... well, it just helped me! i've been struggling for hours to get an ethernet connection working on an old Dell, and this put me on the right track. many thanks!

    ReplyDelete
  2. That's great! You're right, I had forgotten about that post, but I wrote it exactly for this purpose, that someone (including myself), at some time could find it useful. Thanks for sharing that with me!

    ReplyDelete
  3. thank you, thank you, thank you! This post saved my 12 year old Dell Inspiron E1505 from a trip to Good Will. The computer was always reliable until an upgrade to 16.04 cut it all from the internet. Your post saved it because I was getting ready to give up on it. Thanks again.

    ReplyDelete
    Replies
    1. @Sukora, thanks for the comment. It's great to hear that one of my random posts helped somebody!

      Delete