聯想拯救者 + ubuntu16.04 + WIFI設置

問題一
1.1 問題描述
筆記本型號:Lenovo r720筆記本(i5-7300hq,gtx1060 maxq 6g),默認裝入Win10系統,然而當裝入Ubuntu16.04雙系統時,會出現無線網卡(型號:RTL8821AE)被hard blocked問題。
即:
在終端敲入:
rfkill list all
會出現:
0:ideapad_wlan: Wireless LAN
Soft blocked: no
Hard blocked:yes
1:ideapad_bluetooth: Bluetooth
Soft blocked: no
Hard blocked: yes
2:phy0: Wireless LAN
Soft blocked: no
Hard blocked:no
3:hci0: Bluetooth
Soft blocked: yes
Hard blocked: no
能夠看到,優先級前的ideapad_wlan的Hard blocked 默認爲yes,即ubuntu默認關閉了硬件wifi開關,而聯想R720的wifi只有軟件開關,沒有硬件開關的啓動,因此引發了wifi沒法開啓的問題。linux


1.2 解決方法
從無線模塊的顯示列表能夠看出,序號2的wifi模塊是軟硬件是能夠啓動的,因此,只要將前面默認的模塊移出便可。
a)方法一:
1)移出ideapad無線模塊:
sudo modprobe -r ideapad_laptop
2)使用命令查看:
rfkill list all
以下提示:git

2:phy0: Wireless LAN
Soft blocked: no
Hard blocked:no
3:hci0: Bluetooth
Soft blocked: yes
Hard blocked: no
即wifi模塊工做正常,然而每次重啓ubuntu系統都要從新進行模塊移出,故可將該命令設置爲開機自啓動。
3)在/etc/rc.local文件中添加命令:
---------------------------------------------------------------github

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
#由於使用的是非管理員登陸,故在執行sudo命令時要輸入密碼,方可自動化執行,
#此處假設用戶密碼爲123,命令必定要在exit 0以前運行,該文件若是沒有修改權限
#修改前使用 chmod 命令修改權限便可!
echo "123" |sudo modprobe -r ideapad_laptop
exit 0
--------------------------------------------------------------ubuntu

開機啓動後系統會自動執行改腳本文件,完成wifi模塊的自動移出操做。less

 

b)方法二(推薦):
經過列入黑名單的方式來實現自動移出ideapad_laptop設備。
1)建立/etc/modprobe.d/ideapad.conf文件:
sudo touch /etc/modprobe.d/ideapad.conf
2)編輯ideapad.conf文件:
sudo gedit ideapad.conf
3) 在ideapad.conf文件中添加:
blacklist ideapad_laptop
4) 關閉並保存ideapad.conf文件,移除ideapad_laptop設備:
sudo modprobe -r ideapad_laptop
5) 註銷重啓Ubuntu系統,能夠看到無線設備可以被打開,並能搜索到WiFi信號。ide

問題二
2.1 問題描述
在解決以上無線網卡開啓問題後,發現已鏈接的wifi容易斷開而且信號強度較差ui

2.2 解決方法
1)插上有線網
2)打開終端
3)在終端依次執行:this

sudo apt-get install git build-essential linux-headers-$(uname -r)$idea

git clone https://github.com/lwfinger/rtlwifi_new.gitip

cd rtlwifi_new

make

sudo make install

4) 重啓計算機

相關文章
相關標籤/搜索