我的 WiFi 在 Ubuntu 16.04.4 中运行良好。我重新启动了笔记本电脑,登录后,nm-applet 没有显示任何 WiFi AP。WiFi 调制解调器已启动并正在运行。但我的 nm-applet 没有显示任何内容。
- 我尝试降级内核并重新安装 Broadcom 驱动程序,但没有效果。
- 我尝试安装旧版本的 Broadcom 驱动程序,但它也给出了同样的错误
modprobe: ERROR: could not insert 'wl': Exec format error
- 当我从实时 U 盘使用 WiFi 时,WiFi 可以正常工作。
- 我已经尝试过这些步骤
但即便如此,我的 WiFi 仍然无法使用。
$ iwconfig
给出
lo no wireless extensions.
enp3s0 no wireless extensions.
我的内核版本:4.4.0-116-generic
$ls /lib/modules/4.4.0-116-generic/updates/dkms/
给出
wl.ko
$ lspci -vvnn | grep -A 9 Network
给出
02:00.0 Network controller [0280]: Broadcom Limited BCM43142 802.11b/g/n [14e4:4365] (rev 01)
DeviceName: NAMI
Subsystem: Hewlett-Packard Company BCM43142 802.11b/g/n [103c:804a]
Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Interrupt: pin A routed to IRQ 3
Region 0: Memory at f0c00000 (64-bit, non-prefetchable) [size=32K]
Capabilities: <access denied>
Kernel modules: bcma, wl
$ lshw -C network
吐
*-network UNCLAIMED
description: Network controller
product: BCM43142 802.11b/g/n
vendor: Broadcom Limited
physical id: 0
bus info: pci@0000:02:00.0
version: 01
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress cap_list
configuration: latency=0
resources: memory:f0c00000-f0c07fff
*-network
description: Ethernet interface
product: RTL810xE PCI Express Fast Ethernet controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:03:00.0
logical name: enp3s0
version: 07
serial: fc:3f:db:d5:e7:d7
size: 100Mbit/s
capacity: 100Mbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8106e-1_0.0.1 06/29/12 ip=192.168.1.8 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
resources: irq:32 ioport:2000(size=256) memory:f0b00000-f0b00fff memory:f0800000-f0803fff
$ sudo apt --reinstall bcmwl-kernel-source
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libqscintilla2-12v5 libqscintilla2-l10n libqt4-opengl linux-headers-4.4.0-119
octave-info thermald
Use 'sudo apt autoremove' to remove them.
The following packages will be upgraded:
bcmwl-kernel-source
1 upgraded, 0 newly installed, 0 to remove and 16 not upgraded.
Need to get 0 B/1,544 kB of archives.
After this operation, 51.2 kB of additional disk space will be used.
(Reading database ... 374783 files and directories currently installed.)
Preparing to unpack .../bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu1~1.2_amd64.deb ...
Removing all DKMS Modules
Done.
Unpacking bcmwl-kernel-source (6.30.223.271+bdcom-0ubuntu1~1.2) over (6.30.223.248+bdcom-0ubuntu8) ...
Setting up bcmwl-kernel-source (6.30.223.271+bdcom-0ubuntu1~1.2) ...
Loading new bcmwl-6.30.223.271+bdcom DKMS files...
Building only for 4.4.0-116-generic
Building for architecture x86_64
Building initial module for 4.4.0-116-generic
Done.
wl:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.4.0-116-generic/updates/dkms/
depmod....
DKMS: install completed.
modprobe: ERROR: could not insert 'wl': Exec format error
update-initramfs: deferring update (trigger activated)
Processing triggers for shim-signed (1.33.1~16.04.1+13-0ubuntu2) ...
Secure Boot not enabled on this system.
Processing triggers for initramfs-tools (0.122ubuntu8.11) ...
update-initramfs: Generating /boot/initrd.img-4.4.0-116-generic
答案1
我找到了解决方案 这个帖子。正如帖子中提到的,这只是一种解决方法,而不是解决问题的方法。根据帖子,加载雷特波林模块魔法。因此,我们在这里所做的就是加载它,无论 RETPOLINE 是否可用。这为我解决了这个问题。谢谢辣椒555,感谢您的协助。
vim /usr/src/linux-headers-*/include/linux/vermagic.h
步骤1:找到#ifdef RETPOLINE
并注释它(\\#ifdef RETPOLINE
),然后在注释行下方添加一行#if 1
。最终文件应如下所示,然后保存文件。
#include <generated/utsrelease.h>
/* Simply sanity version stamp for modules. */
#ifdef CONFIG_SMP
#define MODULE_VERMAGIC_SMP "SMP "
#else
#define MODULE_VERMAGIC_SMP ""
#endif
#ifdef CONFIG_PREEMPT
#define MODULE_VERMAGIC_PREEMPT "preempt "
#else
#define MODULE_VERMAGIC_PREEMPT ""
#endif
#ifdef CONFIG_MODULE_UNLOAD
#define MODULE_VERMAGIC_MODULE_UNLOAD "mod_unload "
#else
#define MODULE_VERMAGIC_MODULE_UNLOAD ""
#endif
#ifdef CONFIG_MODVERSIONS
#define MODULE_VERMAGIC_MODVERSIONS "modversions "
#else
#define MODULE_VERMAGIC_MODVERSIONS ""
#endif
#ifndef MODULE_ARCH_VERMAGIC
#define MODULE_ARCH_VERMAGIC ""
#endif
//#ifdef RETPOLINE
#if 1
#define MODULE_VERMAGIC_RETPOLINE "retpoline "
#else
#define MODULE_VERMAGIC_RETPOLINE ""
#endif
#define VERMAGIC_STRING \
UTS_RELEASE " " \
MODULE_VERMAGIC_SMP MODULE_VERMAGIC_PREEMPT \
MODULE_VERMAGIC_MODULE_UNLOAD MODULE_VERMAGIC_MODVERSIONS \
MODULE_ARCH_VERMAGIC \
MODULE_VERMAGIC_RETPOLINE
第2步:现在重新配置bcmwl-kernel-source包sudo dpkg-reconfigure bcmwl-kernel-source
。
步骤 3:现在重新启动网络管理器sudo service network-manager restart
。
步骤4:享受您的 WiFi :)