Wifi issues on a Macbook Air

Hi everyone,
Not content with my struggles with an iMac :slight_smile: I also decided to try Manjaro on an old Macbook Air (model A1466) with the (in)famous broadcom wireless adapter.

Anyways I was going through various posts on the forums here and at times the wiki over at Arch and I managed to get the broadcom drivers installed (broadcom-wl-dkms) and I can see the wifi networks in the house. The only problem is that I can't connect to them, when I try I just seem to get stuck in an authentication loop, where it asks for the password, I enter it and then after a bit it tells me it failed and either pops the authentication window up again or just stays there disconnected.

Obvious things to rule out;

  1. The password is correct, I'm using it on other devices to connect and it works. Also made sure that I'm not typing it incorrectly.
  2. I'm not able to connect to either 2.4ghz or 5ghz. I can connect to my mobile phones wifi hotspot though.
  3. I've tried disabling IPV6 and it doesn't help
  4. I've also tried updating to Kernel 5.0.5 but that doesn't seem to have helped either.
andrew@Manjaro-MBA ~]$ hwinfo --netcard --wlan --bluetooth | grep -Ei "model\:|driver\:|status\:|cmd\:|file\:|detected\:" |grep -v "Config Status"
  Model: "Broadcom BCM4360 802.11ac Wireless Network Adapter"
  Driver: "wl"
  Device File: wlp3s0
  Link detected: yes
    Driver Status: bcma is not active
    Driver Activation Cmd: "modprobe bcma"
    Driver Status: wl is active
    Driver Activation Cmd: "modprobe wl"
  Model: "Broadcom NetXtreme BCM57762 Gigabit Ethernet PCIe"
  Driver: "tg3"
  Device File: ens9
  Link detected: yes
    Driver Status: tg3 is active
    Driver Activation Cmd: "modprobe tg3"

Here is the output from lsmod

[andrew@Manjaro-MBA ~]$ lsmod | sort
ac                     16384  0
acpi_als               20480  0
aesni_intel           372736  2
aes_x86_64             20480  1 aesni_intel
agpgart                53248  2 intel_gtt,drm
ahci                   40960  2
apple_bl               20480  0
applesmc               24576  0
bcm5974                24576  0
bdc_pci                16384  0
bluetooth             651264  31 btrtl,btintel,btbcm,bnep,btusb,rfcomm
bnep                   28672  2
btbcm                  16384  1 btusb
btintel                28672  1 btusb
btrtl                  20480  1 btusb
btusb                  57344  0
cfg80211              798720  1 wl
cmac                   16384  1
cmdlinepart            16384  0
coretemp               20480  0
crc16                  16384  2 bluetooth,ext4
crc32c_generic         16384  0
crc32c_intel           24576  2
crc32_pclmul           16384  0
crct10dif_pclmul       16384  1
cryptd                 28672  3 crypto_simd,ghash_clmulni_intel,aesni_intel
crypto_simd            16384  1 aesni_intel
crypto_user            16384  0
drm                   499712  8 drm_kms_helper,i915
drm_kms_helper        208896  1 i915
ecdh_generic           24576  2 bluetooth
evdev                  28672  18
ext4                  749568  1
fat                    81920  1 vfat
fb_sys_fops            16384  1 drm_kms_helper
fscrypto               32768  1 ext4
fuse                  131072  3
ghash_clmulni_intel    16384  0
glue_helper            16384  1 aesni_intel
hid                   147456  3 usbhid,hid_apple,hid_generic
hid_apple              16384  0
hid_generic            16384  0
i2c_algo_bit           16384  1 i915
i2c_i801               36864  0
i915                 2162688  19
industrialio           86016  2 acpi_als,kfifo_buf
input_leds             16384  0
input_polldev          20480  1 applesmc
intel_cstate           16384  0
intel_gtt              24576  1 i915
intel_powerclamp       20480  0
intel_rapl             28672  0
intel_rapl_perf        16384  0
intel_spi              24576  1 intel_spi_platform
intel_spi_platform     16384  0
intel_uncore          135168  0
ip_tables              32768  0
irqbypass              16384  1 kvm
iTCO_vendor_support    16384  1 iTCO_wdt
iTCO_wdt               16384  0
jbd2                  131072  1 ext4
joydev                 28672  0
kfifo_buf              16384  1 acpi_als
kvm                   749568  2 kvmgt,kvm_intel
kvmgt                  32768  0
kvm_intel             311296  0
ledtrig_audio          16384  1 snd_hda_codec_generic
libahci                40960  1 ahci
libata                282624  2 libahci,ahci
libphy                 90112  1 tg3
lpc_ich                28672  0
mac_hid                16384  0
mbcache                16384  1 ext4
mdev                   24576  2 kvmgt,vfio_mdev
mei                   118784  1 mei_me
mei_me                 45056  0
Module                  Size  Used by
mousedev               24576  0
mtd                    73728  5 cmdlinepart,intel_spi,ofpart
nls_cp437              20480  1
nls_iso8859_1          16384  1
ofpart                 20480  0
pcc_cpufreq            20480  0
pcspkr                 16384  0
rfcomm                 86016  4
rfkill                 28672  7 bluetooth,cfg80211
sbs                    16384  0
sbshc                  16384  1 sbs
scsi_mod              253952  4 sd_mod,usb_storage,uas,libata
sd_mod                 57344  3
snd                   102400  23 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_timer,snd_pcm
snd_hda_codec         155648  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_cirrus
snd_hda_codec_cirrus    20480  1
snd_hda_codec_generic    90112  1 snd_hda_codec_cirrus
snd_hda_codec_hdmi     65536  1
snd_hda_core           98304  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_cirrus
snd_hda_intel          45056  8
snd_hwdep              16384  1 snd_hda_codec
snd_pcm               135168  4 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core
snd_timer              40960  1 snd_pcm
soundcore              16384  1 snd
spi_nor                49152  1 intel_spi
spi_pxa2xx_platform    32768  0
syscopyarea            16384  1 drm_kms_helper
sysfillrect            16384  1 drm_kms_helper
sysimgblt              16384  1 drm_kms_helper
tg3                   180224  0
thunderbolt           155648  0
uas                    28672  0
uinput                 20480  0
usbhid                 61440  0
usb_storage            73728  1 uas
vfat                   20480  1
vfio                   36864  3 kvmgt,vfio_mdev,vfio_iommu_type1
vfio_iommu_type1       32768  0
vfio_mdev              16384  0
wl                   6463488  0
x86_pkg_temp_thermal    20480  0
xhci_hcd              262144  1 xhci_pci
xhci_pci               20480  0
x_tables               49152  1 ip_tables

dkms status

[andrew@Manjaro-MBA ~]$ dkms status
broadcom-wl, 6.30.223.271, 5.0.5-1-MANJARO, x86_64: installed

dmesg output

[andrew@Manjaro-MBA ~]$ dmesg | grep -i 'error\|seg\|fail\|broke\|warn\|dump\|denied\|broken\|wl'
[    0.577715] ACPI Error: Needed type [Reference], found [Integer] 00000000d767dffa (20181213/exresop-69)
[    0.577722] ACPI Error: AE_AML_OPERAND_TYPE, While resolving operands for [Store] (20181213/dswexec-427)
[    0.577729] ACPI Error: Method parse/execution failed \_PR.CPU0._PDC, AE_AML_OPERAND_TYPE (20181213/psparse-531)
[    0.767265] pci 0000:06:05.0: BAR 14: failed to assign [mem size 0x00200000]
[    0.767274] pci 0000:06:05.0: BAR 15: failed to assign [mem size 0x00200000 64bit pref]
[    0.767279] pci 0000:06:06.0: BAR 14: failed to assign [mem size 0x00200000]
[    0.767286] pci 0000:06:06.0: BAR 15: failed to assign [mem size 0x00200000 64bit pref]
[    0.767292] pci 0000:06:05.0: BAR 13: failed to assign [io  size 0x1000]
[    0.767297] pci 0000:06:06.0: BAR 13: failed to assign [io  size 0x1000]
[    0.767303] pci 0000:06:06.0: BAR 14: failed to assign [mem size 0x00200000]
[    0.767310] pci 0000:06:06.0: BAR 15: failed to assign [mem size 0x00200000 64bit pref]
[    0.767316] pci 0000:06:06.0: BAR 13: failed to assign [io  size 0x1000]
[    0.767321] pci 0000:06:05.0: BAR 14: failed to assign [mem size 0x00200000]
[    0.767328] pci 0000:06:05.0: BAR 15: failed to assign [mem size 0x00200000 64bit pref]
[    0.767334] pci 0000:06:05.0: BAR 13: failed to assign [io  size 0x1000]
[    1.105170] dw_dmac_pci: probe of 0000:00:15.0 failed with error -16
[    1.124149] Segment Routing with IPv6
[    1.124461] RAS: Correctable Errors collector initialized.
[    2.245890] systemd[1]: Listening on Process Core Dump Socket.
[    3.122494] wl: loading out-of-tree module taints kernel.
[    3.122501] wl: module license 'MIXED/Proprietary' taints kernel.
[    3.132287] wl: module verification failed: signature and/or required key missing - tainting kernel
[    3.538202] wlan0: Broadcom BCM43a0 802.11 Hybrid Wireless Controller 6.30.223.271 (r587334)
[    3.671889] wl 0000:03:00.0 wlp3s0: renamed from wlan0
[    4.092932] random: 5 urandom warning(s) missed due to ratelimiting
[  320.193876] ERROR @wl_notify_scan_status : 
[  320.193879] wlp3s0 Scan_results error (-22)

kernal versions

[andrew@Manjaro-MBA ~]$ pacman -Qsq linux | grep linux | grep -v -E '(arch|util|sys|api|firmware)' | grep -v nvidia
linux419
linux50
linux50-headers

Final point, I have another Macbook Air - same type, model etc that my wife is using with Mac OS X and that can connect to the wifi without any problems.

Any ideas on what I'm missing and can do to fix it????

Thanks everyone!

This could help.

Hey thanks for the tip - you led me down the right path! :slight_smile:

Solution that worked for me.
I was going through mhwd and trying to see if I could get it to autodetect and reinstall the card for me but I wasn't having much luck there either, so then I tried the following;

Sudo pacman -S dkms
and reboot but it didn't resolve the issue for me

So then I tried to reinstall broadcom with
Sudo pacman -S broadcom-wl-dkms

which through up an error that it was missing the linux 419 headers and so wasn't able to install dependencies.

Im running 505, so I didn't think that the 419headers were relevant (I have the Linux50-headers installed) but at this stage I was like that it's worth trying, so

Sudo pacman -S linux419-headers
and afterwards Reboot

Once the laptop came back up it connected to the wifi first time (I'm writing this post using it) :slight_smile:

Moral of the story? Pay attention to what the error messages are telling you, although I'm going to have to remind myself of that going forward.

1 Like

Ok, my laptop is calling me a liar. I powered it off earlier and now after switching it on again the Wi-Fi isn’t working :frowning: :angry:

yo,
As you noticed, dkms and headers are kernel specific. Line yourself up :wink:

[if you need more let me know and show inxi -Fxxxz && dkms status]

1 Like

Follow these steps to install the broadcom-wl-dkms driver:

The tg3 driver module is known to cause problems with the other broadcom wifi modules. The best choice is to blacklist the tg3 module entirely. If you want a wired connection you can then manually modprobe the tg3 module. It is also said that you can load the tg3 module after the wifi modules and it won't cause interference. That is your choice if you find it's causing problems with your wifi.

You can test this by this procedure.

Enter one at a time:

sudo modprobe -r wl

sudo modprobe -r tg3

sudo modprobe wl

sudo systemctl restart NetworkManager

If that improves things you can then blacklist the tg3 driver.

Create the file:

/etc/modprobe.d/ blacklist_tg3.conf

With the following content:

blacklist tg3

You can do a manual modprobe of the tg3 module if you need to use your wired connection. You could also write a service to load the tg3 module after the wl driver is loaded.

Gotta love Broadcom. They can't even write drivers in their own lineup that don't interfere with each other.

Hope that helps you.

1 Like

Hey,
First off, I'd like to say thanks to both of you for your help with this, I really appreciate it.

tbg; I followed the steps that you outlined above and immediately after stopping the ethernet and restarting the wireless, it started working without any problems at all. I spent a couple of minutes surfing and all went well. So I created the blacklist, saved it (I can confirm it's there, if I just use a quick ls /etc/modprobe.d/ I can see the blacklist_tg3.conf file and if I cat its contents, it says blacklist tg3).

However, after powering off the laptop and powering it back on, the wifi connects but then disconnects and keeps doing that until I run through the steps again and then sometimes it works but sometimes it goes back into the connect / disconnect loop.

Starting to really dislike broadcom... :frowning:

Yes broadcom sucks bigtime. I think what you are going to have to do is script a restart of your network components after login. You can do this via a script using a bash alias, or you can write a system service to automatically execute the network restart once you login.

I hate to say it but many broadcom adapters can't maintain a satisfactory connection no matter what you do. Hopefully yours is not one of those.

I am only on my cell. I have many examples on the forum of how to script a full network restart or on how to write this as a service. If I get back to a Linux computer I will post you the service you need.

Hopefully this will work for you.

Remove the blacklist file you created earlier.

Then create the service to fix your driver issues.

Network restart service unit:

Create the following file with a root capable text editor:

/etc/systemd/system/network-restart.service

Add the following contents to the file:

#/etc/systemd/system/network-restart.service
#sudo systemctl enable network-restart.service
#sudo systemctl start network-restart.service
#sudo systemctl status network-restart.service
#sudo systemctl daemon-reload

[Unit]
Description=WiFi Restart Service 
WantedBy=network-pre.target 
After=network.target
StopWhenUnneeded=yes

[Service]
User=root
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/sudo -u $USER /bin/bash -lc 'nmcli networking off'
ExecStart=/usr/bin/sleep 1
ExecStart=/usr/bin/systemctl stop NetworkManager
ExecStart=/usr/bin/ip link set ens9 down
ExecStart=/usr/bin/ip link set wlp3s0 down
ExecStart=/usr/bin/rmodprobe -r tg3
ExecStartPost=/usr/bin/modprobe -r wl
ExecStart=/usr/bin/sleep 3
ExecStart=/usr/bin/modprobe wl
ExecStart=/usr/bin/sleep 2
ExecStart=/usr/bin/ip link set wlp3s0 up
ExecStart=/usr/bin/sleep 2
ExecStart=/usr/bin/systemctl start NetworkManager
ExecStart=/usr/bin/sleep 1
ExecStart=/usr/bin/sudo -u $USER /bin/bash -lc 'nmcli networking on'
ExecStart=/usr/bin/sleep 1
ExecStart=/usr/bin/sudo -u $USER /bin/bash -lc 'nmcli r wifi off'
ExecStart=/usr/bin/sleep 1
ExecStart=/usr/bin/sudo -u $USER /bin/bash -lc 'nmcli r wifi on'

[Install]
WantedBy=network-online.target

The sleep units in the service may be reduced, (or eliminated) if you do not like the delay it creates. Be aware though, that doing so may reduce the reliability of the service.

Once you have created and saved the service file, enable the service:

sudo systemctl enable network-restart.service

Then reboot the computer.

Hope that helps.

1 Like

Hey tbg,
Thanks a lot for taking the time to help me and to do all of that, I really appreciate it.
I gave it a try following the instructions as you outlined them but unfortunately after the reboot it didn't make a difference, the wifi was still not connecting and requesting authorisation and then on entering the password getting stuck in its loop.

I'm going to try cleaning out the drivers totally and reinstalling and seeing it that together with your script makes a difference.

Thanks again for your help.

Try changing the end of the service to:

ExecStart=/usr/bin/sleep 2 
ExecStart=/usr/bin/systemctl start NetworkManager 
ExecStart=/usr/bin/sleep 2
ExecStart=/usr/bin/sudo -u $USER /bin/bash -lc 'nmcli r wifi on'

[Install] 
WantedBy=network.target 

Perhaps you have done something incorrectly with creating your service, as I believe this service should work for you. Here is a thread with tons of information on writing services.

To check if your service is running properly post the output of this command:

sudo systemctl status network-restart.service

I am only on a cell phone ATM. The bloody spellchecker has a habit of introducing an extra space when I did not want that. Being on a very small screen it is sometimes next to impossible to spot syntax errors the spellchecker introduces. Make sure there are no double spaces in any script or service I've posted as I often don't notice those. I just caught a few and corrected them. Working from a phone is very difficult at times.

If you have no luck with getting it to work with a service you can easily script the commands I gave earlier.

Create the script wherever you want, such as:

~/.scripts/restart_wifi.sh

With the following contents:

#!/bin/bash
sudo modprobe -r wl
sudo modprobe -r tg3
sleep 3
sudo modprobe wl
sudo systemctl restart NetworkManager

Make the script executable.

You can then call the script from the terminal by its path, or via a bash alias.

The service method is far more handy, as you do not need to launch the script or enter your sudo password.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by