You are not logged in.

#1 2018-12-01 21:36:31

elParaguayo
Member
Registered: 2018-03-30
Posts: 49

XPS13 (9350) - No WiFi after resuming from suspend - BCM4350

I wasn't sure whether to post this in the Newbie Corner or here. I've been running Arch on this laptop for a while now and have, on the whole, managed to fix issued when I've come across them but this one's got me beaten.

I've noticed an issue where, after resuming, the wifi on my laptop stops working. It doesn't happen every time, but I've noticed it happening much more regularly in the last few weeks.

Some information about my system:

$ uname -a
Linux arch-laptop 4.19.4-arch1-1-ARCH #1 SMP PREEMPT Fri Nov 23 09:06:58 UTC 2018 x86_64 GNU/Linux

My wifi card:

$ sudo lspcia -v
3a:00.0 Network controller: Broadcom Inc. and subsidiaries BCM4350 802.11ac Wireless Network Adapter (rev 08)
	Subsystem: Dell BCM4350 802.11ac Wireless Network Adapter
	Flags: bus master, fast devsel, latency 0, IRQ 132
	Memory at dc400000 (64-bit, non-prefetchable) [size=32K]
	Memory at dc000000 (64-bit, non-prefetchable) [size=4M]
	Capabilities: [48] Power Management version 3
	Capabilities: [58] MSI: Enable+ Count=1/16 Maskable- 64bit+
	Capabilities: [68] Vendor Specific Information: Len=44 <?>
	Capabilities: [ac] Express Endpoint, MSI 00
	Capabilities: [100] Advanced Error Reporting
	Capabilities: [13c] Device Serial Number 00-00-28-ff-ff-b5-c8-ff
	Capabilities: [150] Power Budgeting <?>
	Capabilities: [160] Virtual Channel
	Capabilities: [1b0] Latency Tolerance Reporting
	Capabilities: [220] Resizable BAR <?>
	Capabilities: [240] L1 PM Substates
	Kernel driver in use: brcmfmac
	Kernel modules: brcmfmac

My understanding is that this driver is provided by the kernel so I haven't installed a separate driver. However dmesg (see link below) seems to include lines like this:

[    3.327220] brcmfmac 0000:3a:00.0: Direct firmware load for brcm/brcmfmac4350-pcie.clm_blob failed with error -2

A post of dmesg can be seen here: https://ptpb.pw/Ntgz

The bits that seem interesting are 1965 (reference to suspend) onwards. Lots of stuff about brcmfmac at 2011. There are a lot of references to "commonring":

[ 2150.271343] brcmfmac: brcmf_cfg80211_get_station: GET STA INFO failed, -12
[ 2151.801181] brcmfmac: brcmf_msgbuf_tx_ioctl: Failed to reserve space in commonring
[ 2151.801279] brcmfmac: brcmf_msgbuf_tx_ioctl: Failed to reserve space in commonring

I'd be very grateful for any assistance in getting to the bottom of this and can provide any additional information as required.


EDIT: I'm not sure this is restricted to resumes. The wifi just dropped again.

I've seen this thread (https://bbs.archlinux.org/viewtopic.php?id=230349) and, while the symptoms are very similar, this was over a year ago and my problems have only started very recently so I wonder if a bug has crept into the kernel.

Trying to remove and reload the brcmfmac module doesn't seem to work either. Restarting the machine is the only thing that's working at the moment.

Last edited by elParaguayo (2018-12-01 22:05:26)

Offline

#2 2018-12-01 22:09:36

okubax
Member
From: Kent, UK.
Registered: 2010-04-24
Posts: 210
Website

Re: XPS13 (9350) - No WiFi after resuming from suspend - BCM4350

Someone on here with same error msg as yours said unloading and then loading the module works. You can try that and see if it helps.

You can do that by running in a terminal:

sudo modprobe -r brcmfmac

& then

sudo modprobe brcmfmac

Offline

#3 2018-12-01 22:12:15

elParaguayo
Member
Registered: 2018-03-30
Posts: 49

Re: XPS13 (9350) - No WiFi after resuming from suspend - BCM4350

Thanks okubax.

Yes, I've seen that post. Unfortunately that solution didn't work for me and actually caused some issue that then prevented me from shutting down the laptop.

If the driver is provided by linux-firmware, is it worth downgrading this to see if that fixes the problem? Please excuse the question, but can I downgrade the firmware independently of kernel updates?

Offline

#4 2018-12-03 19:39:46

perioecus
Member
Registered: 2018-12-03
Posts: 2

Re: XPS13 (9350) - No WiFi after resuming from suspend - BCM4350

Same problem here:

Last good kernel:

# uname -a
Linux hostname-redacted 4.18.16-arch1-1-ARCH #1 SMP PREEMPT Sat Oct 20 22:06:45 UTC 2018 x86_64 GNU/Linux

NIC:

# lspci | grep -i broadcom
3a:00.0 Network controller: Broadcom Inc. and subsidiaries BCM4350 802.11ac Wireless Network Adapter (rev 08)

Works for awhile then breaks on 4.19.2.arch1-1 (same issues on 4.19.4.arch1-1):

# journalctl
Nov 19 23:56:35 hostname-redacted kernel: brcmfmac: brcmf_cfg80211_get_station: GET STA INFO failed, -5
Nov 19 23:56:37 hostname-redacted kernel: brcmfmac: brcmf_msgbuf_query_dcmd: Timeout on response for query command
Nov 19 23:56:37 hostname-redacted kernel: brcmfmac: brcmf_msgbuf_tx_ioctl: Failed to reserve space in commonring

Fix suggested to be (https://superuser.com/questions/1268499 … nsupported) confirming you and okubax:

sudo modprobe -r brcmfmac ; sudo modprobe brcmfmac

But nic won't reappear after this and restart fails.

Works without crashing on linux-4.18.16, but have same firmware issues as yours:

# journalctl -k | grep -i brcmfmac
Dec 03 13:36:19 hostname-redacted kernel: usbcore: registered new interface driver brcmfmac
Dec 03 13:36:19 hostname-redacted kernel: brcmfmac 0000:3a:00.0: enabling device (0000 -> 0002)
Dec 03 13:36:19 hostname-redacted kernel: brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4350-pcie for chip BCM4350/8
Dec 03 13:36:19 hostname-redacted kernel: brcmfmac 0000:3a:00.0: Direct firmware load for brcm/brcmfmac4350-pcie.txt failed with error -2
Dec 03 13:36:20 hostname-redacted kernel: brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4350-pcie for chip BCM4350/8
Dec 03 13:36:20 hostname-redacted kernel: brcmfmac 0000:3a:00.0: Direct firmware load for brcm/brcmfmac4350-pcie.clm_blob failed with error -2
Dec 03 13:36:20 hostname-redacted kernel: brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available
Dec 03 13:36:20 hostname-redacted kernel: brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4350/8 wl0: Oct 22 2015 06:16:26 version 7.35.180.119 (r594535) FWID 01-e791c176
Dec 03 13:36:20 hostname-redacted kernel: brcmfmac 0000:3a:00.0 wlp58s0: renamed from wlan0

Last edited by perioecus (2018-12-03 19:47:04)

Offline

#5 2018-12-03 19:57:47

perioecus
Member
Registered: 2018-12-03
Posts: 2

Re: XPS13 (9350) - No WiFi after resuming from suspend - BCM4350

Might be interested in following this related issue (links in last post are relevant as well):

https://bugs.archlinux.org/task/60832

And a new bug report upstream:

https://bugzilla.kernel.org/show_bug.cgi?id=201853

Last edited by perioecus (2018-12-03 20:04:26)

Offline

#6 2018-12-13 16:53:46

Nisstyre56
Member
From: Canada
Registered: 2010-03-25
Posts: 85

Re: XPS13 (9350) - No WiFi after resuming from suspend - BCM4350

Hey, so I am also having this issue. With some troubleshooting help, I have seemingly narrowed it down to power management.

The reasoning is that the "commonring" is used to handle reading/writing packets (from my simplistic understanding), and then something goes wrong with power management on the card itself which causes this buffer to reach capacity or something causes it to never release a lock on the structure.

You can see the exact function I'm referring to here https://github.com/torvalds/linux/blob/ … buf.c#L420

So this locks up the entire device and preventing networking from working at all. This is just my hypothesis not knowing a lot about how networking drivers usually work.

The way I "solved" this was by disabling power management. I usually have this issue after a few hours or less of running my laptop, and it's been running for almost 2 days now straight without any issues.

I have this systemd unit that runs after the networking stack is up:

[Unit]
Description=Disable WiFi Power Management
After=network-online.target

[Service]
Type=simple
ExecStartPre= /bin/sleep 10
ExecStart= /usr/bin/iw dev wlp3s0 set power_save off

[Install]
WantedBy=multi-user.target

Replace "wlp3s0" with the name of the device you are having issues with. The call to /bin/sleep may or may not be necessary, but it's there to make sure the device really is up before trying to disable PM on it.

Edit:

Also, to tie it into resuming from suspend, I'm guessing that also messes with power management as well since it would be trying to bring the device out of power saving mode. Perhaps that triggers the issue somehow, or maybe it's just a coincidence.

Last edited by Nisstyre56 (2018-12-13 17:03:43)


In Zen they say: If something is boring after two minutes, try it for four. If still boring, try it for eight, sixteen, thirty-two, and so on. Eventually one discovers that it's not boring at all but very interesting.
~ John Cage

Offline

#7 2019-01-04 19:24:46

markJT
Member
Registered: 2018-10-18
Posts: 13

Re: XPS13 (9350) - No WiFi after resuming from suspend - BCM4350

Glad to have found this thread, after having had the issue for some weeks now (also Dell XPS 13 9350). Disabling power management seems to be preventing it, for now:

iw dev wlp58s0 set power_save off

Offline

#8 2019-02-03 11:36:13

wingsuit
Member
Registered: 2013-05-18
Posts: 12

Re: XPS13 (9350) - No WiFi after resuming from suspend - BCM4350

markJT wrote:

Glad to have found this thread, after having had the issue for some weeks now (also Dell XPS 13 9350). Disabling power management seems to be preventing it, for now:

iw dev wlp58s0 set power_save off

Is this a one time thing or do we need to execute this every startup?

(XPS 9350 broadcom wifi)

Offline

#9 2019-02-03 15:46:22

ondoho
Member
Registered: 2013-04-30
Posts: 692
Website

Re: XPS13 (9350) - No WiFi after resuming from suspend - BCM4350

pretty sure this can be added to /etc/modprobe.d/   or /etc/modules-load.d/ (never quite sure which one, but archwiki might have the answer)
not verbatim though.
or maybe i'm completely wrong, these search results look very different.

Offline

#10 2019-02-03 16:31:56

markJT
Member
Registered: 2018-10-18
Posts: 13

Re: XPS13 (9350) - No WiFi after resuming from suspend - BCM4350

wingsuit wrote:
markJT wrote:

Glad to have found this thread, after having had the issue for some weeks now (also Dell XPS 13 9350). Disabling power management seems to be preventing it, for now:

iw dev wlp58s0 set power_save off

Is this a one time thing or do we need to execute this every startup?

(XPS 9350 broadcom wifi)

Unfortunately, in the end this didn't appear to solve the problem for me permanently. I continue to experience the issue.

dmesg -l err reads:

[   15.972250] brcmfmac 0000:3a:00.0: Direct firmware load for brcm/brcmfmac4350-pcie.txt failed with error -2
[   16.436414] brcmfmac 0000:3a:00.0: Direct firmware load for brcm/brcmfmac4350-pcie.clm_blob failed with error -2

journalctl -xe | grep brcmfmac:

xps kernel: brcmfmac: _brcmf_set_multicast_list: Setting allmulti failed, -12
xps kernel: brcmfmac: brcmf_msgbuf_tx_ioctl: Failed to reserve space in commonring
xps kernel: brcmfmac: _brcmf_set_multicast_list: Setting BRCMF_C_SET_PROMISC failed, -12
xps kernel: brcmfmac: brcmf_msgbuf_tx_ioctl: Failed to reserve space in commonring
xps kernel: brcmfmac: brcmf_msgbuf_tx_ioctl: Failed to reserve space in commonring

lspci -vnn:

3a:00.0 Network controller [0280]: Broadcom Inc. and subsidiaries BCM4350 802.11ac Wireless Network Adapter [14e4:43a3] (rev 08)
Subsystem: Dell BCM4350 802.11ac Wireless Network Adapter [1028:0021]

The Linux Wireless site seems to suggest that my particular interface isn't yet supported, queued for a future version:

PCIe devices
Chipset     PCI Device ID 	Notes
BCM4350 	14e4:43a3 	Queued for 4.4+ 

Anyone had luck with a more permanent fix until support?

Offline

#11 2019-02-03 17:37:31

Nisstyre56
Member
From: Canada
Registered: 2010-03-25
Posts: 85

Re: XPS13 (9350) - No WiFi after resuming from suspend - BCM4350

wingsuit wrote:
markJT wrote:

Glad to have found this thread, after having had the issue for some weeks now (also Dell XPS 13 9350). Disabling power management seems to be preventing it, for now:

iw dev wlp58s0 set power_save off

Is this a one time thing or do we need to execute this every startup?

(XPS 9350 broadcom wifi)

You need to do it every time the network interface is brought up. That's why I wrote a systemd unit (see above) to execute it every time the network is up. You might have something else re-enabling power management as well, but at least on my machine it seemed to work.


In Zen they say: If something is boring after two minutes, try it for four. If still boring, try it for eight, sixteen, thirty-two, and so on. Eventually one discovers that it's not boring at all but very interesting.
~ John Cage

Offline

#12 2019-02-05 16:12:01

markJT
Member
Registered: 2018-10-18
Posts: 13

Re: XPS13 (9350) - No WiFi after resuming from suspend - BCM4350

Nisstyre56 wrote:
wingsuit wrote:
markJT wrote:

Glad to have found this thread, after having had the issue for some weeks now (also Dell XPS 13 9350). Disabling power management seems to be preventing it, for now:

iw dev wlp58s0 set power_save off

Is this a one time thing or do we need to execute this every startup?

(XPS 9350 broadcom wifi)

You need to do it every time the network interface is brought up. That's why I wrote a systemd unit (see above) to execute it every time the network is up. You might have something else re-enabling power management as well, but at least on my machine it seemed to work.

Thanks so much - I must admit I didn't fully understand the systemd unit file above, so wasn't 100% sure whether to implement it. Gave it a shot and it seems to have solved the issue for me. A journal scan for brcmfmac now shows the same errors but not continually, only on startup, after which I imagine the unit file is triggered(?) and all seems fine after that. Thanks so much - the WiFi dropping out, with only really a reboot to fix, was really starting to grate on me.

Offline

#13 2019-02-05 19:50:24

Nisstyre56
Member
From: Canada
Registered: 2010-03-25
Posts: 85

Re: XPS13 (9350) - No WiFi after resuming from suspend - BCM4350

markJT wrote:

Thanks so much - I must admit I didn't fully understand the systemd unit file above, so wasn't 100% sure whether to implement it. Gave it a shot and it seems to have solved the issue for me. A journal scan for brcmfmac now shows the same errors but not continually, only on startup, after which I imagine the unit file is triggered(?) and all seems fine after that. Thanks so much - the WiFi dropping out, with only really a reboot to fix, was really starting to grate on me.

No problem! It's really only supposed to be a temporary workaround, but it looks like this might take a while to get a fix. I'm guessing the driver has to deal with buggy hardware. Actually the first reason I suspected power management is because it's known to be a buggy area of a lot of wireless hardware apparently.

If you start to notice issues again, I would check to see if something changed in the kernel. Currently I'm on `4.20.6-arch1-1-ARCH`, you can see the changelogs here https://cdn.kernel.org/pub/linux/kernel … Log-4.20.6

Edit: I think we might also need to add a unit that does it after resuming from suspend, which was the initial issue. I don't usually put my laptop into suspend mode, but it does look like it re-enables it after coming out of suspend.

Something like this should work

[Unit]
Description=Disable WiFi Power Management
After=suspend.target

[Service]
Type=simple
ExecStartPre= /bin/sleep 10
ExecStart= /usr/bin/iw dev wlp3s0 set power_save off

[Install]
WantedBy=suspend.target

Last edited by Nisstyre56 (2019-02-05 20:04:36)


In Zen they say: If something is boring after two minutes, try it for four. If still boring, try it for eight, sixteen, thirty-two, and so on. Eventually one discovers that it's not boring at all but very interesting.
~ John Cage

Offline

Board footer

Powered by FluxBB