bcmwl kernel module does not build with kernel version 5.6 or 5.8

Bug #1872908 reported by Vincent Gerris
316
This bug affects 76 people
Affects Status Importance Assigned to Milestone
bcmwl (Ubuntu)
Fix Released
Medium
Alberto Milone
Focal
Fix Released
Medium
Brian Murray

Bug Description

After kernel update to 5.6.0-1007-oem wifi stopped working.
Turned out dkms is unable to build the bcmwl module.

The make log shows:

ubuntu@ubuntu-inspiron-5482:~$ cat /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/make.log
DKMS make.log for bcmwl-6.30.223.271+bdcom for kernel 5.6.0-1007-oem (x86_64)
ons 15 apr 2020 09:19:05 CEST
make: Entering directory '/usr/src/linux-headers-5.6.0-1007-oem'
CFG80211 API is prefered for this kernel version
Using CFG80211 API
  AR /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/built-in.a
  CC [M] /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/shared/linux_osl.o
  CC [M] /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.o
  CC [M] /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_iw.o
  CC [M] /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_cfg80211_hybrid.o
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/shared/linux_osl.c: In function ‘osl_reg_map’:
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/shared/linux_osl.c:949:10: error: implicit declaration of function ‘ioremap_nocache’; did you mean ‘ioremap_cache’? [-Werror=implicit-function-declaration]
  949 | return (ioremap_nocache((unsigned long)pa, (unsigned long)size));
      | ^~~~~~~~~~~~~~~
      | ioremap_cache
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/shared/linux_osl.c:949:10: warning: returning ‘int’ from a function with return type ‘void *’ makes pointer from integer without a cast [-Wint-conversion]
  949 | return (ioremap_nocache((unsigned long)pa, (unsigned long)size));
      | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_cfg80211_hybrid.c:40:
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_cfg80211_hybrid.c: In function ‘wl_set_auth_type’:
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_cfg80211_hybrid.h:52:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
   52 | if (wl_dbg_level & WL_DBG_DBG) { \
      | ^
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_cfg80211_hybrid.c:816:3: note: in expansion of macro ‘WL_DBG’
  816 | WL_DBG(("network eap\n"));
      | ^~~~~~
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_cfg80211_hybrid.c:817:2: note: here
  817 | default:
      | ^~~~~~~
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c: In function ‘wl_attach’:
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c:593:20: error: implicit declaration of function ‘ioremap_nocache’; did you mean ‘ioremap_cache’? [-Werror=implicit-function-declaration]
  593 | if ((wl->regsva = ioremap_nocache(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
      | ^~~~~~~~~~~~~~~
      | ioremap_cache
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c:593:18: warning: assignment to ‘void *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  593 | if ((wl->regsva = ioremap_nocache(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
      | ^
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c: In function ‘wl_pci_probe’:
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c:780:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  780 | if ((val & 0x0000ff00) != 0)
      | ^~
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c:782:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  782 | bar1_size = pci_resource_len(pdev, 2);
      | ^~~~~~~~~
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c:783:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  783 | bar1_addr = (uchar *)ioremap_nocache(pci_resource_start(pdev, 2),
      | ^
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c: In function ‘wl_reg_proc_entry’:
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c:3376:58: error: passing argument 4 of ‘proc_create_data’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 3376 | if ((wl->proc_entry = proc_create_data(tmp, 0644, NULL, &wl_fops, wl)) == NULL) {
      | ^~~~~~~~
      | |
      | const struct file_operations *
In file included from /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c:38:
./include/linux/proc_fs.h:59:31: note: expected ‘const struct proc_ops *’ but argument is of type ‘const struct file_operations *’
   59 | extern struct proc_dir_entry *proc_create_data(const char *, umode_t,
      | ^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:275: /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/shared/linux_osl.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from ./include/linux/bitmap.h:9,
                 from ./include/linux/cpumask.h:12,
                 from ./arch/x86/include/asm/cpumask.h:5,
                 from ./arch/x86/include/asm/msr.h:11,
                 from ./arch/x86/include/asm/processor.h:22,
                 from ./arch/x86/include/asm/cpufeature.h:5,
                 from ./arch/x86/include/asm/thread_info.h:53,
                 from ./include/linux/thread_info.h:38,
                 from ./arch/x86/include/asm/preempt.h:7,
                 from ./include/linux/preempt.h:78,
                 from ./include/linux/spinlock.h:51,
                 from ./include/linux/seqlock.h:36,
                 from ./include/linux/time.h:6,
                 from ./include/linux/stat.h:19,
                 from ./include/linux/module.h:13,
                 from /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/include/linuxver.h:40,
                 from /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c:27:
In function ‘strncpy’,
    inlined from ‘_wl_add_monitor_if’ at /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c:2980:2:
./include/linux/string.h:284:9: warning: ‘__builtin_strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
  284 | return __builtin_strncpy(p, q, size);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c: In function ‘_wl_add_monitor_if’:
./include/linux/string.h:305:10: note: length computed here
  305 | return __builtin_strlen(p);
      | ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:275: /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.o] Error 1
make: *** [Makefile:1695: /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build] Error 2
make: Leaving directory '/usr/src/linux-headers-5.6.0-1007-oem'

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: bcmwl-kernel-source 6.30.223.271+bdcom-0ubuntu5
ProcVersionSignature: Ubuntu 5.6.0-1007.7-oem 5.6.2
Uname: Linux 5.6.0-1007-oem x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu26
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
Date: Wed Apr 15 09:21:58 2020
InstallationDate: Installed on 2019-12-17 (119 days ago)
InstallationMedia: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
SourcePackage: bcmwl
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Vincent Gerris (vgerris) wrote :
Revision history for this message
Vincent Gerris (vgerris) wrote :

other info:
ubuntu@ubuntu-inspiron-5482:~$ dkms status
bcmwl, 6.30.223.271+bdcom, 5.3.0-26-generic, x86_64: installed
bcmwl, 6.30.223.271+bdcom, 5.3.0-40-generic, x86_64: installed
bcmwl, 6.30.223.271+bdcom, 5.4.0-1002-oem, x86_64: installed
bcmwl, 6.30.223.271+bdcom, 5.4.0-21-generic, x86_64: installedError! Could not locate dkms.conf file.
File: /var/lib/dkms/evdi/5.2.14/source/dkms.conf does not exist.

evdi, 1.6.0+dfsg, 5.4.0-1002-oem, x86_64: built

The hardware is a Dell DW1560.

Tried to reinstall with:
sudo dkms install bcmwl/6.30.223.271+bdcom

which gave above output.

Revision history for this message
satmandu (satadru-umich) wrote :
Revision history for this message
satmandu (satadru-umich) wrote :

So until the package gets updated do this:

Add this line to /usr/src/bcmwl-6.30.223.271+bdcom/dkms.conf

PATCH[13]="0028-add-support-for-Linux-5.6.patch"

Save the patch at https://bugs.launchpad.net/ubuntu/+source/bcmwl/+bug/1872908/+attachment/5356260/+files/broadcom-wl-dkms-arch-patch as this file:

/usr/src/bcmwl-6.30.223.271+bdcom/patches/0028-add-support-for-Linux-5.6.patch

then do this:

sudo dkms install bcmwl/6.30.223.271+bdcom -k all

(this appears to work for 5.7-rc1 too.)

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in bcmwl (Ubuntu):
status: New → Confirmed
Revision history for this message
Vincent Gerris (vgerris) wrote :

Thank you for the workaround and the patch.
I tested this and got :

ubuntu@ubuntu-inspiron-5482:~$ sudo dkms install bcmwl/6.30.223.271+bdcom -k all
Error! Your kernel headers for kernel all cannot be found.
Please install the linux-headers-all package,
or use the --kernelsourcedir option to tell DKMS where it's located

Then I did :
sudo apt install --reinstall linux-headers-5.6.0-1007-oem
(because I didn't know the location)
and it worked.

Does anyone know where the patch can be applied to?
I will ping the maintainer I had contact with in the past for Ubuntu so I hope this can be merged soon.

Thanks a lot for your contribution !

Changed in bcmwl (Ubuntu):
assignee: nobody → Alberto Milone (albertomilone)
Changed in bcmwl (Ubuntu Focal):
status: New → Triaged
Changed in bcmwl (Ubuntu):
status: Confirmed → In Progress
importance: Undecided → Medium
Changed in bcmwl (Ubuntu Focal):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bcmwl - 6.30.223.271+bdcom-0ubuntu6

---------------
bcmwl (6.30.223.271+bdcom-0ubuntu6) groovy; urgency=medium

  * debian/dkms.conf.in,
    debian/patches/0028-add-support-for-linux-5.6.patch (LP: #1872908):
    - Add support for Linux 5.6.

 -- Alberto Milone <email address hidden> Mon, 04 May 2020 13:23:19 +0200

Changed in bcmwl (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
aradapilot (aradapilot) wrote :

I see in packaged.ubuntu this is only available for groovy by default, will it be backported to focal at least?
Be nice to have it from a regular repo, for those of us who are constantly booting with different kernels

Revision history for this message
satmandu (satadru-umich) wrote :

The patch in 6.30.223.271+bdcom-0ubuntu6 doesn't appear to work when installed on focal:

sudo dpkg -i bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu6_amd64.deb
(Reading database ... 170331 files and directories currently installed.)
Preparing to unpack bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu6_amd64.deb ...
Removing all DKMS Modules
Done.
Unpacking bcmwl-kernel-source (6.30.223.271+bdcom-0ubuntu6) over (6.30.223.271+bdcom-0ubuntu6) ...
Setting up bcmwl-kernel-source (6.30.223.271+bdcom-0ubuntu6) ...
Loading new bcmwl-6.30.223.271+bdcom DKMS files...
Building for 5.4.0-31-generic
Building for architecture x86_64
Building initial module for 5.4.0-31-generic
Error! Application of patch 0028-add-support-for-linux-5.6.patch failed.
Check /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/ for more information.
dpkg: error processing package bcmwl-kernel-source (--install):
 installed bcmwl-kernel-source package post-installation script subprocess returned error exit status 6
Errors were encountered while processing:
 bcmwl-kernel-source

Revision history for this message
John Scott (fyrbrds) wrote :

Used the patch link and instructions above for 5.6.13. Worked like a charm. Thanks satmandu.

Revision history for this message
Russ Burghorn (alienwar) wrote :

Used patch for 5.7.1-050701-generic it worked , thanks for helping out!

Revision history for this message
Stephen Gornick (sgornick) wrote :

Should this patch work on 5.8.0-34-generic as well? See bug #1907445.

Mathew Hodson (mhodson)
summary: - bcmwl kernel module does not build with 5.6.0 kernel
+ bcmwl kernel module does not build with 5.6.0 kernel or later
Revision history for this message
satmandu (satadru-umich) wrote : Re: bcmwl kernel module does not build with 5.6.0 kernel or later
Revision history for this message
ZdravkoG (zdravko-g) wrote :

Isn't more pragmatic before considering changes introduced with kernel 5.9, a backport to Focal be commited/released in advance (the kernel there is 5.8)? 🧐😉 There is a proposal presented in Bug #1910555 comment 21! 🤔 This Bug is related to kernel 5.6. New package changes (new patch) related to recent kernel changes might (better) be a object of new "bug". Isn't it?

Revision history for this message
Mike Beaton (mjsbeaton) wrote :

There is a fix given by Rakhmanov Nemon (iamcoderman) in duplicate bug #1910995 which has worked for a bunch of people (including me):

---

download the package here: https://launchpad.net/ubuntu/+archive/primary/+files/bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu7_amd64.deb

Open a Terminal (Ctrl+Alt+T)

enter this on terminal:
cd Downloads/
sudo dpkg -i bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu7_amd64.deb

that's all:)

Revision history for this message
Viking (viking82) wrote :

Latest update brought the bug back. No wifi again. @Rakhmanov solution worked earlier for me but things again got messy with latest kernel upgrades.

Changed in bcmwl (Ubuntu Focal):
assignee: nobody → Brian Murray (brian-murray)
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Vincent, or anyone else affected,

Accepted bcmwl into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/bcmwl/6.30.223.271+bdcom-0ubuntu7~20.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in bcmwl (Ubuntu Focal):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-focal
Mathew Hodson (mhodson)
summary: - bcmwl kernel module does not build with 5.6.0 kernel or later
+ bcmwl kernel module does not build with kernel version 5.6 or 5.8
Revision history for this message
ZdravkoG (zdravko-g) wrote :

Installing the new package:
--------------------------------------------------
Подготовка за разпакетиране на bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu7~20.04.1_amd64.deb ...
Removing all DKMS Modules
Done.
Разпакетиране на bcmwl-kernel-source (6.30.223.271+bdcom-0ubuntu7~20.04.1) над (6.30.223.271+bdcom-0ubuntu7) ...
Инсталиране на bcmwl-kernel-source (6.30.223.271+bdcom-0ubuntu7~20.04.1) ...
Loading new bcmwl-6.30.223.271+bdcom DKMS files...
Building for 5.8.0-41-generic
Building for architecture x86_64
Building initial module for 5.8.0-41-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-41-generic/updates/dkms/

depmod...

DKMS: install completed.
update-initramfs: deferring update (trigger activated)
Обработка на тригерите за initramfs-tools (0.136ubuntu6.3) ...
update-initramfs: Generating /boot/initrd.img-5.8.0-41-generic
--------------------------------------------------
Everything works.

tags: added: verification-done-focal
removed: verification-needed-focal
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bcmwl - 6.30.223.271+bdcom-0ubuntu7~20.04.1

---------------
bcmwl (6.30.223.271+bdcom-0ubuntu7~20.04.1) focal; urgency=medium

  * debian/dkms.conf.in,
    debian/patches/0028-add-support-for-linux-5.6.patch (LP: #1872908):
    - Add support for Linux 5.6.

 -- Alberto Milone <email address hidden> Mon, 04 May 2020 13:23:19 +0200

Changed in bcmwl (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for bcmwl has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Changed in bcmwl (Ubuntu Focal):
milestone: none → ubuntu-20.04.2
Mathew Hodson (mhodson)
tags: removed: verification-needed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.