admin管理员组

文章数量:1625474

系统:

frank@frank:~$ uname -a
Linux frank 4.15.0-142-generic #146~16.04.1-Ubuntu SMP Tue Apr 13 09:27:15 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

刚买了电脑,连网卡都没注意什么型号,直接格式化装上ubuntu,公司都是用无线上网,结果装完系统后发现没有无线网卡驱动,不能无线上网,然后查了一下驱动型号。

网卡型号:

frank@frank:~$ lspci | grep -i net
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
03:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter
frank@frank:~$

确定了无线网卡为REALTEK的8821CE,开始网上搜驱动安装

rtl8821ce驱动下载安装:

我使用的是别人百度网盘分享的,安装过程可百度。

使用过程频繁掉线:

安装完成后可以上网,但是会频繁掉线。一天掉很多次,刚开始掉线时使用ifconfig down/up命令还可以重新连上,用了几次之后,不管用了,只能重启恢复,但是仍然进入上面的死循环,于是觉得可能是网卡驱动有问题,网上也有很多遇到类似的问题,有修改网络配置,有其他型号网卡说是修改网卡低功耗模式的,试了很多办法,都没有效果。后来想如果我安装的网卡驱动有问题,那么这个问题应该已经暴露很久了,网上肯定有最新的源码解决这个问题了,哪里有最新的代码呢?肯定是github了,于是搜到了github上的源码。准备安装,但是还没安装。

别人网上提供的github上的驱动源码:

git clone https://github/tomaspinho/rtl8821ce

驱动源码下载后,常规操作,先看下README.md,结果发现一个跟掉线有关的一段话:

128 ### Unstable connection - slowdowns or dropouts
129
130 The problem may be due to the periodic scanning of access points by the netw    ork applet.
131
132 > This fix worked helpful on Pop! _OS/Ubuntu 20.10 and Fedora 33. Both with     GNOME and NetworkManager. [#179](https://github/tomaspinho/rtl8821ce/iss    ues/179)
133
134 Set the BSSID from your network applet. In GNOME this can be done in `WiFi Settings > Your profile > Identity > BSSID`.
135
136 We are going to disable the *Connectivity Check* option in NetworkManager. T    his by editing the file in `/var/lib/NetworkManager/NetworkManager-intern.co    nf` and adding the following instructions at the end:
137
138 ```
139 [connectivity]
140 .set.enabled=false
141 ```
142
143 Then, just reboot or restart the NetworkManager unit to fix the problem.
144

顿时感觉抓到了救命稻草,啥也不说,查看自己连接wifi的BSSID,按照说明,在wifi配置里面选上连接wifi的BSSID(ubuntu没装截图工具,就不截图了,这个也很简单)。这个操作好像就是绑定BSSID,类似于设置静态ip的感觉吧。

查看连接wifi BSSID的方法:

frank@frank:~$ iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11AC  ESSID:"xxxxxxxx"  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency:5.745 GHz  Access Point: 50:98:B8:6B:B0:81   
          Bit Rate:434 Mb/s   Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=71/100  Signal level=52/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

Access Point就是我们需要的BSSID。设置完成后,从下午一直用到晚上,没有掉过一次线,应该是有效果了。继续观察……

总结下驱动安装流程及使用过程中频繁掉线的解决方法:

下载安装无线网卡驱动:

建议使用github上的源码,一般会有维护,bug会解决,到时候更新一下就可以了。不过github网站访问不太稳定,有时候下载不下来。我第一次装驱动时试了几次下载不下来,就用网友网盘分享的驱动源码。

0、git clone https://github/tomaspinho/rtl8821ce

1、Makefile中修改路径:

 152 #export TopDIR ?= $(srctree)/drivers/net/wireless/rtl8821ce
 153 export TopDIR ?= $(shell pwd)

2、./configuration

3、make

4、sudo make install

5、sudo modprobe -a 8821ce

解决频繁掉线问题:

1、使用iwconfig查看无线网卡所连wifi的Access Point,即下面要用到的BSSID。

2、在无线网卡配置的wifi选项卡中,有一栏BSSID,默认是空的,点击下拉框选择所连wifi的BSSID,点击保存。

以上就是自己在安装和使用rtl8821ce无线网卡过程中遇到的问题和解决办法。发扬开源精神,分享出来,希望能够帮助有需要的网友,自己也记录一下,养成好习惯(以前都不爱记录,好多东西时间久了就忘掉了)。

本文标签: 无线网卡掉线频繁wifiRTL8821CE