Debian Jessie Wireless Driver Broadcom Restart (rmmod modprobe) BCM43142 [14e4:4365]

broadcomdebiandriverskernel-moduleswifi

My Dell laptop, running Debian 8 (Jessie), has this wireless device:

$ lspci -nn -d 14e4:

02:00.0 Network controller [0280]: Broadcom Corporation BCM43142 802.11b/g/n [14e4:4365] (rev 01)

And it occasionally works fine. Today it is working sort of fine:

64 bytes from 8.8.8.8: icmp_seq=5168 ttl=57 time=24.6 ms
64 bytes from 8.8.8.8: icmp_seq=5169 ttl=57 time=24.5 ms
64 bytes from 8.8.8.8: icmp_seq=5170 ttl=57 time=24.4 ms
64 bytes from 8.8.8.8: icmp_seq=5171 ttl=57 time=24.8 ms
64 bytes from 8.8.8.8: icmp_seq=5172 ttl=57 time=28.6 ms

But every so often (maybe every ten minutes), it starts dropping packets, and then jams completely:

64 bytes from 8.8.8.8: icmp_seq=4631 ttl=57 time=28.7 ms
64 bytes from 8.8.8.8: icmp_seq=4633 ttl=57 time=27.8 ms
64 bytes from 8.8.8.8: icmp_seq=4642 ttl=57 time=25.6 ms
64 bytes from 8.8.8.8: icmp_seq=4651 ttl=57 time=24.6 ms
64 bytes from 8.8.8.8: icmp_seq=4652 ttl=57 time=24.4 ms
64 bytes from 8.8.8.8: icmp_seq=4657 ttl=57 time=23.6 ms
ping: sendmsg: Network is unreachable

At this point, I do

sudo rmmod wl && sudo modprobe wl

to yank and reinstall the the wireless driver, and then it's fine again:

64 bytes from 8.8.8.8: icmp_seq=4681 ttl=57 time=38.0 ms
64 bytes from 8.8.8.8: icmp_seq=4682 ttl=57 time=26.1 ms
64 bytes from 8.8.8.8: icmp_seq=4683 ttl=57 time=23.9 ms
64 bytes from 8.8.8.8: icmp_seq=4684 ttl=57 time=24.4 ms

This seems a bit suboptimal, anyone got any ideas about how to make it work properly?

—- EDIT:
So I'm now using:

sudo rmmod wl && sudo modprobe wl && sudo iwconfig wlan0 power off

to reset the wretched thing, and that causes

[Mon Feb  1 17:32:41 2016 <    0.000000>] wl0: link down (wlan0)
[Mon Feb  1 17:32:41 2016 <    0.034491>] cfg80211: Calling CRDA to update world regulatory domain
[Mon Feb  1 17:32:41 2016 <    0.006586>] cfg80211: World regulatory domain updated:
[Mon Feb  1 17:32:41 2016 <    0.000005>] cfg80211:  DFS Master region: unset
[Mon Feb  1 17:32:41 2016 <    0.000003>] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[Mon Feb  1 17:32:41 2016 <    0.000004>] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[Mon Feb  1 17:32:41 2016 <    0.000003>] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[Mon Feb  1 17:32:41 2016 <    0.000002>] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[Mon Feb  1 17:32:41 2016 <    0.000004>] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[Mon Feb  1 17:32:41 2016 <    0.000003>] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[Mon Feb  1 17:32:41 2016 <    0.000002>] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[Mon Feb  1 17:32:41 2016 <    0.000002>] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[Mon Feb  1 17:32:41 2016 <    0.000003>] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)

[Mon Feb  1 17:32:46 2016 <    4.427237>] wl0: online cpus 1
[Mon Feb  1 17:32:46 2016 <    0.000409>] wlan0: Broadcom BCM4365 802.11 Hybrid Wireless Controller 6.30.223.248 (r487574)

[Mon Feb  1 17:32:47 2016 <    0.765193>] wl0: link up (wlan0)
[Mon Feb  1 17:32:47 2016 <    0.000198>] cfg80211: Calling CRDA for country: TW
[Mon Feb  1 17:32:47 2016 <    0.004048>] cfg80211: Regulatory domain changed to country: TW
[Mon Feb  1 17:32:47 2016 <    0.000005>] cfg80211:  DFS Master region: JP
[Mon Feb  1 17:32:47 2016 <    0.000003>] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[Mon Feb  1 17:32:47 2016 <    0.000004>] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 3000 mBm), (N/A)
[Mon Feb  1 17:32:47 2016 <    0.000003>] cfg80211:   (5270000 KHz - 5330000 KHz @ 40000 KHz), (N/A, 1700 mBm), (0 s)
[Mon Feb  1 17:32:47 2016 <    0.000003>] cfg80211:   (5490000 KHz - 5590000 KHz @ 80000 KHz), (N/A, 3000 mBm), (0 s)
[Mon Feb  1 17:32:47 2016 <    0.000002>] cfg80211:   (5650000 KHz - 5710000 KHz @ 40000 KHz), (N/A, 3000 mBm), (0 s)
[Mon Feb  1 17:32:47 2016 <    0.000002>] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 3000 mBm), (N/A)

to appear in the ring buffer. (dmesg -dT) . I don't know if it's relevant that my computer seems to think it's in Taiwan. (It's in England)

At that point, the excellent mtr (mtr --curses 8.8.8.8) tells me that I'm getting 100% of packets round-tripping to google's dns in average 24ms.

That continues for a variable amount of time, and then the packet loss will become very near to 100%, and the round-trip time will get very high (100s or 1000s of milliseconds). Network manager still thinks I'm connected, but the internet is effectively unreachable.

At which point, reset as above, and everything goes back to fine.

EDIT

Oooh, I found this in the ring buffer:

[Mon Feb  1 18:14:55 2016 <    0.050609>] ------------[ cut here ]------------
[Mon Feb  1 18:14:55 2016 <    0.000037>] WARNING: CPU: 0 PID: 27429 at /build/linux-x1KGLI/linux-3.16.7-ckt11/net/wireless/sme.c:791 wl_notify_roaming_status+0xbb/0x140 [wl]()
[Mon Feb  1 18:14:55 2016 <    0.000004>] Modules linked in: wl(PO) btrfs xor raid6_pq hfsplus msdos xfs libcrc32c dm_crypt algif_skcipher af_alg dm_mod xt_multiport bnep binfmt_misc uinput ip6t_REJECT xt_hl nfsd ip6t_rt auth_rpcgss oid_registry nfs_acl nfs nf_conntrack_ipv6 lockd fscache nf_defrag_ipv6 sunrpc ipt_REJECT xt_LOG xt_limit xt_tcpudp xt_addrtype nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack ip6table_filter ip6_tables nf_conntrack_netbios_ns nf_conntrack_broadcast nf_nat_ftp nf_nat nf_conntrack_ftp nf_conntrack iptable_filter ip_tables x_tables nls_utf8 nls_cp437 vfat rtsx_usb_ms memstick fat ecb btusb uvcvideo iTCO_wdt videobuf2_vmalloc videobuf2_memops joydev bluetooth iTCO_vendor_support videobuf2_core v4l2_common dell_wmi videodev snd_hda_codec_hdmi sparse_keymap media 6lowpan_iphc x86_pkg_temp_thermal intel_powerclamp
[Mon Feb  1 18:14:55 2016 <    0.000082>]  intel_rapl coretemp kvm_intel kvm crc32_pclmul ghash_clmulni_intel aesni_intel aes_x86_64 lrw gf128mul snd_hda_codec_realtek snd_hda_codec_generic dell_laptop dcdbas glue_helper snd_hda_intel i915 ablk_helper pcspkr psmouse snd_hda_controller evdev snd_hda_codec serio_raw efi_pstore cryptd cfg80211 rfkill snd_hwdep snd_pcm snd_timer snd soundcore drm_kms_helper button drm battery ac i2c_algo_bit i2c_i801 i2c_core video processor mei_me lpc_ich mei shpchp thermal_sys efivars wmi loop fuse parport_pc ppdev lp parport autofs4 ext4 crc16 mbcache jbd2 rtsx_usb_sdmmc mmc_core rtsx_usb mfd_core sg sd_mod sr_mod crc_t10dif cdrom crct10dif_generic ahci ehci_pci ehci_hcd libahci crct10dif_pclmul crct10dif_common xhci_hcd crc32c_intel libata scsi_mod r8169 mii usbcore usb_common [last unloaded: wl]

[Mon Feb  1 18:14:55 2016 <    0.000100>] CPU: 0 PID: 27429 Comm: wl_event_handle Tainted: P        W  O  3.16.0-4-amd64 #1 Debian 3.16.7-ckt11-1+deb8u6
[Mon Feb  1 18:14:55 2016 <    0.000003>] Hardware name: Dell Inc. Inspiron 3537/0MJNYC, BIOS A07 11/12/2013
[Mon Feb  1 18:14:55 2016 <    0.000003>]  0000000000000009 ffffffff8150b4e5 0000000000000000 ffffffff81067767
[Mon Feb  1 18:14:55 2016 <    0.000006>]  ffff880002e4e680 ffff880036c4bd54 ffff880002e4ee9a ffff88014aca3000
[Mon Feb  1 18:14:55 2016 <    0.000005>]  ffff880002e4ea78 ffffffffa12cde1b 0000000000000039 00000000000000d0
[Mon Feb  1 18:14:55 2016 <    0.000006>] Call Trace:
[Mon Feb  1 18:14:55 2016 <    0.000014>]  [<ffffffff8150b4e5>] ? dump_stack+0x41/0x51
[Mon Feb  1 18:14:55 2016 <    0.000010>]  [<ffffffff81067767>] ? warn_slowpath_common+0x77/0x90
[Mon Feb  1 18:14:55 2016 <    0.000021>]  [<ffffffffa12cde1b>] ? wl_notify_roaming_status+0xbb/0x140 [wl]
[Mon Feb  1 18:14:55 2016 <    0.000020>]  [<ffffffffa12cc0b2>] ? wl_event_handler+0x62/0x1e0 [wl]
[Mon Feb  1 18:14:55 2016 <    0.000021>]  [<ffffffffa12cc050>] ? wl_free_wdev.isra.24+0x70/0x70 [wl]
[Mon Feb  1 18:14:55 2016 <    0.000009>]  [<ffffffff81087f7d>] ? kthread+0xbd/0xe0
[Mon Feb  1 18:14:55 2016 <    0.000007>]  [<ffffffff81087ec0>] ? kthread_create_on_node+0x180/0x180
[Mon Feb  1 18:14:55 2016 <    0.000007>]  [<ffffffff81511618>] ? ret_from_fork+0x58/0x90
[Mon Feb  1 18:14:55 2016 <    0.000007>]  [<ffffffff81087ec0>] ? kthread_create_on_node+0x180/0x180
[Mon Feb  1 18:14:55 2016 <    0.000003>] ---[ end trace ff64772df7283e10 ]---

Looks like a smoking gun, what should I do with it?

In fact there are another 71 copies in /var/log/kern.log

cat /var/log/kern.log | grep WARNING | grep notify_roaming_status | wc

71    1110   13009

Just for today.

Best Answer

According to https://wiki.debian.org/wl you can try disabling power management, e.g with

iwconfig wlan0 power off
Related Question