我刚刚在我新购买的低配置笔记本电脑上安装了最新的Xubuntu 18.04 LTS,旁边是 Windows 10(双启动)。安装一切正常,但 Wifi 不工作。有时(很少)我能够连接到我的 wifi 路由器,但网络强度太强了。我的笔记本电脑使用realtek 驱动程序(可能是 RTL8723BU)进行 wifi。它在 Windows 10 系统中运行良好。从 inxi -Fxz 命令我发现我的网卡没有以某种方式安装。在 Xumuntu,我现在完全没有互联网。在这里我想补充一点,我在这台笔记本电脑中没有有线 LAN 选项。
我该如何修复/解决这个 wifi / 网卡问题?
这是inxi -Fxz的输出
boundule@BUDDY:~$ inxi -Fxz
System: Host: BUDDY Kernel: 4.15.0-30-generic x86_64 bits: 64 gcc: 7.3.0 Desktop: Xfce 4.12.3 (Gtk 2.24.31)
Distro: Ubuntu 18.04.1 LTS
Machine: Device: laptop System: Walton product: Prelude R1 serial: N/A
Mobo: N/A model: N/A serial: N/A
UEFI: American Megatrends v: WH-BI-14-Y116AR120-105-C date: 03/13/2018
CPU: Dual core Intel Celeron N3350 (-MCP-) arch: N/A cache: 1024 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 4377
clock speeds: max: 2400 MHz 1: 869 MHz 2: 861 MHz
Graphics: Card: Intel Device 5a85 bus-ID: 00:02.0
Display Server: x11 (X.Org 1.19.6 ) drivers: modesetting (unloaded: fbdev,vesa)
Resolution: [email protected]
OpenGL: renderer: Mesa DRI Intel HD Graphics 500 (Broxton 2x6)
version: 4.5 Mesa 18.0.5 Direct Render: Yes
Audio: Card Intel Celeron N3350/Pentium N4200/Atom E3900 Series Audio Cluster
driver: snd_hda_intel bus-ID: 00:0e.0
Sound: Advanced Linux Sound Architecture v: k4.15.0-30-generic
Network: Card: Failed to Detect Network Card!
Drives: HDD Total Size: 1008.2GB (1.2% used)
ID-1: /dev/sda model: HGST_HTS541010B7 size: 1000.2GB
ID-2: USB /dev/sdb model: Transcend_8GB size: 8.0GB
Partition: ID-1: / size: 19G used: 4.6G (27%) fs: ext4 dev: /dev/sda7
ID-2: /home size: 35G used: 51M (1%) fs: ext4 dev: /dev/sda9
ID-3: swap-1 size: 6.14GB used: 0.00GB (0%) fs: swap dev: /dev/sda8
RAID: No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors: System Temperatures: cpu: 49.0C mobo: N/A
Fan Speeds (in rpm): cpu: N/A
Info: Processes: 166 Uptime: 37 min Memory: 397.8/3778.5MB Init: systemd runlevel: 5 Gcc sys: 7.3.0
Client: Shell (bash 4.4.191) inxi: 2.3.56
这是lspci 的输出;lsusb
00:00.0 Host bridge: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series Host Bridge (rev 0b)
00:00.1 Signal processing controller: Intel Corporation Device 5a8c (rev 0b)
00:02.0 VGA compatible controller: Intel Corporation Device 5a85 (rev 0b)
00:0e.0 Audio device: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series Audio Cluster (rev 0b)
00:0f.0 Communication controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series Trusted Execution Engine (rev 0b)
00:12.0 SATA controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series SATA AHCI Controller (rev 0b)
00:15.0 USB controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series USB xHCI (rev 0b)
00:16.0 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series I2C Controller #1 (rev 0b)
00:16.1 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series I2C Controller #2 (rev 0b)
00:16.2 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series I2C Controller #3 (rev 0b)
00:16.3 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series I2C Controller #4 (rev 0b)
00:17.0 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series I2C Controller #5 (rev 0b)
00:17.1 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series I2C Controller #6 (rev 0b)
00:17.2 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series I2C Controller #7 (rev 0b)
00:17.3 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series I2C Controller #8 (rev 0b)
00:18.0 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series HSUART Controller #1 (rev 0b)
00:18.1 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series HSUART Controller #2 (rev 0b)
00:18.2 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series HSUART Controller #3 (rev 0b)
00:18.3 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series HSUART Controller #4 (rev 0b)
00:19.0 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series SPI Controller #1 (rev 0b)
00:19.1 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series SPI Controller #2 (rev 0b)
00:19.2 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series SPI Controller #3 (rev 0b)
00:1c.0 SD Host controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series eMMC Controller (rev 0b)
00:1f.0 ISA bridge: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series Low Pin Count Interface (rev 0b)
00:1f.1 SMBus: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series SMBus Controller (rev 0b)
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 058f:5608 Alcor Micro Corp.
Bus 001 Device 004: ID 0bda:b720 Realtek Semiconductor Corp.
Bus 001 Device 003: ID 09da:c10a A4Tech Co., Ltd.
Bus 001 Device 002: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
Bus 001 Device 006: ID 058f:6387 Alcor Micro Corp. Flash Drive
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=06 Cnt=04 Dev#= 4 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
运行命令并重新启动后问题仍然存在。
boundule@BUDDY:~$ sudo apt install build-essential dkms
[sudo] password for boundule:
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.4ubuntu1).
build-essential set to manually installed.
Suggested packages:
menu
The following packages will be upgraded:
dkms
1 upgraded, 0 newly installed, 0 to remove and 18 not upgraded.
Need to get 68.0 kB of archives.
After this operation, 19.5 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://bd.archive.ubuntu.com/ubuntu bionic-updates/main amd64 dkms all 2.3-3ubuntu9.2 [68.0 kB]
Fetched 68.0 kB in 3s (19.6 kB/s)
(Reading database ... 185574 files and directories currently installed.)
Preparing to unpack .../dkms_2.3-3ubuntu9.2_all.deb ...
Unpacking dkms (2.3-3ubuntu9.2) over (2.2.0.3-2ubuntu11) ...
Setting up dkms (2.3-3ubuntu9.2) ...
Installing new version of config file /etc/dkms/framework.conf ...
Installing new version of config file /etc/dkms/template-dkms-mkdeb/debian/control ...
Installing new version of config file /etc/kernel/prerm.d/dkms ...
Processing triggers for man-db (2.8.3-2) ...
boundule@BUDDY:~$ git clone https://github.com/lwfinger/rtl8723bu.git
Cloning into 'rtl8723bu'...
remote: Counting objects: 2438, done.
remote: Total 2438 (delta 0), reused 0 (delta 0), pack-reused 2438
Receiving objects: 100% (2438/2438), 7.41 MiB | 63.00 KiB/s, done.
Resolving deltas: 100% (1960/1960), done.
boundule@BUDDY:~$ cd rtl8723bu
boundule@BUDDY:~/rtl8723bu$ source dkms.conf
boundule@BUDDY:~/rtl8723bu$ sudo mkdir /usr/src/$PACKAGE_NAME-$PACKAGE_VERSION
boundule@BUDDY:~/rtl8723bu$ sudo cp -r core hal include os_dep platform dkms.conf Makefile rtl8723b_fw.bin /usr/src/$PACKAGE_NAME-$PACKAGE_VERSION
boundule@BUDDY:~/rtl8723bu$ sudo dkms add $PACKAGE_NAME/$PACKAGE_VERSION
Creating symlink /var/lib/dkms/rtl8723bu/4.3.6.11_12942.20141204_BTCOEX20140507-4E40/source ->
/usr/src/rtl8723bu-4.3.6.11_12942.20141204_BTCOEX20140507-4E40
DKMS: add completed.
boundule@BUDDY:~/rtl8723bu$ sudo dkms autoinstall $PACKAGE_NAME/$PACKAGE_VERSION
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area...
make -j2 KERNELRELEASE=4.15.0-30-generic -C /lib/modules/4.15.0-30-generic/build M=/var/lib/dkms/rtl8723bu/4.3.6.11_12942.20141204_BTCOEX20140507-4E40/build..........................
Signing module:
Generating a new Secure Boot signing key:
Generating a 2048 bit RSA private key
...............................................+++
...........+++
writing new private key to '/var/lib/shim-signed/mok/MOK.priv'
-----
- /var/lib/dkms/rtl8723bu/4.3.6.11_12942.20141204_BTCOEX20140507-4E40/4.15.0-30-generic/x86_64/module/rtl8723bu.ko
Secure Boot not enabled on this system.
cleaning build area...
DKMS: build completed.
rtl8723bu.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.15.0-30-generic/updates/dkms/
depmod......
DKMS: install completed.
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area...
make -j2 KERNELRELEASE=4.15.0-30-generic -C /lib/modules/4.15.0-30-generic/build M=/var/lib/dkms/rtlwifi-new/0.10/build....(bad exit status: 2)
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/rtlwifi-new-dkms.0.crash'
Error! Bad return status for module build on kernel: 4.15.0-30-generic (x86_64)
Consult /var/lib/dkms/rtlwifi-new/0.10/build/make.log for more information.
boundule@BUDDY:~/rtl8723bu$
您的设备使用驱动程序 8723bu。它必须从源代码编译。通过以太网、系留或任何可能的方式建立有效的互联网连接,打开终端并执行以下操作:
重启。如果启用了安全引导,则必须禁用它才能加载内核外模块。
编辑:通常情况下,当默认驱动程序期望在连接 #2 上看到信号时,弱信号是天线线连接到卡上连接 #1 的症状。当然,您可以打开笔记本电脑并切换电线,或者您可以添加一个驱动程序参数,允许在驱动程序级别选择天线。
重启。
如果这无效,请使用 rtw_ant_num=2 重复该过程。重启。
编辑 2:我们看到您喜欢的路由器设置为使用 TKIP 加密以及 WPA 和 WPA2 混合模式。请更改路由器中的设置。
首选 WPA2-AES;不是任何 WPA 和 WPA2 混合模式,当然也不是 TKIP。其次,如果您的路由器能够实现 N 速度,您可能会在 2.4 GHz 频段中使用 20 MHz 的通道宽度而不是自动 20/40 MHz 获得更好的连接性,尽管它可能会影响 N 速度。固定频道(1、6 或 11)比自动频道选择要好。此外,请确保路由器未设置为仅使用 N 速度;自动 B、G 和 N 是首选。进行这些更改后,重新启动路由器。
接下来,我建议明确设置您的监管域。检查你的:
如果你得到 00,那是一个千篇一律的设置。在这里找到你的:http ://en.wikipedia.org/wiki/ISO_3166-1_alpha-2然后临时设置它:
当然,如果不是冰岛,请替换您的国家/地区代码。永久设置:
将最后一行更改为:
仔细校对,保存并关闭文本编辑器。
接下来,让我们尝试一下驱动程序中可能有用的每个设置并进行测试:
现在测试:
您的首选路由器现在强度更高了吗?如果没有,请尝试:
现在测试:
您的首选路由器现在强度更高了吗?如果没有,请尝试:
...这是您设置的原始设置。
如果这些步骤都没有用,我建议您在此处向驱动程序的作者提出问题:https ://github.com/lwfinger/rtl8723bu/issues
编辑 3:我们将对 Makefile 进行修改。首先,我们需要移除模块;接下来,更改 Makefile,最后重建。
从终端:
现在导航到 git 克隆驱动程序的位置;也许它是你的主目录:
转到第 21 行并更改此行:
要注释掉它,像这样:
仔细校对两次。保存(Ctrl+o 后按 Enter)并退出 (Ctrl+x) 文本编辑器。
现在重建并安装驱动程序:
重新启动并告诉我们是否有任何改进。
在 chili555 和其他不同来源的帮助下进行深入分析后,我的问题通过以下方式解决:
第一步:
第二步:
这确保了旧驱动程序不用于我的设备。在我的情况下,有问题的驱动程序是 rtl8xxxu。所以我把它列入黑名单。
第 3 步: 现在我在新驱动程序的 makefile 中禁用了一行,因为没有这个 hack,无线芯片组的两个实例显示在网络管理器中(就像 chili555 的编辑 3 一样)
转到第 21 行并更改此行:
要注释掉它,像这样:
保存(Ctrl+o 后按 Enter)并退出 (Ctrl+x) 文本编辑器。
第四步: 现在构建并安装驱动程序:
第五步: 最后,用这个命令安装编译好的模块:
重新启动计算机。