解决联想r720安装ubuntu无法连接wifi问题

问题现象如下:
一、查看模块状态

1
sudo rfkill list all

可以看到状态wlan的hard blocked为yes,注意没有网上说的3: phy0

1
2
3
4
5
6
7
8
9
0: ideapad_wlan: Wireless LAN
       Softblocked: no
       Hardblocked: yes
1: ideapad_bluetooth: Bluetooth
       Softblocked: yes
       Hardblocked: yes
2: hci0: Bluetooth
       Softblocked: yes
       Hardblocked: no

二、

1
dmesg | grep ath10k

看到缺少QCA9377的一些 firmware。

1
2
3
4
5
6
7
8
ath10k_pci 0000:03:00.0: Direct firmware load forath10k/cal-pci-0000:03:00.0.bin failed with error -2
ath10k_pci 0000:03:00.0: Direct firmware load forath10k/QCA9377/hw1.0/firmware-5.bin failed with error -2
ath10k_pci 0000:03:00.0: could not fetch firmwarefile 'ath10k/QCA9377/hw1.0/firmware-5.bin': -2
ath10k_pci 0000:03:00.0: Direct firmware load forath10k/QCA9377/hw1.0/board-3.bin failed with error -2
ath10k_pci 0000:03:00.0: could not fetch firmwarefile 'ath10k/QCA9377/hw1.0/board-3.bin': -2
ath10k_pci 0000:03:00.0: Direct firmware load forath10k/QCA9377/hw1.0/board-2.bin failed with error -2
ath10k_pci 0000:03:00.0: could not fetch firmwarefile 'ath10k/QCA9377/hw1.0/board-2.bin': -2
ath10k_pci 0000:03:00.0: Direct firmware load forath10k/QCA9377/hw1.0/board.bin failed with error -2

解决方法如下:
1、去https://github.com/kvalo/ath10k-firmware/archive/master.zip拿到QCA9377的bin,放到对应的/lib/firmware/ath10k/QCA9377/hw1.0/,此时sudo rfkill list all仍然还是wlan的hard blocked为yes,且没有3: phy0
并且查看dmesg 仍然有失败的:
ath10k_pci 0000:03:00.0: Direct firmware load forath10k/cal-pci-0000:03:00.0.bin failed with error -2
2、按照Arch Linux里的Wifi issues with Acer R11 (ath10k/QCA9377chip)(https://bbs.archlinux.org/viewtopic.php?id=211280),去https://github.com/ajaybhatia/Qualcomm-Atheros-QCA9377-Wifi-Linux 下Qualcomm-Atheros-QCA9377-Wifi-Linux-master.zip 然后解压。
3、进入解压的目录,有两种方式,一种是Arch Linux的./install.sh 直接把编译好的firmware更新到对应位置,不适合Ubuntu系统,另外一种是编译firmware的方式./install_for_kernel_4.4-rc2.sh
注意:直接运行编译方式的脚步,configuration这一步有可能失败,我的就是失败的,需要一步一步编译。编译好之后makeinstall。
4、install之后,重启电脑,但是Wi-Fi功能仍然不行,所幸是在右上角能看到有Wi-Fi出来了,虽然显示wireless is disabled by hardware switch。rfkill list all也能看到有3: phy0了。

1
2
3
4
5
6
7
8
9
10
11
12
13
x@x:~$ rfkill list all
0: ideapad_wlan: Wireless LAN
       Softblocked: no
       Hardblocked: yes
1: ideapad_bluetooth: Bluetooth
       Softblocked: yes
       Hardblocked: yes
2: hci0: Bluetooth
       Softblocked: yes
       Hardblocked: no
3: phy0: Wireless LAN
       Softblocked: no
       Hardblocked: no

5、这个原因是因为被联想的模块ideapad_laptop给硬件禁止了,卸载掉该模块之后,WiFi就正常了。

1
2
3
4
5
6
7
8
9
10
11
sudo modprobe -r ideapad_laptop
 
$ ifconfig wlan0
wlan0    Link encap:Ethernet  HWaddrf8:28:19:c8:93:7b
          inet addr:192.168.2.117  Bcast:192.168.2.255  Mask:255.255.255.0
         inet6 addr: fe80::fa28:19ff:fec8:937b/64 Scope:Link
         UP BROADCAST RUNNING MULTICAST MTU:1500  Metric:1
         RX packets:16169 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15040 errors:0 dropped:0overruns:0 carrier:0
         collisions:0 txqueuelen:1000
         RX bytes:11755658 (11.7 MB)  TXbytes:2365075 (2.3 MB)

6、重启后,仍然有ideapad_laptop,因此需要把它加入到黑名单里即可。
1)创建/etc/modprobe.d/ideapad.conf文件:

1
sudo touch /etc/modprobe.d/ideapad.conf

2)编辑ideapad.conf文件:

1
sudo gedit ideapad.conf

3) 在ideapad.conf文件中添加:

1
blacklist ideapad_laptop

4) 关闭并保存ideapad.conf文件,移除ideapad_laptop设备:

1
sudo modprobe -r ideapad_laptop

5) 注销重启Ubuntu系统,可以看到无线设备能够被打开,并能搜索到WiFi信号。

0 条评论
发表一条评论