Skip to content
wordpress meta

title: 'Linux Broadcom Wireless Issue 5.x kernel'
date: '2020-10-29T09:46:43-05:00'
status: publish
permalink: /linux-broadcom-wireless-issue-5-x-kernel
author: admin
excerpt: ''
type: post
id: 1689
category:
    - Linux
    - Wireless
tag: []
post_format: []

Broadcom Wireless Issue

Recent update caused wireless to stop working. Seems like PopOS (20.04 flavor and likely other distros) does not have a new enough bcmwl-kernel-source for 5.6 or 5.8 kernels.

LINKS:

NOTE: I tried to install a different kernel to see if that will work but that showed me the issue at least.

root cause

```bash

apt install linux-image-5.8.0-23-generic

... make -j4 KERNELRELEASE=5.8.0-23-generic -C /lib/modules/5.8.0-23-generic/build M=/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build....(bad exit status: 2) ERROR (dkms apport): kernel package linux-headers-5.8.0-23-generic is not supported Error! Bad return status for module build on kernel: 5.8.0-23-generic (x86_64) Consult /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/make.log for more information. ````

hold a kernel that works just for safety

```bash

dpkg -l | grep linux-image-

ii linux-image-5.4.0-7642-generic 5.4.0-7642.46~1598628707~20.04~040157c amd64 Linux kernel image for version 5.4.0 on 64 bit x86 SMP ii linux-image-5.8.0-23-generic 5.8.0-23.24~20.04.1 amd64 Signed kernel image generic ii linux-image-5.8.0-7625-generic 5.8.0-7625.26~1603389471~20.04~f6b125f amd64 Linux kernel image for version 5.8.0 on 64 bit x86 SMP ii linux-image-generic 5.8.0.7625.26~1603389471~20.04~f6b125f amd64 Generic Linux kernel image

echo linux-image-5.4.0-7642-generic hold | dpkg --set-selections

dpkg -l | grep linux-image-

hi linux-image-5.4.0-7642-generic 5.4.0-7642.46~1598628707~20.04~040157c amd64 Linux kernel image for version 5.4.0 on 64 bit x86 SMP ii linux-image-5.8.0-23-generic 5.8.0-23.24~20.04.1 amd64 Signed kernel image generic ii linux-image-5.8.0-7625-generic 5.8.0-7625.26~1603389471~20.04~f6b125f amd64 Linux kernel image for version 5.8.0 on 64 bit x86 SMP ii linux-image-generic 5.8.0.7625.26~1603389471~20.04~f6b125f amd64 Generic Linux kernel image ````

NOTE: set grub with longer timeout, show the boot menu and save last booted item

patches

Looking at the patches it appears we may need 0028? or something for newer than 5.1 kernels?

```bash

ls /usr/src/bcmwl-6.30.223.271+bdcom/patches/

0001-MODULE_LICENSE.patch 0008-add-support-for-linux-3.9.0.patch 0015-add-support-for-Linux-3.18.patch 0022-add-support-for-Linux-4.8.patch 0002-Makefile.patch 0009-add-support-for-linux-3.10.0.patch 0016-repair-make-warnings.patch 0023-add-support-for-Linux-4.11.patch 0003-Make-up-for-missing-init_MUTEX.patch 0010-change-the-network-interface-name-from-eth-to-wlan.patch 0017-add-support-for-Linux-4.0.patch 0024-add-support-for-Linux-4.12.patch 0004-Add-support-for-Linux-3.2.patch 0011-do-not-define-devinit-as-__init-in-linux-3.8-as-.patch 0018-cfg80211_disconnected.patch 0025-add-support-for-Linux-4.14.patch 0005-add-support-for-linux-3.4.0.patch 0012-add-support-for-Linux-3.15.patch 0019-broadcom-sta-6.30.223.248-3.18-null-pointer-fix.patch 0026-add-support-for-Linux-4.15.patch 0006-add-support-for-linux-3.8.0.patch 0013-gcc.patch 0020-add-support-for-linux-4.3.patch 0027-add-support-for-linux-5.1.patch 0007-nl80211-move-scan-API-to-wdev.patch 0014-add-support-for-Linux-3.17.patch 0021-add-support-for-Linux-4.7.patch ````

Install Ubuntu 20.10 (groovy) package

Looking at the file list in the newer Ubuntu 20.10 source I see at least a 5.6 patch although I need 5.8.

```bash

wget http://mirrors.kernel.org/ubuntu/pool/restricted/b/bcmwl/bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu7_amd64.deb

... 2020-10-29 08:14:10 (656 KB/s) - ‘bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu7_amd64.deb’ saved [1545816/1545816]

dpkg -i bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu7_amd64.deb

(Reading database ... 283701 files and directories currently installed.) Preparing to unpack bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu7_amd64.deb ... Removing all DKMS Modules Done. Unpacking bcmwl-kernel-source (6.30.223.271+bdcom-0ubuntu7) over (6.30.223.271+bdcom-0ubuntu5) ... Setting up bcmwl-kernel-source (6.30.223.271+bdcom-0ubuntu7) ... Loading new bcmwl-6.30.223.271+bdcom DKMS files... Building for 5.4.0-7642-generic 5.8.0-7625-generic Building for architecture x86_64 Building initial module for 5.4.0-7642-generic Done.

wl.ko: Running module version sanity check. - Original module - No original module exists within this kernel - Installation - Installing to /lib/modules/5.4.0-7642-generic/updates/

depmod...

DKMS: install completed. Building initial module for 5.8.0-7625-generic Done.

wl.ko: Running module version sanity check. - Original module - No original module exists within this kernel - Installation - Installing to /lib/modules/5.8.0-7625-generic/updates/

depmod........

DKMS: install completed. update-initramfs: deferring update (trigger activated) Processing triggers for initramfs-tools (0.136ubuntu6.3) ... update-initramfs: Generating /boot/initrd.img-5.8.0-7625-generic cryptsetup: WARNING: Resume target cryptswap uses a key file ````

looks like rebuild wl.ko ok

```bash

ls /lib/modules/5.8.0-7625-generic/updates/

dkms wl.ko

find /lib/modules/5.4.0-7642-generic/ -name wl.ko

/lib/modules/5.4.0-7642-generic/updates/wl.ko

find /lib/modules/5.8.0- -name wl.ko

5.8.0-23-generic/ 5.8.0-7625-generic/

find /lib/modules/5.8.0-23-generic/ -name wl.ko

find /lib/modules/5.8.0-7625-generic/ -name wl.ko

/lib/modules/5.8.0-7625-generic/updates/wl.ko ````

cleanup the 5.8.0-23 kernel I tried

```bash

apt purge linux-image-5.8.0-23-generic

... rmdir: failed to remove '/lib/modules/5.8.0-23-generic': Directory not empty

NOTE: PopOS may not be cleaning up /lib/modules because of the additional module.

rm -rf /lib/modules/5.8.0-23-generic

apt purge linux-headers-5.8.0-23-generic

apt purge linux-modules-5.8.0-23-generic

ls /boot

config-5.4.0-7642-generic grub initrd.img-5.4.0-7642-generic initrd.img.old System.map-5.8.0-7625-generic vmlinuz-5.4.0-7642-generic vmlinuz.old config-5.8.0-7625-generic initrd.img initrd.img-5.8.0-7625-generic System.map-5.4.0-7642-generic vmlinuz vmlinuz-5.8.0-7625-generic ````

check

Rebooted with 5.8 kernel and it works

```bash

dkms status

bcmwl, 6.30.223.271+bdcom, 5.4.0-7642-generic, x86_64: installed bcmwl, 6.30.223.271+bdcom, 5.8.0-7625-generic, x86_64: installed nvidia-340, 340.108, 5.4.0-7642-generic, x86_64: installed system76, 1.0.9~1597073326~20.04~5b01933, 5.4.0-7642-generic, x86_64: installed system76, 1.0.9~1597073326~20.04~5b01933, 5.8.0-7625-generic, x86_64: installed ````