You are not logged in.

#1 2016-09-20 04:39:57

lowquark
Member
Registered: 2016-09-20
Posts: 4

BCM4331 Trouble

Hi all,

I'm experiencing odd (read: unbearable) wifi conditions with a recent arch install. I can connect to my router with WPA encryption just fine, but after around a minute the connection drops and is extremely flaky.  When I reconnect, I have another minute until it drops again. This repeats endlessly.

The fact that it's come this far (and worked to some extent) means my network setup isn't to blame, though I'm not writing off some service interfering with netctl, or conflicting with the wireless interface's settings.  However, I had Windows 8.1 before this, which worked flawlessly.

Flailing my arms, I've built and successfully installed b43-firmware, b43-firmware-classic, broadcom-wl, broadcom-wl-dkms, and even broadcom-wl-lts, linux-lts and all. All of these exhibit the exact same symptoms, although I seemed to have more uptime with anything utilizing broadcom's 5.100.x.x firmware. This might just be coincidence.

After 3 days of swinging at this problem, I found this ubuntu bug from 2013, when broadcom's 6.30.x.x firmware was released. Users with my chip (BCM4331) who upgraded experienced the same symptoms as I do now, so they downgraded to 6.20.x.x and everything worked fine again. They mention broadcom outright not listing it as a supported chip, whis is also verifiable on their website. This blog confirms that the BCM4331 was not supported under 5.100.x.x.

Long story short:
5.100.x.x: Unsupported
6.20.x.x: Supported
6.30.x.x: Unsupported

From what I've heard about Broadcom, I would not be surprised if the regression from 6.20.x.x to 6.30.x.x was an oversight on their part, and could well be the root of the problem here.

So, I set off to get hold of an old version of this driver. Nothing I found used 6.20.x.x on any available version, so I'm looking into building the driver myself.


b43
My assumption with b43 is that there is very little compilation involved, but the focus is more on extracting broadcom's firmware so that the kernel may work with it. This would allow me to simply find the right firmware, extract it, and install. I might be wrong here.

Most PKGBUILDs source files from http://www.lwfinger.com/b43-firmware/, but 6.20.x.x is not listed there, forcing me to find one file myself. This has proven to be no easy task. If anyone happened to have an old version of broadcom-wl-6.20.*.*.tar.bz2, knew where to find it, or knew who to get in touch with for this file, that would be beyond fantastic.

In fact, the single file that the archives in http://www.lwfinger.com/b43-firmware/ contain are named wl_apsta.o. If only I could find the version wl_apsta.o for bcm 6.20.x.x, perhaps I could drop it in and install happily from there.

Most recently, I've tried installing a broadcom 6.20.x.x driver on a regular windows machine to get a BCMWL664.SYS file, and using b43-fwcutter to extract firmware from that. As it turns out, b43-fwcutter advertises being used on a .SYS file but in fact only accepts a small list of files (most are named wl_apsta.o, none end in .SYS) with specific md5 sums! It requires an exact file! How absolutely misleading.  Additionally, b43-firmware does not list or appear to support the object files supplied in wl packages below.

wl
My assumption here is that the wl driver actually compiles against code supplied by broadcom, and as a result, is much more version specific. Correct me if I'm wrong.

I found this list of ubuntu packages, which contains a 6.20.x.x version. I'm not very eager to convert a debian package to an arch package, though I'm sure it's been done before. Any help here would be vastly appreciated.


tl;dr: Tried most existing wireless drivers, but no amount of blacklisting or modprobe options worked. Dug into the problem further, and found a likely regressive firmware update. Attempted to compile two options, but encountering hiccups in a) attaining files and b) compiling said files.

I'm hoping I've overlooked something simple.

Basic system info: Macbook mid 2011 or 2012, BCM4331 wireless card, two-week old 64 bit install of arch.

I'm using systemd, netctl, wpa_supplicant, and of course wl/b43.

Last edited by lowquark (2016-09-20 04:55:39)

Offline

#2 2016-09-20 14:00:47

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: BCM4331 Trouble

As a sanity check, what are the output of find /etc/systemd  ?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2016-09-21 01:46:47

lowquark
Member
Registered: 2016-09-20
Posts: 4

Re: BCM4331 Trouble

Sanity checks are always good.

frank% find /etc/systemd 
/etc/systemd
/etc/systemd/timesyncd.conf
/etc/systemd/user.conf
/etc/systemd/journal-remote.conf
/etc/systemd/resolved.conf
/etc/systemd/user
/etc/systemd/user/default.target.wants
/etc/systemd/user/default.target.wants/xdg-user-dirs-update.service
/etc/systemd/user/sockets.target.wants
/etc/systemd/user/sockets.target.wants/pulseaudio.socket
/etc/systemd/system.conf
/etc/systemd/logind.conf
/etc/systemd/network
/etc/systemd/network/wired.network
/etc/systemd/journal-upload.conf
/etc/systemd/coredump.conf
/etc/systemd/system
/etc/systemd/system/multi-user.target.wants
/etc/systemd/system/multi-user.target.wants/remote-fs.target
/etc/systemd/system/multi-user.target.wants/netctl@ethernet\x2ddhcp.service
/etc/systemd/system/multi-user.target.wants/systemd-resolved.service
/etc/systemd/system/getty.target.wants
/etc/systemd/system/getty.target.wants/getty@tty1.service
/etc/systemd/system/netctl@ethernet\x2ddhcp.service
/etc/systemd/system/display-manager.service
/etc/systemd/journald.conf

Offline

#4 2016-09-21 02:49:19

jewetux
Member
From: Germany
Registered: 2016-09-01
Posts: 14

Re: BCM4331 Trouble

lowquark wrote:

wl
My assumption here is that the wl driver actually compiles against code supplied by broadcom, and as a result, is much more version specific. Correct me if I'm wrong.

I found this list of ubuntu packages, which contains a 6.20.x.x version. I'm not very eager to convert a debian package to an arch package, though I'm sure it's been done before. Any help here would be vastly appreciated.

The DEB-Packages just as the AUR-package contains patches to customize the original broadcom driver-firmware regarding distribution- and kernel-specific adaptations.

You can try to edit the AUR-patches so they are compatible with the v6.20 driver. (edit/adapt filenames linenumbers, etc. that differs between v6.30 and v6.20 build-files)
But you should also check the DEB-patches. Maybe there are v6.20 specific adaptions which became obsolete with v6.30. Than you have to "backporting" these patches.

Another idea is to downgrade to linux-lts318 and build the v6.20 driver only with the DEB-patches.

Hope this helps.


XPS 13 9350 | i5-6200U | 8GB | 256G NVME | Intel 8260NGW | FHD

Offline

#5 2016-09-21 03:58:09

lowquark
Member
Registered: 2016-09-20
Posts: 4

Re: BCM4331 Trouble

jewetux wrote:
lowquark wrote:

wl
My assumption here is that the wl driver actually compiles against code supplied by broadcom, and as a result, is much more version specific. Correct me if I'm wrong.

I found this list of ubuntu packages, which contains a 6.20.x.x version. I'm not very eager to convert a debian package to an arch package, though I'm sure it's been done before. Any help here would be vastly appreciated.

The DEB-Packages just as the AUR-package contains patches to customize the original broadcom driver-firmware regarding distribution- and kernel-specific adaptations.

You can try to edit the AUR-patches so they are compatible with the v6.20 driver. (edit/adapt filenames linenumbers, etc. that differs between v6.30 and v6.20 build-files)
But you should also check the DEB-patches. Maybe there are v6.20 specific adaptions which became obsolete with v6.30. Than you have to "backporting" these patches.

Another idea is to downgrade to linux-lts318 and build the v6.20 driver only with the DEB-patches.

Hope this helps.

Aha, of course! They must contain the same source somehow, but box it up slightly differently. I'll have a look into that.

If I run into hurdles with headers/versioning, that will definitely be the reason why I prefer b43. It's all just abstracted on top of hijacked firmware, or so I assume. I'm starting to doubt that now though, versioning may be even trickier in that case.

Offline

#6 2016-10-17 23:50:55

aureooms
Member
Registered: 2016-05-26
Posts: 7

Re: BCM4331 Trouble

Same issue here (MacBook Pro + BCM4331). Any progress?

Offline

#7 2016-10-22 15:21:57

lowquark
Member
Registered: 2016-09-20
Posts: 4

Re: BCM4331 Trouble

Unfortunately, very little.

I attempted to compile the Ubuntu driver only to find missing kernel headers, thanks to the kernel version mismatch there. So, I went to the linux-wireless mailing list and Larry Finger himself mentioned he could add my sys file to b43-fwcutter. I'm not sure exactly how that works. They also mentioned 6.20.x.x was an Ubuntu specific Linux release, hence no aur package.

I have found that having something streaming in the background improves wireless connectivity, possibly because the module can't sleep the hardware. (I remember reading somewhere that that's the underlying issue here, but I don't have anything to back that up.)

I'll probably be looking into it again soon; thanks for reminding me. I'll keep you posted. Things have been busy at work, so I've mostly just been using Ethernet.

Offline

#8 2016-11-03 10:13:20

aureooms
Member
Registered: 2016-05-26
Posts: 7

Re: BCM4331 Trouble

If that can help, it seems to happen more often (read exclusively) in the evenings at home or in crowded areas. For example, working at home in the morning is totally fine. However, participating to an event with ~20 other people with laptops with working wifi is impossible. It is easy to spot when it happens: i3status shows 100% signal strength when the wifi connection drops.

Offline

#9 2016-12-04 20:18:29

rbaj
Member
Registered: 2016-01-27
Posts: 36

Re: BCM4331 Trouble

I've been having the same problem with an MBP+BCM4331 for a long time. I'd be very interested if you find a solution! wl seems more stable than b43 for me, but both drop out regularly. I can watch it happen with wavemon: there's no warning, but every time the signal strength follows some sort of sigmoid curve before flatlining. Don't know if that helps at all. At work this only occurs once a day, but at home it happens every five to ten minutes (probably something about my router).

Offline

#10 2016-12-13 06:45:48

bryan.paradis
Member
Registered: 2016-10-22
Posts: 43

Re: BCM4331 Trouble

I had been battling with Wifi on my MacBook Pro 9.1 (mid 2012 13.3 non retina) for what seemed to be months before I was able to figure out a stable WiFi setup. These ended up being the steps I needed to have a pretty stable and high performance connection.

Steps

  1. Make sure you are running linux-lts and not the linux kernel package. The newer linux kernels cause cfg80211 to crash
         

    Check with:
    uname -r  
    
    If not lts install linux-lts + headers and uninstall linux + headers 
    sudo pacman -S linux-lts linux-lts-headers
    sudo pacman -R linux linux-headers
  2. Install broadcom-wl-dkms from AUR
         

    yaourt broadcom-wl-dkms     
        
  3. Turn off Network Manager
         

    sudo systemctl mask NetworkManager.service
         
  4. Install connman
         

    sudo pacman -S connman
         
  5. Disable connman background scanning. Background scanning seems to break broadcom-wl
         

    Put the following into: /etc/connman/main.conf
    [General]
    BackgroundScanning = false
         
  6. Install cmst from aur for a nice systemtray. I found connman-ncurses really buggy
         

    yaourt cmst
         

Additional Information
Packages

connman-git 1.33.91.gda6f10a-1 (aur)
cmst 2016.04.03-1 (aur)
broadcom-wl-dkms 6.30.223.271-10 (aur)
linux-lts 4.4.38-1
linux-lts-headers 4.4.38-1

Connman Configuration

# /etc/connman/main.conf
[General]
BackgroundScanning = false

Wireless Card

02:00.0 Network controller: Broadcom Limited BCM4331 802.11a/b/g/n (rev 02)
        Subsystem: Apple Inc. AirPort Extreme
        Flags: bus master, fast devsel, latency 0, IRQ 17
        Memory at a0600000 (64-bit, non-prefetchable) [size=16K]
        Capabilities: <access denied>
        Kernel driver in use: wl
        Kernel modules: bcma, wl

Access Point (Just for your curiosity)

Ubiquiti Unifi UAP-AC-PRO
Firmware: 3.7.29.5446

Example Stats - 3h of pinging gateway + google

--- 192.168.55.1 ping statistics ---
10465 packets transmitted, 10465 received, 0% packet loss, time 10464435ms
rtt min/avg/max/mdev = 0.648/0.873/5.008/0.142 ms
--- [url=http://www.google.com]www.google.com[/url] ping statistics ---
10458 packets transmitted, 10458 received, 0% packet loss, time 10471908ms
rtt min/avg/max/mdev = 11.038/16.657/40.278/1.596 ms

Last edited by bryan.paradis (2016-12-13 10:55:23)

Offline

#11 2016-12-18 00:03:52

bryan.paradis
Member
Registered: 2016-10-22
Posts: 43

Re: BCM4331 Trouble

Wanted to report that pretty much my wireless is nice and stable. The only bad AP I have encountered so far is the Bell Home Hub Wireless Access Point. There is a ton of wireless networks here with at least 5 overlapping on the current channel. Other channels are not much better. It's an apartment building.

Could be the interference but we have a second piece of hardware here running Windows 10 that doesn't seem to have any connectivity issues. Maybe the broadcom driver isn't as robust as the windows version. I notice that my Signal Strength goes into the positive which is definitely buggy. Like +10db instead of -40db and my link quality goes to max when I am having issues.

Offline

#12 2017-01-24 13:56:27

aureooms
Member
Registered: 2016-05-26
Posts: 7

Re: BCM4331 Trouble

Did someone manage to find the sources for this 6.20 version? We really need to package it for Arch. This madness cannot continue!

Offline

#13 2017-03-01 11:28:08

ashgillman
Member
Registered: 2017-03-01
Posts: 1

Re: BCM4331 Trouble

FYI, I've been having very similar issues on Macbook 10,1 running NixOS. Same thing, signal jumps high during 'episodes'. Connman did not fix for me. However, seems to have been fixed over the last 24 hrs since I went from kernel 4.4.48 4.4.52 though!

EDIT: I take that back, it is better, but not fixed.

Last edited by ashgillman (2017-03-04 07:29:40)

Offline

#14 2017-12-20 08:46:09

lox
Member
Registered: 2017-12-20
Posts: 4

Re: BCM4331 Trouble

Here are the relevant links for version 6.20.155.1+bdcom-0ubuntu6 of the bcmwl driver:

Release page: https://launchpad.net/ubuntu/+source/bc … m-0ubuntu6
Build details (amd64): https://launchpad.net/ubuntu/+source/bc … ld/4225739
Source: https://launchpad.net/ubuntu/+archive/p … rig.tar.gz
deb package (amd64): http://launchpadlibrarian.net/128710919 … _amd64.deb

I'm also experiencing issues with BCM4331 using the current version of the broadcom-wl-dkms package (6.30.223.271-15) in the community repo, so downgrading to this old version looks like a possible solution that's worth trying.

Last edited by lox (2017-12-20 09:01:37)

Offline

#15 2018-03-18 21:04:42

watgrad
Member
From: Waterloo, Ontario
Registered: 2014-09-21
Posts: 17

Re: BCM4331 Trouble

Paradis' solution involving LTS and connman solved my ongoing problems with a braodcom 4331 wifi card in my MacBook PR8,1.
Connections are now stable, and reliable.
Thanks for sharing this!
Watt

See Message #10

Offline

Board footer

Powered by FluxBB