Closed arun-gurung closed 4 years ago
@arun-gurung what OS and kernel are you using? Did you blacklist the modules mentioned in the README? Can you provide a kernel crash dump?
I'm on CentOS 7.3 with kernel 4.11.2-1.el7.elrepo.x86_64
. I blacklisted the mentioned modules. I deleted "wl.ko" from /lib/modules and now my system is up again. I don't know how to provide a kernel crash dump.
In some cases journalctl
may display kernel related errors.
Regarding the crash dump you can take a look at https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Kernel_Crash_Dump_Guide/chap-introduction-to-kdump.html
Unfortunately without logs I can't tell you much about what may be going on. If you built from the current patch-linux4.7
branch (with commit 358ee38a) and are running on an x86_64 architecture you should be good to go.
I downloaded the .zip file and compiled it from there. I will try to install the driver again and provide a kernel crash dump later.
Here`s the output of journalctl: journalctl.txt
I see no crash in this dump, only device (wlp0s20u2u4): Activation: successful, device activated
so your WiFi is up, right?
Yes, the system detects the Wifi card, but when I try to connect to a network, the system freezes.
But you are connected. Your SSID is "TT22U24" and your IP address is "192.168.1.13".
mai 24 17:21:43 macbook-air kernel: wlp0s20u2u4: send auth to 4c:9e:ff:90:bf:70 (try 1/3)
mai 24 17:21:43 macbook-air NetworkManager[953]: <info> [1495639303.9803] device (wlp0s20u2u4): supplicant interface state: inactive -> authenticating
mai 24 17:21:43 macbook-air kernel: wlp0s20u2u4: authenticated
mai 24 17:21:43 macbook-air kernel: wlp0s20u2u4: associate with 4c:9e:ff:90:bf:70 (try 1/3)
mai 24 17:21:43 macbook-air systemd[1]: Started System Logging Service.
mai 24 17:21:43 macbook-air NetworkManager[953]: <info> [1495639303.9872] device (wlp0s20u2u4): supplicant interface state: authenticating -> associating
mai 24 17:21:43 macbook-air kernel: wlp0s20u2u4: RX AssocResp from 4c:9e:ff:90:bf:70 (capab=0x431 status=0 aid=4)
mai 24 17:21:43 macbook-air kernel: wlp0s20u2u4: associated
mai 24 17:21:43 macbook-air kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wlp0s20u2u4: link becomes ready
[...]
mai 24 17:21:47 macbook-air NetworkManager[953]: <info> [1495639307.9612] dhcp4 (wlp0s20u2u4): activation: beginning transaction (timeout in 45 seconds)
mai 24 17:21:48 macbook-air NetworkManager[953]: <info> [1495639308.1158] dhcp4 (wlp0s20u2u4): dhclient started with pid 2416
mai 24 17:21:49 macbook-air dhclient[2416]: DHCPREQUEST on wlp0s20u2u4 to 255.255.255.255 port 67 (xid=0x25457847)
mai 24 17:21:49 macbook-air dhclient[2416]: DHCPACK from 192.168.1.254 (xid=0x25457847)
mai 24 17:21:49 macbook-air NetworkManager[953]: <info> [1495639309.5265] dhcp4 (wlp0s20u2u4): address 192.168.1.13
mai 24 17:21:49 macbook-air NetworkManager[953]: <info> [1495639309.5267] dhcp4 (wlp0s20u2u4): plen 24 (255.255.255.0)
mai 24 17:21:49 macbook-air NetworkManager[953]: <info> [1495639309.5267] dhcp4 (wlp0s20u2u4): gateway 192.168.1.254
mai 24 17:21:49 macbook-air NetworkManager[953]: <info> [1495639309.5267] dhcp4 (wlp0s20u2u4): server identifier 192.168.1.254
mai 24 17:21:49 macbook-air NetworkManager[953]: <info> [1495639309.5267] dhcp4 (wlp0s20u2u4): lease time 86400
mai 24 17:21:49 macbook-air NetworkManager[953]: <info> [1495639309.5267] dhcp4 (wlp0s20u2u4): nameserver '192.168.1.254'
mai 24 17:21:49 macbook-air NetworkManager[953]: <info> [1495639309.5267] dhcp4 (wlp0s20u2u4): domain name 'zyxel.localhost'
mai 24 17:21:49 macbook-air NetworkManager[953]: <info> [1495639309.5267] dhcp4 (wlp0s20u2u4): state changed unknown -> bound
mai 24 17:21:49 macbook-air NetworkManager[953]: <info> [1495639309.5281] device (wlp0s20u2u4): state change: ip-config -> ip-check (reason 'none') [70 80 0]
mai 24 17:21:49 macbook-air avahi-daemon[864]: Joining mDNS multicast group on interface wlp0s20u2u4.IPv4 with address 192.168.1.13.
mai 24 17:21:49 macbook-air avahi-daemon[864]: New relevant interface wlp0s20u2u4.IPv4 for mDNS.
mai 24 17:21:49 macbook-air avahi-daemon[864]: Registering new address record for 192.168.1.13 on wlp0s20u2u4.IPv4.
mai 24 17:21:49 macbook-air dhclient[2416]: bound to 192.168.1.13 -- renewal in 39978 seconds.
mai 24 17:21:49 macbook-air NetworkManager[953]: <info> [1495639309.5313] device (wlp0s20u2u4): state change: ip-check -> secondaries (reason 'none') [80 90 0]
mai 24 17:21:49 macbook-air NetworkManager[953]: <info> [1495639309.5316] device (wlp0s20u2u4): state change: secondaries -> activated (reason 'none') [90 100 0]
The problem must occur later, once again without any crash log I am clueless.
Can you please show me the result of:
~ $ lspci | grep -i broadcom
I reinstalled CentOS as my primary system on my Macbook Air and installed kernel 4.11.2 and reinstalled your driver and it all seems to work properly now.
[root@macbook-air ~]# lspci | grep -i broadcom 02:00.0 Multimedia controller: Broadcom Limited 720p FaceTime HD Camera 03:00.0 Network controller: Broadcom Limited BCM4360 802.11ac Wireless Network Adapter (rev 03) [root@macbook-air ~]#
Great, good job :) Hopefully I can make Linux work on my MacBook Air some day too.
My Macbook Air is from June 2015. Linux should work nicely on it, I have almost all my hardware working now.
The module has started freezing my system again, so I deleted wl.ko and it works again. I will try to provide a kernel crash dump when I got figured out how to do it.
@arun-gurung I finally got a chance to test the Linux kernel 4.11 on my Linux machine for a prolonged period of time and it's been rock stable so far after every reboot.
How does it look on your side?
I have reinstalled and my system works properly now running kernel 4.11.2. I haven't tested your driver again yet, but I will test it in a while. I hope everything works this time, so I don't have to use my dongle anymore.
I'm sad to say that I tried the module again and it still hangs my system. I cannot simply use it. I don't know how to provide a kernel crash dump yet. But thanks for the effort.
Thank you, I will try the kmod-wl package soon.
The weird thing is that the driver works with Linux 3.10.
Can confirms this happens on gentoo livecd as of current date when building wl and performing any network activity. I'm on a macbook air mid 2013.
Bad news: I tried with kernel 4.14 and it still freezes. Thanks for making the patch to compile the Makefile, but I believe the problem is with the closed source driver from Broadcom, because it works fine with kernel 3.10. I will send a message to Broadcom and see what they say.
Works for me on Linux 4.13 x86_64. ~Linux 4.14 requires another patch. I'll commit it soon.~
I will try your next patch.
Do you have a theory why it works on kernel 3.10, but not with 4.x?
@arun-gurung I can confirm the module works without extra patching on Linux 4.14.3. Your issue seems to be specific to the Macbook hardware but without a crash dump I can unfortunately not emit any theory.
F.Y.I. I have the same WiFi chip as you do:
01:00.0 Network controller: Broadcom Limited BCM4360 802.11ac Wireless Network Adapter (rev 03)
I too have been busy, so I have no crashdump. And sending a message to Broadcom is pointless, because my WLAN chip doesn't freeze the system with kernel 3.10. Ergo, the software bug is in the 4.x wl.ko module (I think). Or at least somewhere in the Linux software, not by Broadcom. Just a theory, isn't it a wrapper around the driver or something?
I couldn't tell without any logs unfortunately. I'm using this module as we speak, every day, on an ever up-to-date kernel.
Are you absolutely sure it is WiFi related? Did you blacklist the modules mentioned in the README?
Yes, I'm 97% sure it's the wl.ko module. If you are able to use it with Linux 4.x, maybe I just have a hardware error but not likely because the WLAN chip works with Linux 3.10 and on MacOS.
The answer you're looking for is in the kernel crash dump :) Plain and simple.
OK, it's alright. I`ll see later about a crashdump, thanks. :-)
Still no kernel crash dump from me, but I updated to kernel 4.15 and now your patched module has been stable for several hours, so I am now very content and can finally ditch my USB wi-fi dongle. Congratulations on a job well done to the developers. :-D
That's encouraging! Hope you're not celebrating too fast 😆
Still not freezing after 24 hours, now. Thank you, Antoine!
Edit: I didn't lie on purpose, but it's been ca. 24 hours. I had only one crash when suspending the power by closing the laptop lid, so it's not the fault of the broadcom-wl module. I have now turned off the suspending when I'm not on battery power.
Well, now the module started freezing again after updating to kernel 4.16.x.
I am sorry, having a hard time creating a kernel crash dump. I have configured it and it looks like it's set up, but I get no "vmcore" only a text file, like this and this is the messages I got in the terminal right before it hangs. vmcore-dmesg.txt
Looks like the rtl8812au
module for your Realtek Wifi dongle crashed before wl
. Could you try blacklisting it for the time being? (see README)
It didnt` help with blacklisting the rtl8811au.
I went back to kernel 4.15.9-1 and now it seems stable again.
@antoineco @arun-gurung I figured I'd offer my experience. I had been experiencing freezes on Alpine Linux using this driver with kernel 4.19.80 and BCM4331. I didn't investigate it very far, but I'd usually see kernel panic and soft lockup messages before going down. I knew I had been using this driver version from Debian/Ubuntu for a while without this sort of problem on the same hardware. So, I went through the source available here in the patch-linux4.7 branch comparing it to all the Debian patches being used. If I remember correctly, I added in 6 commits from 6 Debian patches missing in this source. Since then, the driver has been working fine for me.
@ktb83 thanks, that's some useful feedback 👍 I'll check the differences with the Debian package. Did you push your changes somewhere by any chance?
@antoineco I have not published the code, it's still just on my local machine here. I'll do a quick check on the commits I added.
@antoineco These are the Debian patches I added in from broadcom-sta_6.30.223.271-11.debian.tar.xz: 03-rename-to-wlan0.patch 04-user_ioctl.patch 05-remove-time-and-date-macros.patch 06-broadcom-sta-6.30.223.248-linux-3.18-null-pointer-crash.patch 07-rdtscl.patch 08-linux47.patch
@antoineco Here are the commits -- https://github.com/ktb83/broadcom-wl/commits/patch-linux5.1
If you want, I can submit a pull request.
I have emigrated from CentOS to Manjaro. The module still freezes my system. It sounds good with these patches, but how can I download them and apply them?
Thanks @ktb83, I cherry-picked the commits from your branch and changed the commit messages to point to their original bug reports.
@arun-gurung could you please try building the module from the extra-patches
branch?
$ git fetch
$ git checkout extra-patches
Thanks, but programming is over my head and all I can do is use "git clone". I need somebody to hold my hand, please.
$ git fetch fatal: not a git repository (or any parent up to mount point /) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
$ git checkout extra-patches fatal: not a git repository (or any parent up to mount point /) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
You have to execute this inside the repository, after performing a git clone
(which you should already have done since you already built the driver).
Oh, yes.
My system used to freeze only seconds after loading the driver. Now it's been stable for 15 minutes. I hope this is a good present for the season and I can ditch my USB dongle. Merry Christmas!
Good to hear! Merry Christmas to you too 🙌
I can compiled and install the module successfully, but it freezes my system. So far, after several reboots, I have come so long as to select network before it again freezes.