You are not logged in.

#1 2016-07-21 07:32:42

ProtonBeam
Member
Registered: 2016-07-21
Posts: 2

Yet another "BCM WiFi doesn't work after suspending my laptop" thread

I've been having this issue for a while now. I first noticed it about a year ago, on an Ubuntu installation; I blamed NetworkManager for it, and considering the fact that the touchpad didn't work completely either, I dropped my attempt to get Linux working on my laptop and just installed Windows, where everything works well.

One year and a new Arch installation later and the touchpad now works fully (the fix is actually in the latest linux-mainline kernel, yay!) and I'm pretty damn happy with the OS, but the wireless driver (I assume it is the driver) still has the same issue. I have tried everything and have been searching for a solution for hours.

My card is a BCM43142 802.11b/g/n, which is only supported by the `wl` driver (explicitly unsupported by the b43 driver). I'm using connman for managing my connections, but I have the same issue with NetworkManager and netctl. After resuming, the interface still shows up, and I can get it up, but it refuses to scan for networks and to connect to any network; it also remains locked in a "DORMANT" state, and I have no idea how to "wake it up" from that state. Some people can get the WiFi working again after unloading and loading the `wl` driver, but that doesn't even work for me; neither does restarting `connman` or setting the wireless card up and down with `ip`. Only rebooting the PC will get the wireless working again. Here's a list of the things I've tried:

1. Manually unloading the driver before the suspend, with `rmmod wl`, and loading it after I resume the computer with `modprobe`
2. Setting up a script that does what I mentioned above automatically, located in `/usr/lib/systemd/system-sleep` (unloads before suspend, loads after resuming).
3. After resuming, unloading/loading the driver, restarting connman with `systemctl restart connman`, changing the wireless card mode to down/up with `ip link set wlo1 down` and `ip link set wlo1 up`.
4. Turning off the power saving mode of the card, with `iw`.

The only thing that makes WiFi work again is rebooting the laptop. I have no idea what is wrong, but some scan errors do show up after resuming back the system.

`dmesg` entries:

          [ 1361.405095] ERROR @wl_cfg80211_scan : WLC_SCAN error (-22)
          [ 1364.777275] r8169 0000:09:00.0 eno1: link down
          [ 1364.777424] IPv6: ADDRCONF(NETDEV_UP): eno1: link is not ready
          [ 1364.816971] ERROR @wl_cfg80211_scan : WLC_SCAN error (-22)
          [ 1368.402182] ERROR @wl_cfg80211_scan : WLC_SCAN error (-22)
          [ 1377.405229] ERROR @wl_cfg80211_scan : WLC_SCAN error (-22)
          [ 1382.840890] ERROR @wl_cfg80211_scan : WLC_SCAN error (-22)
          [ 1385.811064] ERROR @wl_dev_intvar_get : error (-1)
          [ 1385.811074] ERROR @wl_cfg80211_get_tx_power : error (-1)
          [ 1386.400388] ERROR @wl_cfg80211_scan : WLC_SCAN error (-22)
          [ 1395.400607] ERROR @wl_cfg80211_scan : WLC_SCAN error (-22)
          [ 1422.427725] ERROR @wl_cfg80211_scan : WLC_SCAN error (-22)

`iwconfig` after resuming (when WiFi is dead):

wlo1      IEEE 802.11  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=200 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power management:off

`iw wlo1 info` after resuming:

	ifindex 7
	wdev 0x1
	addr c4:6d:42:e7:12:d5
	type managed
	wiphy 0
	txpower 200.00 dBm

`ip a` after resuming (okay, I cheated on this one because I didn't want to mess my WiFi just to the the output of the command. it's pretty much the same as when it is working, from what I remember, except that the state is DORMANT, eno1 is also down by default, but I can put it back on):

2: eno1: <NO-CARRIER,BROADCAST,MULTICAST,DYNAMIC,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether brd ff:ff:ff:ff:ff:ff
3: wlo1: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc fq_codel state DORMANT group default qlen 1000
    link/ether brd ff:ff:ff:ff:ff:ff
    inet  brd 192.168.1.255 scope global wlo1
       valid_lft forever preferred_lft forever
    inet6  scope link 
       valid_lft forever preferred_lft forever

This is what happens after reloading the driver, post-suspend:

[ 1418.077497] wlan0: Broadcom BCM4365 802.11 Hybrid Wireless Controller 6.30.223.271 (r587334)
[ 1418.078310] wl 0000:08:00.0 wlo1: renamed from wlan0
[ 1418.147662] ERROR @wl_cfg80211_scan : WLC_SCAN error (-22)
[ 1421.711306] ERROR @wl_cfg80211_scan : WLC_SCAN error (-22)
[ 1430.718045] ERROR @wl_cfg80211_scan : WLC_SCAN error (-22)

And now those commands when the wireless is working

`iw wlo1 info`:

Interface wlo1
	ifindex 7
	wdev 0x1
	addr c4:6d:42:e7:12:d5
	ssid MYESSID
	type managed
	wiphy 0

`iwconfig`:

wlo1      IEEE 802.11  ESSID:"MYESSID"  
          Mode:Managed  Frequency:2.462 GHz  Access Point: B2:B0:D0:42:54:E3   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off

`ip a`:

7: wlo1: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether  c4:6d:42:e7:12:d5 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.23/24 brd 192.168.1.255 scope global wlo1
       valid_lft forever preferred_lft forever
    inet6 de44::da44:f5df:def1:4d6/43 scope link 
       valid_lft forever preferred_lft forever

I've been trying to find out what's wrong and if there's anything I can do to fix this, but I can't get no satisfaction and I'm now going slightly mad.

Do you have any clue on what else I can try or what could be going wrong?

Thanks.

Offline

#2 2016-07-21 19:06:20

ProtonBeam
Member
Registered: 2016-07-21
Posts: 2

Re: Yet another "BCM WiFi doesn't work after suspending my laptop" thread

I think I might have an idea. Perhaps if I:

1. Stop connman and wpa_supplicant
2. Unload the wireless driver module
3. Remove the PCI WiFi device from /sys/bus/pci/devices/${DEVICE} with the `remove` file contained within, by writing 1 to it. (echo "1" > /sys/bus/pci/devices/${DEVICE}/remove)

...before suspending, I can guarantee that the wireless device remains untouched by the suspend mechanism, and so whatever it does to it doesn't occur? (Although I'm not sure if writing "1" to "remove" actually physically turns the device off).

When I resume the laptop, I then can reenable connman and wpa_supplicant, the driver, and rescan for PCI devices with

echo "1" > /sys/bus/pci/rescan

Seems like a good plan?

The thing is that somehow, the resume mechanism is reactivating the wl module and rescaning for PCI devices automatically, so the error still happens. I have to find a way to stop this behaviour, but I don't have much of a clue... Any ideas? I know I can write scripts in system-sleep, but the sleep/resume mechanism seems to be doing much more by itself, and I'm not sure where I can configure that, so I can stop it from reloading the wl module and rescaning for PCI devices automatically.

Edit: Well, I can't find any way to configure what goes on with the suspend mechanism... from what I read, that is up to the kernel. Is there any way at all I can prevent it from touching the WiFi's PCI state and the driver module? Does that even make sense?

Last edited by ProtonBeam (2016-07-21 20:10:00)

Offline

#3 2016-08-30 17:32:54

uj-x52
Member
Registered: 2012-06-04
Posts: 2

Re: Yet another "BCM WiFi doesn't work after suspending my laptop" thread

Anyone have any thoughts on this?  I have the exact same issue with a new HP Pavilion laptop.  Everything works fine except the wireless which dies after the laptop comes back from suspend mode.  Same as ProtonBeam, my card is a BCM43142 802.11b/g/n, which is only supported by the `wl` driver.  I've been down all the same roads as ProtonBeam with the same results.  Any help would be greatly appreciated.

Offline

#4 2016-08-30 17:43:02

Jiaan
Member
From: China
Registered: 2016-08-07
Posts: 16
Website

Re: Yet another "BCM WiFi doesn't work after suspending my laptop" thread

I had the same issue on my Dell XPS 13 9350. After suspension, I have to manually bring the interface down and up again in order to get wireless card to fuction. I belive a possible solution would be writing a systemd configuration file to explicitly do so at wake up. But in reality  I "solved" the problem by replacing the broadcom chip with an intel chip.

Offline

#5 2016-09-27 08:08:51

EchoJoe
Member
Registered: 2016-09-27
Posts: 11

Re: Yet another "BCM WiFi doesn't work after suspending my laptop" thread

Same here, Just started maybe a month ago. after suspending the WiFi won't connect to any AP, it says password incorrect until I reboot. Do you guys think is the actual card?

Edit:

This fixed the problem for me

Package:     networkmanager   
version: 1.4.2-1
Description: Network connection manager and user applications
Update: 2016-10-01

Last edited by EchoJoe (2016-10-05 04:24:33)

Offline

Board footer

Powered by FluxBB