Driver build error on kernel 5.8, but works on 5.4

Bug #1910555 reported by ZdravkoG
152
This bug affects 31 people
Affects Status Importance Assigned to Milestone
bcmwl (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Recently kernel was updated on Focal from 5.4 to 5.8. From that moment on WiFi doesn't work anymore. After a try rebuild (reconfigure) the result is:
---------------------------------------------------
# dpkg-reconfigure bcmwl-kernel-source
Removing all DKMS Modules
Done.
Loading new bcmwl-6.30.223.271+bdcom DKMS files...
Building for 5.4.0-59-generic 5.8.0-34-generic
Building for architecture x86_64
Building initial module for 5.4.0-59-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-59-generic/updates/dkms/

depmod................

DKMS: install completed.
Building initial module for 5.8.0-34-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/bcmwl-kernel-source.0.crash'
Error! Bad return status for module build on kernel: 5.8.0-34-generic (x86_64)
Consult /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/make.log for more information.
---------------------------------------------------
As could be seen, the build for 5.4 completes successfully (and works on same kernel), but for 5.8 fails. Seems something is going wrong with missing function declaration - function "ioremap_nocache", as could be seen in attached make.log.
I'm guessing, driver code may need be updated according to the new kernel headers.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: bcmwl-kernel-source 6.30.223.271+bdcom-0ubuntu5
ProcVersionSignature: Ubuntu 5.4.0-59.65-generic 5.4.78
Uname: Linux 5.4.0-59-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.20.11-0ubuntu27.14
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: KDE
Date: Thu Jan 7 17:13:05 2021
InstallationDate: Installed on 2020-06-22 (198 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
SourcePackage: bcmwl
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
ZdravkoG (zdravko-g) wrote :
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
mikey (abc-mikey) wrote :

Also affecting me

Revision history for this message
mikey (abc-mikey) wrote :

this honestly looks like a simple case of warnings now being treated as errors. I can't imagine this is a sane thing to do for 3rd party code. Any fix soon?

Revision history for this message
ZdravkoG (zdravko-g) wrote :

@milkey, Did you see all patches for adaptation to appropriate previous kernel changes? Broadcom haven't updated provided code for more than 10 years. If you think that "looks like a simple case of warnings now being treated as errors", just add one more patch to already existing set. 😉
Good luck... to all of us!

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

Here are a couple workarounds I've seen:

A.) Uninstall bcmwl and install broadcom-sta packages, if your Broadcom wifi adapter can use it:
https://bugs.launchpad.net/ubuntu/+source/bcmwl/+bug/1906745/comments/1
or
https://bugs.launchpad.net/ubuntu/+source/bcmwl/+bug/1907445/comments/8

B.) Use patch 6.30.223.271+bdcom-0ubuntu7 and purge kernel 5.8. [I don't think purging 5.8 kernel is something I would do, but wanted to list it as one workaround.]
https://askubuntu.com/a/1305819/157287

Revision history for this message
ZdravkoG (zdravko-g) wrote :

Seems Canonical have solved this inconsistency, but forgot release update! Kernel changes, discussed here, gets came up in version 5.6 of the kernel and are represented in the last versions of bcmwl-kernel-source (6.30.223.271+bdcom-0ubuntu7). The only difference between 6.30.223.271+bdcom-0ubuntu5 and 6.30.223.271+bdcom-0ubuntu7 is the patch dealing with corresponding changes (/usr/src/bcmwl-6.30.223.271+bdcom/patches/0028-add-support-for-linux-5.6.patch), the one I mentioned before that have to be added (seems already done). The actual bug here is newer kernel letting in mainstream (5.8 > 5.6), without corresponding driver package version. Final solution will be simple enough - just adding latest bcmwl-kernel-source to Focal repository. I just installed it and:
---------------------------------------------------
#dpkg -i bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu7_amd64.deb
(Четене на базата данни ... 547141 файла или папки в момента са инсталирани.)
Подготовка за разпакетиране на bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu7_amd64.deb ...
Removing all DKMS Modules
Done.
Разпакетиране на bcmwl-kernel-source (6.30.223.271+bdcom-0ubuntu7) над (6.30.223.271+bdcom-0ubuntu5) ...
Инсталиране на bcmwl-kernel-source (6.30.223.271+bdcom-0ubuntu7) ...
Loading new bcmwl-6.30.223.271+bdcom DKMS files...
Building for 5.4.0-60-generic 5.8.0-36-generic
Building for architecture x86_64
Building initial module for 5.4.0-60-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-60-generic/updates/dkms/

depmod...

DKMS: install completed.
Building initial module for 5.8.0-36-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-36-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-36-generic
---------------------------------------------------
...everything works perfectly fine. 😉
Canonical should be careful to releases all drivers packages no later then kernel (at least in future)! 👆
PROBLEM SOLVED.

Revision history for this message
mikey (abc-mikey) wrote :

problem not solved until Canonical actually fix it.

Revision history for this message
Jeremy David Sarka (jsarka) wrote :

I had the same problem and submitted it as Bug #1910875. I didn't see this bug at first because I got a slightly different error message ("post-installation script subprocess returned error exit status 10"). But it's definitely the same bug and installing the 6.30.223.271+bdcom-0ubuntu7 version of bcmwl-kernel-source worked for me. So in one sense this bug has already been patched, but I would say that the real bug is that the patch didn't get included in the focal repository.

Revision history for this message
Dani Hilfe (hilfe) wrote :

Same here, from last update of kernel (5.4 to 5.8) the controller for BCM4352 doesnt't work. I fix it reinstalling the package bcmwl-kernel-source from http://mirrors.kernel.org/ubuntu/pool/restricted/b/bcmwl/bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu7_amd64.deb

Hope future updates will be fixed.

Revision history for this message
khaled waleed abdallah (khaleddev94) wrote :

same here and unfortunately i had to re install ubutnu and not update it :|

Revision history for this message
Jochen Roddewig (jroddewig) wrote :

Same on a MacBook Pro: After updating including Package bcmwl-kernel-source 6.30.223.271+bdcom-0ubuntu5 the wlan chipset is ignored. Before that it works fine. Now i took 18.4 LTS on the MacBook. It works fine.

Revision history for this message
kosson (kosson) wrote :

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

Worked its magic for me. Thank you all.

Revision history for this message
Estifan (epanosian) wrote :

Worked for me. Thanks.

Revision history for this message
Phil (skrapshak) wrote :

When I run kosson's command, I get an error:

dpkg: error: cannot access archive 'bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu7_amd64.deb': No such file or directory

Revision history for this message
ZdravkoG (zdravko-g) wrote :

@skrapshak, Did you put the driver package in your current working directory in advance?! 🤔 Seems, not! The error message is expressive enough.
You can download the package here: https://launchpad.net/ubuntu/+archive/primary/+files/bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu7_amd64.deb and find a way to put it in your directory or point the place explicitly, not just by name (whatever is more convenient for you). 😉
If needed, download on another device and transfer on the target device using alternative link (Bluetooth or flash stick for example).

Revision history for this message
emilio veneziani (apollo55) wrote :

Great. Worked for me. Thanks.

Revision history for this message
Phil (skrapshak) wrote :

Thanks @ZdravkoG

After re-installing Ubuntu, I was able to get the package onto the device using a USB stick.
I then updated Ubuntu, and then installed the package from my Downloads folder.

However, upon reboot, I'm now taken to the GRUB boot menu. From there, it is hit or miss on whether or not the laptop actually boots to the desktop, no matter what options that I choose.

I'm just going to re-install Ubuntu from scratch and use this laptop as I had been before the latest update. I'm too new with Ubuntu, and would like to spend some time working with a working version.

I truly appreciate your assistance. Thanks!

Revision history for this message
Verlaine Patrice (quinzeohm) wrote :

Cher, ZdravkoG (zdravko-g).

Merci beaucoup!
Avant de lire ceci j'ai réinstaller Ubuntu 4 fois. :)
Mais avec les conseilles prodiguée par toi , je peux de nouveau me connecter sur mon réseau Wifi.
Un Grand merci.

Дорогой,ZdravkoG (zdravko-g).

Большое спасибо!
Перед тем, как прочитать это, я переустанавливал Убунту 4 раза. :)
Но, по вашему совету, я могу снова подключиться к своей Wi-Fi сети.
Большое спасибо.

Andy Whitcroft (apw)
tags: added: kqa-blocker
Revision history for this message
ZdravkoG (zdravko-g) wrote :

Let's hope somebody managing the package from Canonical, will take care for attached patch (actually backport) to be applied on Focal's fork. 👍🤞 So, no future confusions - everything automatic update!

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "bcmwl_6.30.223.271+bdcom-0ubuntu5_6.30.223.271+bdcom-0ubuntu7~20.04.1.diff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
CarlosGVaso (carlosgvaso) wrote :

Same problem for a BCM4360 card.

Revision history for this message
Jarle Land (gullmund) wrote :

Same problem with BCM43227

Revision history for this message
Marvin Schin (supernoob3000) wrote :

Same problem with BCM43228
I tried generic kernels 5.10. and 5.11. as well, but same same !

Revision history for this message
ZdravkoG (zdravko-g) wrote :

Hi @supernoob3000,
The discussion here is related to kernel version up to 5.8! In kernel 5.9 are additional changes affecting the driver, which needs to be added additional patch for. That's why presented solution here works up to kernel 5.8 (i.e. in 5.6 to 5.8 interval). For kernel 5.9 and up, you have to add one more patch yourself or wait for such to be added.

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.