NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.19k stars 14.19k forks source link

Broadcom STA driver scan always returns 0 wireless networks #39151

Open colehaus opened 6 years ago

colehaus commented 6 years ago

Issue description

My BCM4359 wireless card worked fine on NixOS 17.09. When I upgraded to NixOS 18.03, it stopped working. In particular, the way it failed to work is that despite the device appearing healthy, no rfkill blocks etc, scans (via wicd, iw and iwlist) always returned zero wireless networks.

More interesting is that reverting to the previous working configuration by selecting an old entry in the GRUB boot menu did not fix the problem.

After much fiddling, the only workaround I could find was to abandon the broadcom STA drivers and use the b43 drivers. That entailed setting networking.enableB43Firmware = true in /etc/nixos/configuration.nix and adding "b43" as a kernel module in /etc/nixos/hardware-configuration.nix.

Logs and other data

dmesg:

[  649.410190] ERROR @wl_notify_scan_status : 
[  649.410192] wlp2s0 Scan_results error (-22)
[ 1504.890387] ERROR @wl_notify_scan_status : 
[ 1504.890389] wlp2s0 Scan_results error (-22)
[ 1504.895270] ERROR @wl_cfg80211_detach : 
[ 1504.895273] NULL ndev->ieee80211ptr, unable to deref wl
 1525.370345] ERROR @wl_notify_scan_status : 
[ 1525.370348] wlp2s0 Scan_results error (-22)
[ 1530.375852] ERROR @wl_cfg80211_scan : 
[ 1530.375855] WLC_SCAN error (-22)
[ 1531.377117] ERROR @wl_cfg80211_scan : 
[ 1531.377121] WLC_SCAN error (-22)
[ 1532.378500] ERROR @wl_cfg80211_scan : 
[ 1532.378503] WLC_SCAN error (-22)

(Unfortunately, I can't guarantee that those are "clean" errors. They may have occurred when I was fiddling with other kernel modules via modprobe.)

uname -r:

4.14.34

modinfo wl

filename:       /run/current-system/kernel-modules/lib/modules/4.14.34/kernel/net/wireless/wl.ko
license:        MIXED/Proprietary
license:        MIXED/Proprietary
alias:          pci:v*d*sv*sd*bc02sc80i*
depends:        cfg80211
retpoline:      Y
name:           wl
vermagic:       4.14.34 SMP mod_unload 
parm:           passivemode:int
parm:           wl_txq_thresh:int
parm:           oneonly:int
parm:           piomode:int
parm:           instance_base:int
parm:           nompc:int
parm:           intf_name:string

nix-info -m:

 - system: `"x86_64-linux"`
 - host os: `Linux 4.14.34, NixOS, 18.03.132021.c0c5571ec1a (Impala)`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.0`
 - channels(root): `"nixos-18.03.132021.c0c5571ec1a"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs`
colehaus commented 6 years ago

Strangest piece of all: Just after posting this, I reverted my configuration changes to using broadcom_sta again, rebooted (certainly not the first time) and find that my wireless card works even with these drivers now!

To summarize the overall sequence:

dtzWill commented 6 years ago

Very curious. I don't have a lot to offer in terms of resolving it but this reminds me of some behavior I encountered long ago trying to get my wireless working with Linux:

At least on the hardware I had, a "soft" reboot from Windows to Linux would preserve the firmware written by the Windows driver-- which if you, from Linux after such a soft reboot, dumped to a file you could use to make the Linux driver work.

While you are only on Linux, perhaps a similar phenomenon could be at play here? Does performing a hard reboot change behavior regarding using broadcom_sta? (idea being that perhaps the b43 drivers' firmware persisted or something?)

Just a thought and apologies if I got my details wrong, it was quite a long time ago xD.

teto commented 5 years ago

I am in a similar situation. Broadcom drivers would generate errors in dmesg and could not connect to some APs (while working on others). I ended up using the open source b43 driver which now connects fine but from times to times "lose the connection" (not sure what happens but I dont get any new info) so I have to force a reconnect.

stale[bot] commented 4 years ago

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.