使用 RTL8723BU 的 Ubuntu 18.04 LTS 无法使用 Wifi

使用 RTL8723BU 的 Ubuntu 18.04 LTS 无法使用 Wifi

我刚刚在电脑上安装了 Ubuntu。一切正常,但 Wifi 无法正常工作。当我尝试连接到网络时,它无法正常工作并显示错误“激活网络连接失败”。有时我可以连接到网络,但网络信号非常弱。我的电脑使用 realtek 驱动程序来连接 wifi。

以下是输出lspci; lsusb

    00:00.0 Host bridge: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series SoC Transaction Register (rev 21)
00:02.0 VGA compatible controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics Controller (rev 21)
00:13.0 SATA controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series SATA Controller (rev 21)
00:14.0 USB controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series USB xHCI Controller (rev 21)
00:1a.0 Encryption controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Trusted Execution Engine (rev 21)
00:1b.0 Audio device: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series High Definition Audio Controller (rev 21)
00:1c.0 PCI bridge: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Express Port #1 (rev 21)
00:1c.1 PCI bridge: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Express Port #2 (rev 21)
00:1f.0 ISA bridge: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCU (rev 21)
00:1f.3 SMBus: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx SMBus Controller (rev 21)
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 5986:065e Acer, Inc 
Bus 001 Device 005: ID 0bda:b720 Realtek Semiconductor Corp. 
Bus 001 Device 004: ID 046d:c077 Logitech, Inc. M105 Optical Mouse
Bus 001 Device 003: ID 1c4f:0002 SiGma Micro Keyboard TRACER Gamma Ivory
Bus 001 Device 008: ID 2717:ff80  
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

输出usb-devices | awk '/b720/' RS=

T:  Bus=01 Lev=01 Prnt=01 Port=03 Cnt=04 Dev#=  5 Spd=480 MxCh= 0
D:  Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0bda ProdID=b720 Rev=02.00
S:  Manufacturer=Realtek
S:  Product=802.11n WLAN Adapter
S:  SerialNumber=00e04c000001
C:  #Ifs= 3 Cfg#= 1 Atr=e0 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
I:  If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
I:  If#= 2 Alt= 0 #EPs= 6 Cls=ff(vend.) Sub=ff Prot=ff Driver=rtl8xxxu

如何解决这个问题?

答案1

对于内置 Realtek RTL8723BU USB 适配器,其 ID 为“0bda:b720”:

$ lsusb
...
Bus 002 Device 002: ID 0bda:b720 Realtek Semiconductor Corp. 
...

顺便说一下,这对我有用:

sudo apt install build-essential dkms
sudo apt install git
git clone https://github.com/lwfinger/rtl8723bu.git
sudo apt install libelf-dev

cd rtl8723bu

在 Makefile 中注释掉 EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE 行。然后 make 并安装:

make
sudo make install
sudo modprobe -v 8723bu

将 rtl8xxxu 模块列入黑名单:

vi /etc/modprobe.d/blacklist.conf,附加

blacklist rtl8xxxu

然后添加到 dkms:

source dkms.conf
sudo mkdir /usr/src/$PACKAGE_NAME-$PACKAGE_VERSION
sudo cp -r core hal include os_dep platform dkms.conf Makefile rtl8723b_fw.bin /usr/src/$PACKAGE_NAME-$PACKAGE_VERSION
sudo dkms add $PACKAGE_NAME/$PACKAGE_VERSION
sudo dkms autoinstall $PACKAGE_NAME/$PACKAGE_VERSION

使用以下命令检查 dkms:

dkms status

几乎完全一样https://github.com/lwfinger/rtl8723bu页面,另外安装 libelf-dev 并将 rtl8xxxu 列入黑名单。

答案2

您有一个内置的 RTL8723BU USB 无线适配器。

您需要安装比内核更好的驱动程序。

在 BIOS 中禁用安全启动。

连接到互联网并运行:

sudo apt install git dkms
git clone https://github.com/lwfinger/rtl8723bu
sudo dkms add ./rtl8723bu
source rtl8723bu/dkms.conf
sudo dkms install rtl8723bu/$PACKAGE_VERSION
sudo tee /etc/modprobe.d/blacklist-rtl8xxxu.conf <<< "blacklist rtl8xxxu"

重启。

如果出现问题,您可以随时通过以下方式恢复到树内驱动程序

sudo rm /etc/modprobe.d/blacklist-rtl8xxxu.conf

相关内容