1

Had several issues with my wireless card.

After a reboot (i think after a kernel update) I could not see the network card in Network settings, but could see it using lspci.

Followed this guide Installing Broadcom Wireless Drivers

which suggests for my PCI.ID - 14e4:4331 (rev 02):

sudo apt install firmware-b43-installer

sudo apt install linux-firmware

which seems to have worked partially. Wifi works but only the 2.4GHz channel.

So I also tried the bcmwl-kernel-source.

It looks like the issue is with the bcmwl-kernel-source not compiling correctly on the latest kernel 5.8.0-7630-generic. (Get similar results when trying to install from 'Additional Drivers'):

administrator@ub-mbp:~$ sudo apt install bcmwl-kernel-source
[sudo] password for administrator: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  bcmwl-kernel-source
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/1,544 kB of archives.
After this operation, 8,068 kB of additional disk space will be used.
Selecting previously unselected package bcmwl-kernel-source.
(Reading database ... 401485 files and directories currently installed.)
Preparing to unpack .../bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu5_amd64.deb ...
Unpacking bcmwl-kernel-source (6.30.223.271+bdcom-0ubuntu5) ...
Setting up bcmwl-kernel-source (6.30.223.271+bdcom-0ubuntu5) ...
Loading new bcmwl-6.30.223.271+bdcom DKMS files...
Building for 5.8.0-7630-generic
Building for architecture x86_64
Building initial module for 5.8.0-7630-generic
ERROR (dkms apport): kernel package linux-headers-5.8.0-7630-generic is not supported
Error! Bad return status for module build on kernel: 5.8.0-7630-generic (x86_64)
Consult /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/make.log for more informati
on.
dpkg: error processing package bcmwl-kernel-source (--configure):
 installed bcmwl-kernel-source package post-installation script subprocess retur
ned error exit status 10
Errors were encountered while processing:
 bcmwl-kernel-source
E: Sub-process /usr/bin/dpkg returned an error code (1)

output of /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.8.0-7630-generic (x86_64)
Wed 06 Jan 2021 06:51:22 PM EST
make: Entering directory '/usr/src/linux-headers-5.8.0-7630-generic'
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));
      |         ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:288: /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/shared/linux_osl.o] Error 1
make[1]: *** Waiting for unfinished jobs....
/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),
      |               ^
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_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:102:31: note: expected ‘const struct proc_ops *’ but argument is of type ‘const struct file_operations *’
  102 | extern struct proc_dir_entry *proc_create_data(const char *, umode_t,
      |                               ^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:288: /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.o] Error 1
make: *** [Makefile:1780: /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build] Error 2
make: Leaving directory '/usr/src/linux-headers-5.8.0-7630-generic'

Anyway to fix this on this kernel?

Here is the results of lshw -class network if helpful:

*-network
       description: Wireless interface
       product: BCM4331 802.11a/b/g/n
       vendor: Broadcom Inc. and subsidiaries
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: wlp3s0b1
       version: 02
       serial: e0:f8:47:00:dd:02
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=b43 driverversion=5.8.0-7630-generic firmware=666.2 ip=192.168.0.54 latency=0 link=yes multicast=yes wireless=IEEE 802.11
       resources: irq:17 memory:a0600000-a0603fff
  • That seems to be true. It is not compiling. You an download and install bcmwl-krnel-source for 20.10. It will compile. But installing a wrong driver is not a good idea. – Pilot6 Jan 07 '21 at 13:10

3 Answers3

3

As a temporary fix, I boot into the 5.4.0-59-generic kernel.

  1. During bootup, at the Grub screen, select option #2 (Advanced options for ubuntu).
  2. Then select the 3rd option ("Ubuntu, with Linux 5.8.0-34-generic)

After rebooting, your system should pick up the wifi adapter.

To make booting into the 5.4.0-39-generic the default option:

  1. sudo emacs /etc/default/grub # or use your favorite editor
  2. edit the GRUB_DEFAULT line to read GRUB_DEFAULT="1>2"
  3. save and exit the editor
  4. sudo update-grub

The GRUB_DEFAULT="1>2" tells the Grub menu to pick the 2nd option (counting from 0) on the first screen (i.e. "Advanced options for Ubuntu"), and then to pick the 3rd option on the 2nd screen (also counting from 0). You can either let the Grub screen timeout or press return twice and that should boot you into kernel version 5.4.0-39-generic.

As I said, this is my temporary fix. I think a permanent fix might involve a driver update from the vendor.

  • Oops, number 2 in the first list above should be "Ubuntu with LInux 5.4.0-39-generic". My bad. – Bob Yantosca Jan 07 '21 at 00:49
  • Thanks for the GRUB_DEFAULT="1>2" and explaining how it works! I initially set GRUB_DEFAULT=1 and was wondering why my computer wasn't booting back to the 5.4.0-59-generic kernel (also having WiFi issues with Broadcom driver after the 5.8.0 kernel upgrade as with OP); apparently I forgot that the GRUB menu for Ubuntu doesn't list the kernel versions on the first screen. Unfortunately for me, even booting back to the older kernel doesn't solve the WiFi issue :-( – Donald Sebastian Leung Jan 07 '21 at 04:35
1

Building initial module for 5.8.0-7630-generic

The default driver package included in Ubuntu repositories apparently can't be written to support each and any kernel version such as 5.8.0-7630. It does, however, support default Ubuntu kernel versions. For example, from my machine:

$ uname -r
5.8.0-34-generic

And:

$ sudo dpkg -s bcmwl-kernel-source
Package: bcmwl-kernel-source
Status: install ok installed

I suggest that you revert to a standard Ubuntu kernel and header version. The package should then install cleanly.

I will, however, be quite surprised if it then supports 5 gHz channels.

chili555
  • 60,188
  • Thanks! However 5GHz did work before all of this. – user3532812 Jan 07 '21 at 14:14
  • In Ubuntu? With which driver package? – chili555 Jan 07 '21 at 14:17
  • Also was having trouble figuring out what the 'standard' ubuntu kernels were. I guess I have a repo that has experimental ones or something? I did find this: https://people.canonical.com/~kernel/info/kernel-version-map.html which lists 5.8.0-34.37~20.04.2 as the latest Ubuntu 20.04 kernel. – user3532812 Jan 07 '21 at 14:22
  • I haven't any idea where you got 5.4.0-7630-generic. Please notice that it isn't listed in the link you gave. It also is not listed here: https://packages.ubuntu.com/ – chili555 Jan 07 '21 at 15:03
  • Thanks. It appears to be from the Pop!_os project, which I only downloaded the icons from... After following all this I ran into more issues (no keyboard or mouse support in 5.8.0-34-generic even after reinstalling xserver-xorg-input-all and log in screen went through a loop in -7630-generic). Tried some troubleshooting, but I think this is a case of reinstall and be more careful with the repos and packages I install next time. – user3532812 Jan 07 '21 at 15:35
  • With a fresh install of UbuntuBudgie using kernel 5.4.0-59-generic and installing the drivers from 'Additional Drivers', everything works great, including 5ghz. – user3532812 Jan 07 '21 at 17:31
1

What I did was just deleting the 5.8.0-34-generic kernel and it works completely fine now.

I haven't looked for any other solution, because I have a computer science project to finish in 2 days.