Realtek rtl8723be无线适配器上的Wifi无法正常工作。

我在这台电脑上使用的是Kubuntu 16.04。

我面临的问题是:

无线网络问题: 有时无法发现无线网络,并且会随机断开连接。 而且,当我连接到WiFi时,速度非常慢。但是当我启动Windows时一切都很顺利。 关于无线网卡的信息:

abhishek@hp:~$ sudo lshw | grep wireless
                   description: Bluetooth wireless interface
                capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
                configuration: broadcast=yes driver=rtl8723be driverversion=4.4.0-22-generic firmware=N/A ip=192.168.1.13 latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn

硬件信息:

$ lspci |grep Network
03:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter

abhishek@hp:~$ cat /etc/modprobe.d/rtl8723be.conf
options rtl8723be fwlps=N ips=N

与问题相关的dmesg输出:
[ 4288.272924] pcieport 0000:00:1c.5: PCIe Bus Error: severity=Corrected, type=Physical Layer, id=00e5(Receiver ID)
[ 4288.272935] pcieport 0000:00:1c.5:   device [8086:9d15] error status/mask=00000001/00000000
[ 4288.272943] pcieport 0000:00:1c.5:    [ 0] Receiver Error         (First)
[ 4297.800384] ------------[ cut here ]------------
[ 4297.800424] WARNING: CPU: 3 PID: 1355 at /build/linux-UbQGH5/linux-4.4.0/ubuntu/i915/intel_uncore.c:649 __unclaimed_reg_debug+0x80/0x90 [i915_bpo]()
[ 4297.800427] Unclaimed register detected after reading register 0x65f10
[ 4297.800428] Modules linked in: nvram msr cmac rfcomm drbg ansi_cprng ctr ccm bbswitch(OE) bnep nls_iso8859_1 nvidia_uvm(POE) arc4 rtl8723be(OE) btcoexist(OE) rtl_pci(OE) rtlwifi(OE) uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_core v4l2_common videodev media mac80211 intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp kvm snd_hda_codec_hdmi snd_hda_codec_realtek cfg80211 snd_hda_codec_generic snd_soc_skl snd_soc_skl_ipc snd_hda_ext_core snd_soc_sst_ipc snd_soc_sst_dsp snd_soc_core hp_wmi sparse_keymap rtsx_pci_ms memstick snd_compress ac97_bus btusb snd_pcm_dmaengine btrtl dw_dmac_core btbcm snd_hda_intel btintel snd_hda_codec bluetooth irqbypass crct10dif_pclmul crc32_pclmul aesni_intel snd_hda_core snd_hwdep snd_pcm aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd
[ 4297.800463]  joydev input_leds serio_raw wmi hp_accel lis3lv02d snd_seq_midi snd_seq_midi_event input_polldev hp_wireless snd_rawmidi snd_seq snd_seq_device snd_timer snd mei_me mei soundcore shpchp tpm_crb int3403_thermal processor_thermal_device int340x_thermal_zone intel_soc_dts_iosf int3400_thermal acpi_thermal_rel acpi_pad mac_hid parport_pc ppdev lp parport autofs4 hid_generic usbhid hid rtsx_pci_sdmmc nvidia_drm(POE) i915_bpo nvidia_modeset(POE) nvidia(POE) intel_ips i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops psmouse r8169 rtsx_pci mii drm ahci libahci video fjes
[ 4297.800491] CPU: 3 PID: 1355 Comm: alsa-sink-ALC32 Tainted: P           OE   4.4.0-22-generic #39-Ubuntu
[ 4297.800492] Hardware name: HP HP Pavilion Notebook/80A4, BIOS F.78 03/07/2016
[ 4297.800494]  0000000000000086 00000000b30b4625 ffff880276dd7780 ffffffff813e9c53
[ 4297.800496]  ffff880276dd77c8 ffffffffc0cea888 ffff880276dd77b8 ffffffff81080fb2
[ 4297.800498]  0000000000000000 0000000000000001 0000000000065f10 ffff88026f890080
[ 4297.800500] Call Trace:
[ 4297.800506]  [<ffffffff813e9c53>] dump_stack+0x63/0x90
[ 4297.800509]  [<ffffffff81080fb2>] warn_slowpath_common+0x82/0xc0
[ 4297.800511]  [<ffffffff8108104c>] warn_slowpath_fmt+0x5c/0x80
[ 4297.800515]  [<ffffffff816f7588>] ? pci_conf1_write+0xb8/0xf0
[ 4297.800534]  [<ffffffffc0c5aac0>] __unclaimed_reg_debug+0x80/0x90 [i915_bpo]
[ 4297.800550]  [<ffffffffc0c609ae>] gen9_read32+0x35e/0x390 [i915_bpo]
[ 4297.800567]  [<ffffffffc0c66bb9>] i915_audio_component_codec_wake_override+0x39/0xb0 [i915_bpo]
[ 4297.800573]  [<ffffffffc0e839cf>] snd_hdac_set_codec_wakeup+0x3f/0xa0 [snd_hda_core]
[ 4297.800575]  [<ffffffffc0e970c7>] azx_runtime_resume+0x187/0x1b0 [snd_hda_intel]
[ 4297.800579]  [<ffffffff8143987b>] pci_pm_runtime_resume+0x7b/0xa0
[ 4297.800581]  [<ffffffff81556b23>] __rpm_callback+0x33/0x70
[ 4297.800584]  [<ffffffff81439800>] ? pci_restore_standard_config+0x40/0x40
[ 4297.800586]  [<ffffffff81556b84>] rpm_callback+0x24/0x80
[ 4297.800588]  [<ffffffff81439800>] ? pci_restore_standard_config+

到目前为止,我所尝试的:

sudo add-apt-repository ppa:hanipouspilot/rtlwifi   
sudo apt-get update    
sudo apt-get install rtlwifi-new-dkms linux-firmware

第一个解决方案来自这里。因为每次内核更新都需要重新编译,所以我没有尝试第二个解决方案。
我尝试了从https://github.com/lwfinger/rtlwifi_new安装,但它也不起作用。

嗨,你能帮我查一下这个文件是否存在吗:/etc/modprobe.d/rtl8723be.conf - ankit7540
@ankit7540 abhishek@hp:~$ ls /etc/modprobe.d/rtl8723be.conf /etc/modprobe.d/rtl8723be.conf abhishek@hp:~$ cat /etc/modprobe.d/rtl8723be.conf options rtl8723be fwlps=N ips=N@ankit7540 abhishek@hp:~$ ls /etc/modprobe.d/rtl8723be.conf /etc/modprobe.d/rtl8723be.conf abhishek@hp:~$ cat /etc/modprobe.d/rtl8723be.conf options rtl8723be fwlps=N ips=N - Abhishek Bhatia
尝试这个命令:echo "options rtl8723be fwlps=0 ips=0 ant_sel=2" | sudo tee /etc/modprobe.d/rtl8723be.conf这会对网络适配器的文件进行修改(包括电源设置和天线选择)。在修改完成后,重新启动并检查无线连接。 - ankit7540
@ankit7540 现在它可以发现无线网络。重新启动后,互联网连接在“一段时间”内工作,然后再次停止工作。 - Abhishek Bhatia
@ Abhishek Bhatia - 请尝试使用以下命令来选择天线1:echo "options rtl8723be fwlps=0 ips=0 ant_sel=1" | sudo tee /etc/modprobe.d/rtl8723be.conf。然后重新启动系统。 - ankit7540
@ankit7540和以前一样,有时候工作,有时候不工作。 - Abhishek Bhatia
哦,奇怪。你能给出sudo iw dev wlan0 scan | grep signal的输出吗?这是用来检查信号强度的。 - ankit7540
@ankit7540 我重新启动了几次,现在可以正常工作了。谢谢! - Abhishek Bhatia
我很高兴它能正常运行,不过我建议你连续运行一段时间并尝试下载等操作。(只要确保问题真的解决了!) - ankit7540
让我们在聊天中继续这个讨论 - ankit7540
2个回答

这个问题是一个持续存在的问题,以下更像是一个临时解决方案。
步骤1:添加最新驱动的存储库(由GitHub上的lwfinger维护)并安装它。
sudo add-apt-repository ppa:hanipouspilot/rtlwifi sudo apt-get update sudo apt-get install rtlwifi-new-dkms linux-firmware 如果您无法安装驱动程序,则从BIOS中禁用安全启动(某些笔记本电脑可能会出现此问题)。
您的无线适配器现在应该可以工作了(尽管可能信号较弱或在一段时间后断开连接)。
步骤2:编辑新驱动程序的配置文件以进行特定天线选择和电源管理。
- 首先备份。
sudo cp /etc/modprobe.d/rtl8723be.conf /etc/modprobe.d/rtl8723be.old.conf
然后,
echo "options rtl8723be fwlps=0 ips=0 ant_sel=2" | sudo tee /etc/modprobe.d/rtl8723be.conf
步骤3:重新启动。

你的无线适配器现在应该工作得更好了。建议在负载下测试无线连接一段时间。用户可以尝试使用ant_sel=1或删除此参数以确定最佳工作条件。每次更改后都需要重新启动。

更多信息:随着未来内核更新,不需要额外的配置,因为已经安装了linux-firmware

参考解决方案:rtl8723be的另一个问题

lwfinger在GitHub上进行的驱动程序开发:rtl8723be驱动程序。请关注以获取未来的更新。


如果我关闭Wi-Fi然后重新打开,它不起作用,即无法检测到任何附近的Wi-Fi。只有重新启动才能修复它。对此有什么想法吗? - Abhishek Bhatia

我已经搜索了几个小时,一直找到一个建议从https://github.com/lwfinger/rtlwifi_new/安装驱动程序的解决方案,但这个链接已经不存在
事实证明,现在不再需要那个驱动程序,因为它已经成为内核的一部分。但是你可能会遇到一个信号强度很差的问题,我自己在我的笔记本上也遇到了这个问题。
唯一需要做的就是在终端中执行以下命令:
sudo tee /etc/modprobe.d/rtl8723be.conf <<< "options rtl8723be ant_sel=1"

如建议所示这里。希望对遇到相同问题的人有所帮助。