Score:0

kernel 6 Freeze with Broadcom 4313

gf flag

Ubuntu 23.04 hard freezes with 1-2 min of using wifi. I tried the proprietary driver broadcom-sta-dkms suggested by ubuntu but it didn't solve the issue. I'd had the exact same problem with any distribution with kernel 6 (like Fedora). Any thoughts on how to solve the problem?

Output of lspci -nn | grep Broadcom

05:00.0 Network controller [0280]: Broadcom Inc. and subsidiaries BCM4313 802.11bgn Wireless Network Adapter [14e4:4727] (rev 01)
chili555 avatar
cn flag
*broadcom-sta-dkms* is not correct for your device. Please check here: https://askubuntu.com/questions/55868/installing-broadcom-wireless-drivers/60395#60395 Welcome to Ask Ubuntu.
Arash Jahdkaran avatar
gf flag
Thank you for your response. I did the steps as stated. installed both BCM43 and linux firmwware on a fresh install of ubuntu 23.04. But the issue still persists. Somtimes even on the ubuntu loading logo the OS freezes. the only way to use the OS is to disable Wifi card at the moment. Any other hints would be appreciated.
chili555 avatar
cn flag
Is *b43* trying to load? `lsmod | grep b43` Can you post the message log? http://paste.ubuntu.com `sudo dmesg`
Arash Jahdkaran avatar
gf flag
The output of `lsmod` : [link](https://pastebin.ubuntu.com/p/JWJygRTm4j/) And the `dmesg`: [link](https://pastebin.ubuntu.com/p/2XS3ksgFB2/)
Arash Jahdkaran avatar
gf flag
As soon as the kernel got updated to version 6 on fedora the problem arised. Came to ubuntu, again just as I updated to 23.04 which has kernel 6.2 I see the issue again. Tried clean installation without driver and both b43 and proprietary driver. Also the proprietary which ubuntu suggests seems to have problems compiling I found these patches [link](https://www.linuxquestions.org/questions/slackware-14/new-set-of-patches-for-broadcom-sta-on-kernel-version-6-a-4175720677/#post6403193) on arch for Linux 6.0 and 6.1 but nothing for 6.2. Doesn't it seem to be kernel problem rather than driver?
Score:0
cn flag

I believe that the best working driver for your 14e4:4727 Broadcom is bcmwl-kernel-source, instead of brcmsmac or b43 and firmware. Let's install it and see if there is any improvement:

sudo apt update
sudo apt install bcmwl-kernel-source

Reboot and tell us if there is any improvement.

EDIT: You have shown that bcmwl-kernel-source does not work. Let's try brcmsmac:

sudo -i
apt purge bcmwl-kernel-source
echo "blacklist b43" >>  /etc/modprobe.d/blacklist.conf
echo "blacklist ssb" >>  /etc/modprobe.d/blacklist.conf
exit

Reboot. Is there any improvement?

Arash Jahdkaran avatar
gf flag
Unfortunately that didn't help. Found [this bug](https://bugs.launchpad.net/ubuntu/+source/bcmwl/+bug/1999009) on ubuntu. But the solution doesn't affect current lunar kernel version. After installing the driver, the wifi is not detected by Ubuntu.
Arash Jahdkaran avatar
gf flag
I've decided to switch to lts. But before that if you think I can report the bug somewhere or you have any other suggestions. I would appreciate your guidance.
chili555 avatar
cn flag
Please see my suggestion in an edit above in a few moments.
Arash Jahdkaran avatar
gf flag
Unfortunately, No improvement. Unlike the bcmwl driver now the wifi is detected but system freezes. the output of lsmod: [link](https://pastebin.ubuntu.com/p/4w2fmCwv5R/) and the output of dmesg: [link](https://pastebin.ubuntu.com/p/qMnCWgRwDQ/)
chili555 avatar
cn flag
From your *dmesg* paste, I don't see anything with regard to the wireless that throws an error or even a warning. I see numerous ACPI errors, an ACPI BIOS Error and this interesting message: unchecked MSR access error: WRMSR to 0x19c Please see the bug report here: https://bugs.launchpad.net/ubuntu/+source/linux-signed/+bug/1959721 I doubt that the Broadcom wireless has anything at all to do with the freezes.
Score:0
gf flag

Following the clues I found this bug reported to kernel. The reporter had the same issue as me which is recognized as a kernel regression problem.

Solution has already been suggested by arch developers to kernel.

As stated in the discussion:

There are some codepaths that do not initialize rx->link_sta properly. This causes a crash in places which assume that rx->link_sta is valid if rx->sta is valid. One known instance is triggered by __ieee80211_rx_h_amsdu being called from fast-rx. It results in a crash

I couldn't verify this on ubuntu since it has kernel 6.2 but the patch works on mainline 6.1 kernel.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.