突然,主托盘和设置中的 wifi 选项消失了

突然,主托盘和设置中的 wifi 选项消失了

在此处输入图片描述

我正在使用笔记本电脑,由于电池电量不足,它关机了,当我再次启动它时,右上角托盘中缺少 wifi 选项,它甚至没有出现在设置中。我附上了描述命令输出的图片输出 lspci -knn | grep Net -A3; rfkill list

06:00.0 Network controller [0280]: Broadcom Inc. and subsidiaries BCM43142 802.11b/g/n [14e4:4365] (rev 01)
    Subsystem: Dell Wireless 1704 802.11n + BT 4.0 [1028:0016]
    Kernel modules: bcma
07:00.0 Ethernet controller[0200]: Realtek Semiconductor Co., Ltd. RTL810xE PCI Express Fast Ethernet controller [10ec:8136] (rev 07)
0: dell-rbtn: Wireless LAN
    Soft blocked: no
    Hard blocked: no
1: hci0: Bluetooth
    Soft blocked: yes
    Hard blocked: no

UPD:如果您认为我应该安装任何软件包,请告诉我是否可以手动下载这些软件包,这将非常有帮助。我没有其他方法在笔记本电脑上连接互联网。

答案1

运行以下命令

sudo apt-get install --reinstall bcmwl-kernel-source

它可能会对你有帮助。

答案2

我试过了 sudo apt-get install --reinstall bcmwl-kernel-source ,然后出现以下错误

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

如上所述,我运行了命令,然后得到了这个

Setting up bcmwl-kernel-source (6.30.223.271+bdcom-0ubuntu5) ...
Removing old bcmwl-6.30.223.271+bdcom DKMS files...

------------------------------
Deleting module version: 6.30.223.271+bdcom
completely from the DKMS tree.
------------------------------
Done.
Loading new bcmwl-6.30.223.271+bdcom DKMS files...
Building for 5.8.0-34-generic
Building for architecture x86_64
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.
dpkg: error processing package bcmwl-kernel-source (--configure):
 installed bcmwl-kernel-source package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
 bcmwl-kernel-source

为了进一步了解,我尝试阅读上述日志文件,但一无所获

DKMS make.log for bcmwl-6.30.223.271+bdcom for kernel 5.8.0-34-generic (x86_64)
Friday 08 January 2021 12:26:27 PM IST
make: Entering directory '/usr/src/linux-headers-5.8.0-34-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));
      |         ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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:
      |  ^~~~~~~
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),
      |               ^
/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-34-generic'

我在 Google 上搜索了上述构建通用的错误,并发现了这个回答

在那个答案中提到了以下命令,运行这些命令后,我能够连接 wifi

apt purge bcmwl-kernel-source
apt-get install broadcom-sta-source
apt-get install broadcom-sta-dkms
apt-get install broadcom-sta-common

谢谢阿泰夫寻找答案。如果出于任何原因答案链接不起作用,请尝试

相关内容