今天给⾃⼰的笔记本电脑安装了新的Ubuntu 16.04但是安装之后发现wifi⽆法启⽤。这⾥特说明解决过程。
⾸先,⽹上的⼤部分教程是选择“系统设置”,点击“软件和更新”点击“附加驱动”,这时候系统会⾃动联⽹监测本机适⽤的附加驱动,其中就包括你的⽆线⽹卡驱动。
但是按照上述步骤,却并没有看到需要安装驱动的硬件。但是我在⽹上到了这样的⼀篇博客:
⼀.分析:
1.使⽤ifconfig命令发现不会显⽰⽆线⽹卡,说明⽆线⽹卡被关闭,笔者输出的信息如下:
linuxidc@linuxidc:~$ ifconfig
eth0 Link encap:以太⽹硬件地址 16:03:71:93:64:22
inet 地址:192.168.100.3 ⼴播:192.168.100.255 掩码:255.255.255.0
inet6 地址: fe80::1a03:73ff:fe92:632e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 跃点数:1
接收数据包:295308 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:208860 错误:1 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:1000
接收字节:394951279 (394.9 MB) 发送字节:19510963 (19.5 MB)
lo Link encap:本地环回
inet 地址:127.0.0.1 掩码:255.0.0.0
inet6 地址: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 跃点数:1
接收数据包:943526 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:943526 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:1
接收字节:464924375 (464.9 MB) 发送字节:464924375 (464.9 MB)
2.使⽤lshw命令输出信息(只贴出⽆线⽹卡相关的信息)如下:
linuxidc@linuxidc:~$ lshw
*-network DISABLED
description: Wireless interface
physical id: 2
logical name: wlan0 1
serial: 92 :31:e3:4a:75:f2
capabilities: ethernet physical wireless
configuration: broadcast=yes driver=brcmsmac driverversion=4.1.0-78-generic firmware=102.304 ip=192.168.100.131 link=no
multicast=yes wireless=IEEE 802.11bgn
从第2点的"*-network DISABLED"这⼀⾏可以明确⽆线⽹卡在硬件上被禁⽌了
3.于是打开硬件开关,但尝试了很多次都没成功,通过rfkill的输出信息来判断:
linuxidc@linuxidc:~$ sudo rfkill list all
[sudo] linuxidc 的密码:
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: yes
从"Hard blocked: yes"这⼀⾏可以看出⽆线⽹卡在硬件上被block
如果是Soft blocked: yes ,可以通过 Fn+f2(笔记本)打开
4.通过第3点开始怀疑⽆线⽹卡的驱动是否安装正确
⼆.安装⽆线⽹卡驱动:
1.卸载之前安装的⽆线⽹卡驱动(如果之前安装了的情况下,否则请⽆视):
sudo apt-get purge firmware-b43-installer
sudo apt-get purge bcmwl-kernel-source
2.获取⽆线⽹卡的PCI.ID (笔者的⽆线⽹卡品牌是broadcom,所以指定⼚商代号为14e4)
linuxidc@linuxidc$ lspci -nn -d 14e4:
09:00.0 Network controller [0280]: Broadcom Corporation BCM4313 802.11bgn Wireless Network Adapter [14e4:4727] (rev 01)
从以上信息中获取到关键信息为:[14e4:4727] (rev 01)
-nn 选项是只显⽰指定的⼚商代码对应的设备
-d 选项是显⽰⼚商代号和设备代号,同时显⽰数字和名称
3.更新ubuntu的PCI.IDs列表:
3.1sudo apt-get update (⾸先更新软件包索引)
3.2sudo update-pciids (如果⼀直没有响应,那就将其中断),直接替换原来的/usr/share/misc/pci.ids⽂件,命令如下:
cd /usr/share/misc/
sudo mv pci.ids ig
ubuntu安装教程 将下载好的pci.ids⽂件复制到/usr/share/misc/⽬录下(由于笔者认为⽬前的⽆线⽹卡硬件不是很新,因此⽆线⽹卡的信息在原来的pci.ids ⽂件中是存在的,因此并没有⼿动去更新pci.ids⽂件)
4.安装对应的⽆线⽹卡驱动,从下表即可获得对应驱动的软件包名
PCI.ID 16.04 LTS 17.10+
------------------------------------------------------------------------------------
14e4:0576 Special Case #1 UNKNOWN
14e4:4301 firmware-b43-installer firmware-b43-installer
14e4:4306 firmware-b43-installer firmware-b43-installer
14e4:4306 rev 02 firmware-b43-installer firmware-b43-installer
14e4:4306 rev 03 firmware-b43-installer firmware-b43-installer
14e4:4307 firmware-b43-installer firmware-b43-installer
14e4:4311 firmware-b43-installer firmware-b43-installer
14e4:4311 rev 01 firmware-b43-installer firmware-b43-installer
14e4:4312 firmware-b43-installer firmware-b43-installer
14e4:4313 firmware-b43-installer firmware-b43-installer
14e4:4315 firmware-b43-installer firmware-b43-installer
14e4:4315 rev 01 firmware-b43-installer firmware-b43-installer
14e4:4318 firmware-b43-installer firmware-b43-installer
14e4:4318 rev 02 firmware-b43-installer firmware-b43-installer
14e4:4319 firmware-b43-installer firmware-b43-installer
14e4:4320 rev 02 firmware-b43-installer firmware-b43-installer
14e4:4320 rev 03 firmware-b43-installer firmware-b43-installer
14e4:4321 firmware-b43-installer firmware-b43-installer
14e4:4324 firmware-b43-installer firmware-b43-installer
14e4:4325 firmware-b43-installer firmware-b43-installer
14e4:4328 firmware-b43-installer firmware-b43-installer
14e4:4329 bcmwl-kernel-source bcmwl-kernel-source
14e4:432a bcmwl-kernel-source bcmwl-kernel-source
14e4:432b bcmwl-kernel-source bcmwl-kernel-source
14e4:432c bcmwl-kernel-source bcmwl-kernel-source
14e4:432d bcmwl-kernel-source bcmwl-kernel-source
14e4:4331 firmware-b43-installer firmware-b43-installer
14e4:4335 firmware-b43-installer firmware-b43-installer
14e4:4350 firmware-b43-installer firmware-b43-installer
14e4:4353 Special Case #1 UNKNOWN
14e4:4353 rev 01 Special Case #1 UNKNOWN
14e4:4357 Special Case #1 UNKNOWN
14e4:4358 bcmwl-kernel-source bcmwl-kernel-source
14e4:4359 bcmwl-kernel-source bcmwl-kernel-source
14e4:4360 bcmwl-kernel-source bcmwl-kernel-source
14e4:4365 bcmwl-kernel-source bcmwl-kernel-source
14e4:4365 rev 01 bcmwl-kernel-source bcmwl-kernel-source
14e4:43a0 bcmwl-kernel-source bcmwl-kernel-source
14e4:43ae rev 02 UNKNOWN UNKNOWN
14e4:43b1 bcmwl-kernel-source bcmwl-kernel-source
14e4:43b1 rev 03 bcmwl-kernel-source bcmwl-kernel-source
14e4:43c3 rev 04 UNKNOWN Special Case #2
14e4:4727 bcmwl-kernel-source bcmwl-kernel-source
14e4:4727 rev 01 bcmwl-kernel-source bcmwl-kernel-source
14e4:a962 firmware-b43-installer firmware-b43-installer
------------------------------------------------------------------------------------
4.1从上表中可以看到bcmwl-kernel-source与14e4:4727 rev 01对应,因此安装命令如下:
sudo apt-get install bcmwl-kernel-source
4.2重新启动
个⼈觉得是上述红⾊的字体是主要的。
sudo apt-get update
sudo update-pciids
上述两步完成后,再进⾏选择“系统设置”,点击“软件和更新”点击“附加驱动”,这时候系统会⾃动联⽹监测本机适⽤的附加驱动,其中就包括你的⽆线⽹卡驱动。
就可以看到需要安装驱动的硬件了,点击安装即可。
发布评论