云网牛站
所在位置:首页 > Linux教程 > ubuntu18.04系统中使用dkms安装wifi驱动rtl8723be的方法

ubuntu18.04系统中使用dkms安装wifi驱动rtl8723be的方法

2018-09-11 22:17:50作者:AIHorse稿源:linux站

以下是在ubuntu18.04系统中安装wifi驱动rtl8723be的心得。

 

问题起因

在自动升级linux内核后,重新启动ubuntu18.04后wifi驱动就失效了,需要重新安装,是因为使用了常规方式安装rtl8723be wifi驱动。

 

以下为在ubuntu18.04下安装rtl8723be驱动的步骤(常规方式)

1、先安装好需要编译的软件:

sudo apt-get install linux-headers-generic linux-headers-$(uname -r) gcc g++ build-essential git 

2、cd切换到需要放rtlwifi_new 到目录下,再执行:

git clone http://github.com/lwfinger/rtlwifi_new.git

ubuntu18.04系统中使用dkms安装wifi驱动rtl8723be的方法

3、先停止网路

sudo service network-manager stop

如果不是首次安装该驱动,在第3步后执行:

$ sudo modprobe -rfv rtl8723be

删除卸载老的无线网卡驱动。

4、cd 到 rtlwifi_new 目录下执行:

sudo make

sudo make install

sudo modprobe -v rtl8723be fwlps=0 ips=0

5、重新启动ubuntu18.04系统

sudo reboot 

6、确认是否关闭 fwlps=N ips=N

systool -v -m rtl8723be

7、如果查看 fwlps=Y ips=Y 的话就: 

echo "options rtl8723be ips=0 fwlps=0" | sudo tee /etc/modprobe.d/rtl8723be.conf

这样首次安装rtl8723be驱动就完成了。但是这样方式安装有遗留问题,即自动升级内核后,重启系统该wifi驱动会失效,需要重新安装wifi驱动。

 

使用dkms方式安装rtl8723be wifi驱动

我们可以这样利用dkms自动更新和升级内核都不需要reinstall wifi driver.

先需要安装dkms,命令为:

sudo apt install dkms 

1、git 下载rtlwifi_new

git clone -b extended https://github.com/lwfinger/rtlwifi_new.git

2、复制rtlwifi_new到/usr/src/ 目录下

sudo cp -R rtlwifi_new/ /usr/src/

3、dkms add

cmd@TR:/usr/src$ sudo dkms add ./rtlwifi_new

  Creating symlink /var/lib/dkms/rtlwifi-new/0.6/source ->/usr/src/rtlwifi-new-0.6

  DKMS: add completed.

4、dkms install 

cmd@TR:/usr/src$ sudo dkms install rtlwifi-new/0.6

Kernel preparation unnecessary for this kernel. Skipping...

Building module:

cleaning build area....(bad exit status: 2)

make -j8 KERNELRELEASE=4.15.0-34-generic -C /lib/modules/4.15.0-34-generic/build M=/var/lib/dkms/rtlwifi-new/0.6/build..............

cleaning build area...(bad exit status: 2)

DKMS: build completed.

rtl_pci.ko:

Running module version sanity check.

- Original module

- Installation

- Installing to /lib/modules/4.15.0-34-generic/updates/dkms/

rtl_usb.ko:

Running module version sanity check.

- Original module

- Installation

- Installing to /lib/modules/4.15.0-34-generic/updates/dkms/

rtlwifi.ko:

Running module version sanity check.

- Original module

- Installation

- Installing to /lib/modules/4.15.0-34-generic/updates/dkms/

btcoexist.ko:

Running module version sanity check.

- Original module

- Installation

- Installing to /lib/modules/4.15.0-34-generic/updates/dkms/

halmac.ko:

Running module version sanity check.

- Original module

- Installation

- Installing to /lib/modules/4.15.0-34-generic/updates/dkms/

phydm_mod.ko:

Running module version sanity check.

- Original module

- Installation

- Installing to /lib/modules/4.15.0-34-generic/updates/dkms/

rtl8188ee.ko:

Running module version sanity check.

- Original module

- Installation

- Installing to /lib/modules/4.15.0-34-generic/updates/dkms/

rtl8192c-common.ko:

Running module version sanity check.

- Original module

- Installation

- Installing to /lib/modules/4.15.0-34-generic/updates/dkms/

rtl8192ce.ko:

Running module version sanity check.

- Original module

- Installation

- Installing to /lib/modules/4.15.0-34-generic/updates/dkms/

rtl8192cu.ko:

Running module version sanity check.

- Original module

- Installation

- Installing to /lib/modules/4.15.0-34-generic/updates/dkms/

rtl8192de.ko:

Running module version sanity check.

- Original module

- Installation

- Installing to /lib/modules/4.15.0-34-generic/updates/dkms/

rtl8192ee.ko:

Running module version sanity check.

- Original module

- Installation

- Installing to /lib/modules/4.15.0-34-generic/updates/dkms/

rtl8192se.ko:

Running module version sanity check.

- Original module

- Installation

- Installing to /lib/modules/4.15.0-34-generic/updates/dkms/

rtl8723ae.ko:

Running module version sanity check.

- Original module

- Installation

- Installing to /lib/modules/4.15.0-34-generic/updates/dkms/

rtl8723be.ko:

Running module version sanity check.

- Original module

- Installation

- Installing to /lib/modules/4.15.0-34-generic/updates/dkms/

rtl8723de.ko:

Running module version sanity check.

- Original module

- Installation

- Installing to /lib/modules/4.15.0-34-generic/updates/dkms/

rtl8723-common.ko:

Running module version sanity check.

- Original module

- Installation

- Installing to /lib/modules/4.15.0-34-generic/updates/dkms/

rtl8821ae.ko:

Running module version sanity check.

- Original module

- Installation

- Installing to /lib/modules/4.15.0-34-generic/updates/dkms/

rtl8822be.ko:

Running module version sanity check.

- Original module

- Installation

- Installing to /lib/modules/4.15.0-34-generic/updates/dkms/

depmod...

DKMS: install completed.

5、复制编译生成的相关到 /lib/firmware/rtlwifi/

cmd@TR:/usr/src$ sudo cp /usr/src/rtlwifi-new-0.6/firmware/rtlwifi/* /lib/firmware/rtlwifi/

6、sudo depmod -a

7、echo "options rtl8723be ips=0 fwlps=0" | sudo tee /etc/modprobe.d/rtl8723be.conf

8、sudo modprobe -v rtl8723be fwlps=0 ips=0

9、重启:sudo reboot

注:使用dkms安装wifi驱动rtl8723be不会出现任何遗留问题。

 

相关主题

笔记本安装Ubuntu18.04后无法识别Wifi适配器的解决办法

精选文章
热门文章