MacBook wifi doesn't work (brcmfmac)

Bug #1600624 reported by Lars Peter Thomsen
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

wifi doesn't work at all. Output from dmesg:
[...]
brcmfmac 0000:03:00.0: Direct firmware load for brcm/brcmfmac43602-pcie.txt failed with error -2
...
brcmf_cfg80211_reg_notifier: not a ISO3166 code

There is no file brcmfmac43602-pcie.txt anywhere on the system. However, /lib/firmware/brcm/brcmfmac43602-pcie.bin does exist.

Iw reg get outputs:
sudo iw reg get
country DK: DFS-ETSI
 (2402 - 2482 @ 40), (N/A, 20), (N/A)
 (5170 - 5250 @ 80), (N/A, 20), (N/A)
 (5250 - 5330 @ 80), (N/A, 20), (0 ms), DFS
 (5490 - 5710 @ 160), (N/A, 27), (0 ms), DFS
 (57000 - 66000 @ 2160), (N/A, 40), (N/A)

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: linux-image-4.4.0-28-generic 4.4.0-28.47
ProcVersionSignature: Ubuntu 4.4.0-28.47-generic 4.4.13
Uname: Linux 4.4.0-28-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: lars 2010 F.... pulseaudio
 /dev/snd/controlC0: lars 2010 F.... pulseaudio
CurrentDesktop: Unity
Date: Sun Jul 10 19:41:18 2016
EcryptfsInUse: Yes
HibernationDevice: RESUME=UUID=a45b9984-4de8-49e3-ba57-a98ae560ad61
InstallationDate: Installed on 2016-01-30 (162 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
MachineType: Apple Inc. MacBookPro12,1
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.4.0-28-generic.efi.signed root=UUID=d3ba9d27-321b-45cb-99f2-776b10c1dc7a ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-4.4.0-28-generic N/A
 linux-backports-modules-4.4.0-28-generic N/A
 linux-firmware 1.157.2
SourcePackage: linux
UpgradeStatus: Upgraded to xenial on 2016-04-22 (78 days ago)
dmi.bios.date: 10/26/2015
dmi.bios.vendor: Apple Inc.
dmi.bios.version: MBP121.88Z.0167.B15.1510261437
dmi.board.name: Mac-E43C1C25D4880AD6
dmi.board.vendor: Apple Inc.
dmi.board.version: MacBookPro12,1
dmi.chassis.type: 9
dmi.chassis.vendor: Apple Inc.
dmi.chassis.version: Mac-E43C1C25D4880AD6
dmi.modalias: dmi:bvnAppleInc.:bvrMBP121.88Z.0167.B15.1510261437:bd10/26/2015:svnAppleInc.:pnMacBookPro12,1:pvr1.0:rvnAppleInc.:rnMac-E43C1C25D4880AD6:rvrMacBookPro12,1:cvnAppleInc.:ct9:cvrMac-E43C1C25D4880AD6:
dmi.product.name: MacBookPro12,1
dmi.product.version: 1.0
dmi.sys.vendor: Apple Inc.

Revision history for this message
Lars Peter Thomsen (lapeth) wrote :
Revision history for this message
Brad Figg (brad-figg) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
penalvch (penalvch) wrote :

Lars Peter Thomsen, thank you for reporting this and helping make Ubuntu better.

In order to allow additional upstream developers to examine the issue, at your earliest convenience, could you please test the latest upstream kernel available from http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D ? Please keep in mind the following:
1) The one to test is at the very top line at the top of the page (not the daily folder).
2) The release names are irrelevant.
3) The folder time stamps aren't indicative of when the kernel actually was released upstream.
4) Install instructions are available at https://wiki.ubuntu.com/Kernel/MainlineBuilds .

If testing on your main install would be inconvenient, one may:
1) Install Ubuntu to a different partition and then test this there.
2) Backup, or clone the primary install.

If the latest kernel did not allow you to test to the issue (ex. you couldn't boot into the OS) please make a comment in your report about this, and continue to test the next most recent kernel version until you can test to the issue. Once you've tested the upstream kernel, please comment on which kernel version specifically you tested. If this issue is fixed in the mainline kernel, please add the following tags by clicking on the yellow circle with a black pencil icon, next to the word Tags, located at the bottom of the report description:
kernel-fixed-upstream
kernel-fixed-upstream-X.Y-rcZ

Where X, and Y are the first two numbers of the kernel version, and Z is the release candidate number if it exists.

If the mainline kernel does not fix the issue, please add the following tags:
kernel-bug-exists-upstream
kernel-bug-exists-upstream-X.Y-rcZ

Please note, an error to install the kernel does not fit the criteria of kernel-bug-exists-upstream.

Also, you don't need to apport-collect further unless specifically requested to do so.

Once testing of the latest upstream kernel is complete, please mark this report Status Confirmed. Please let us know your results.

Thank you for your help.

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
description: updated
Revision history for this message
Lars Peter Thomsen (lapeth) wrote :

Issue remains on 4.7-rc7

$ dmesg | grep brcm
[ 5.972119] usbcore: registered new interface driver brcmfmac
[ 6.100313] brcmfmac 0000:03:00.0: Direct firmware load for brcm/brcmfmac43602-pcie.txt failed with error -2
[ 6.585372] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Nov 10 2015 06:38:10 version 7.35.177.61 (r598657) FWID 01-ea662a8c
[ 6.616459] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code (0x30 0x30)
[ 6.621156] brcmfmac 0000:03:00.0 wlp3s0: renamed from wlan0
[ 312.109760] brcmfmac: brcmf_inetaddr_changed: fail to get arp ip table err:-23
$ sudo find / -name brcmfmac43602*
/lib/firmware/brcm/brcmfmac43602-pcie.bin
/lib/firmware/brcm/brcmfmac43602-pcie.ap.bin
$ uname -a
Linux Saturn 4.7.0-040700rc7-generic #201607110032 SMP Mon Jul 11 04:34:25 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

tags: added: kernel-bug-exists-upstream kernel-bug-exists-upstream-4.7-rc7
Revision history for this message
Patric (pakar) wrote :

Issue is in 4.7.0 too.

Wifi *may* stay working for fairly long periods (2-3 hours) in some lucky instances.

Tests performed:
1. unload/load brcmfmac module.
   Result : Interface is stuck in "Link is not ready"

2. suspend system and resume.
   Result : Interface is stuck in "Link is not ready"

3. unload brcmfmac module and suspend. After resume manually load the module again.
   Result : Interface is stuck in "Link is not ready"

4. Warm reboot of the system.
   Result : Interface is stuck in "Link is not ready"

5. Full shutdown and cold-boot.
   Result : Interface comes up as expected and works for some time.

Have not been able to look into activating debug-output from brcmfmac (module debug-parameter) yet.

Revision history for this message
Patric (pakar) wrote :

Attached to this comment is a debug log (non-working-state_modprobe.txt) from the brcmfmac module while loading it but network-card failing to come up as it should.

Module loaded with:
$ cat /etc/modprobe.d/brcmfmac.conf
options brcmfmac debug=0xffffff roamoff=1

Revision history for this message
Patric (pakar) wrote :

Adding log (nonworking-rmmod.txt) from when unloading the module too...

Revision history for this message
Patric (pakar) wrote :

Will attempt to capture some more logs when the card is working and when goes into the problematic state.

Revision history for this message
penalvch (penalvch) wrote :

ldc, to capture your hardware, it will help immensely if you filed a new report with the Ubuntu repository kernel (not mainline/upstream) via a terminal:
ubuntu-bug linux

Please feel free to subscribe me to it.

For more on why this is helpful, please see https://wiki.ubuntu.com/ReportingBugs.

Revision history for this message
penalvch (penalvch) wrote :

Lars Peter Thomsen, to keep this relevant to upstream, please continue to test the latest mainline kernel as they are released (now 4.8-rc3). Could you please advise?

Revision history for this message
Lars Peter Thomsen (lapeth) wrote :

$ dmesg | grep brcm
[ 6.910905] usbcore: registered new interface driver brcmfmac
[ 7.071422] brcmfmac 0000:03:00.0: Direct firmware load for brcm/brcmfmac43602-pcie.txt failed with error -2
[ 7.586823] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Nov 10 2015 06:38:10 version 7.35.177.61 (r598657) FWID 01-ea662a8c
[ 7.622750] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code (0x30 0x30)
[ 7.655785] brcmfmac 0000:03:00.0 wlp3s0: renamed from wlan0
$ uname -a
Linux Saturn 4.8.0-040800rc3-generic #201608212032 SMP Mon Aug 22 00:34:39 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

tags: added: kernel-bug-exists-upstream-4.8-rc3
removed: kernel-bug-exists-upstream-4.7-rc7
Revision history for this message
penalvch (penalvch) wrote :

Lars Peter Thomsen, to clarify, did this issue not occur in a release prior to 16.04?

Revision history for this message
Arnau Villoslada (thedegree0) wrote :

I'm experiencing exactly the same problem on a XPS 15.

Christopher M. Penalver, this issue is present on 16.04.

Revision history for this message
penalvch (penalvch) wrote :

Arnau Villoslada, it will help immensely if you filed a new report with the Ubuntu repository kernel (not mainline/upstream) via a terminal:
ubuntu-bug linux

Please feel free to subscribe me to it.

For more on why this is helpful, please see https://wiki.ubuntu.com/ReportingBugs.

Revision history for this message
Lars Peter Thomsen (lapeth) wrote :

As I recall, the issue did not appear on 15.10

I updated to 16.10, and this issue now renders the system unbootable.

Revision history for this message
penalvch (penalvch) wrote :

Lars Peter Thomsen, could you please advise to the results of the latest upstream kernel 4.8.1?

tags: added: needs-bisect regression-release
Revision history for this message
Lars Peter Thomsen (lapeth) wrote :

Issue remains on 4.8.1. Boot is aborted and displays a rescue prompt.

I'll try going back to 15.10 and see if any kernel versions exhibit the problem. Are we sure that this is an issue with the kernel and not another package?

Revision history for this message
penalvch (penalvch) wrote :

Lars Peter Thomsen, could you please boot with 4.9-rc1 and provide the missing information from https://wiki.ubuntu.com/DebuggingSystemCrash ?

Revision history for this message
Lars Peter Thomsen (lapeth) wrote :

Reinstalling 16.10 from scratch has resolved the issue; I no longer see the issue with 4.9-rc1 or any other kernel down to 4.5.4. No clue why.

Revision history for this message
Lars Peter Thomsen (lapeth) wrote :

ldc (pakar) reports in post #5 that the interface may only stay up for a limited time. I'll report if I see the same behavior.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Rohin Gopalakrishnan (rohinrohin) wrote :

I'm facing the same issue on my XPS 15, Kernel 4.9LTS. Any updates/fixes for this?

Revision history for this message
archenroot (archenroot-gmail) wrote :

I had similar issue on Dell XPS 15 with:
02:00.0 Network controller: Broadcom Corporation BCM43602 802.11ac Wireless LAN SoC (rev 01)
 Subsystem: Dell BCM43602 802.11ac Wireless LAN SoC
 Kernel driver in use: brcmfmac
 Kernel modules: brcmfmac

I resolved this by loading the proper firmware into kernel. I am using Refind with support of UEFI bios, so my kernel is self loaded (no Grub or Lilo, etc.) including the firmware for specific hardware.

Here are some hints how I resolved non-working wifi. The .txt file is not available for some of brfmac devices (as my case as well).

Look here for detailed analysis and resolution, be patient as was also resolving how to properly load the firmware into kernel:
https://forums.gentoo.org/viewtopic-t-1060038.html?sid=0c86112016dd3a3410cd6a1fe9fe27d1

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Do you mean that the wifi works if kernel is EFIStub, it doesn't work otherwise?

Or just put the wifi firmware into initramfs?

Revision history for this message
archenroot (archenroot-gmail) wrote :

Ok, well in my case I was:
- 1. missing the firmware at all as I thought it is not required for this device, but this was quickly resolved, my kernel config is as follows:
ares ~ # grep -Hrn "FIRMWARE" /usr/src/linux/.config
/usr/src/linux/.config:1541:CONFIG_PREVENT_FIRMWARE_BUILD=y
/usr/src/linux/.config:1543:CONFIG_FIRMWARE_IN_KERNEL=y
/usr/src/linux/.config:1544:CONFIG_EXTRA_FIRMWARE="brcm/brcmfmac43602-pcie.bin brcm/BCM-0a5c-6410.hcd"
/usr/src/linux/.config:1545:CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"
/usr/src/linux/.config:3222:# CONFIG_CYPRESS_FIRMWARE is not set
/usr/src/linux/.config:3372:# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
/usr/src/linux/.config:3428:CONFIG_FIRMWARE_EDID=y
/usr/src/linux/.config:5000:CONFIG_FIRMWARE_MEMMAP=y
/usr/src/linux/.config:5009:# CONFIG_GOOGLE_FIRMWARE is not set
/usr/src/linux/.config:5408:CONFIG_TEST_FIRMWARE=y

2. The message "Direct firmware load for brcm/brcmfmac43602-pcie.txt failed with error -2" is not an issue in general, such file is related to calibration as per my understanding and is not provided for this device.

3. The message "brcmf_cfg80211_reg_notifier: not a ISO3166 code" might cause or not some issue, but this is probably related to manufacturer based on discussions on Gentoo forum

4. I got confirmation from one Gentoo guy from link referenced in previous post by me that he has the device and it works, but mine still didn't work. The last step I check was network stack app boot and found that both packages are in default runlevel:
net-misc/networkmanager-1.6.2_pre
net-misc/dhcpcd-6.11.3

Once I disabled dhcpcd (which is anyway auto-started on demand by NetworkManager and that was somehow causing issue and continuous switching of MAC addresses as well) I was able to connect to wifi.

Stability - I am on 4.10.3-gentoo kernel and:
A. At work/airports - I am on Open or WPA2-PSK secured network and all is fine, I didn't experienced disconnect or Kernel Panic for about 2 weeks
B. At home - Well, this is still strange. When I work alone all is stable, but when my wife sit at me and connect from here Android based Lenovo phone, in about less then ~5-30 minutes I get kernel panic. I will try to capture some more details about this strange and probably unique situation as I don't experience it anywhere else. (probably it is because of my wife :-) )

Revision history for this message
archenroot (archenroot-gmail) wrote :

Also I found out on raspberry forum, that this could be related to some specific channels which the AP is configured on:
https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=138312

Revision history for this message
penalvch (penalvch) wrote :

Lars Peter Thomsen, I am closing this report because as per https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1600624/comments/19 the bug has been fixed via installing a later release of Ubuntu.

Changed in linux (Ubuntu):
status: Expired → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.