16.04与Realtek适配器的LTS wifi连接问题

安装16.04 LTS后,我发现了wifi连接的几个问题。

首先,睡眠或hibernate后wifi无法正常重新连接。 有时网络图标在唤醒后变成“向上和向下箭头”(我不知道它是什么)但仍然连接。 有时网络丢失了,它不会在列表中显示任何网络,所以根本就没有办法使用wifi。

我首先尝试通过运行sudo service network-manager restart 。 它起作用但不是永久性的解决方案。

然后根据另一个线程,我添加了SUSPEND_MODULES="iwlwifi"

 /etc/pm/config.d/config 

执行此操作后,重新连接问题似乎已修复(可以自动重新连接,图标不再更改。)但是,我发现即使计算机正在运行并且网络图标,wifi连接也会随机丢失(大约每30分钟一次)连接丢失时仍保持连接状态。

添加代码后的另一个问题是,当我将计算机置于睡眠状态时,屏幕将关闭一秒钟,然后重新打开约5秒钟(在此期间系统将切断wifi连接)。 然后计算机将在这个不寻常的“两阶段”过程后进入睡眠状态。

Plz在下面找到无线卡信息

 *-network description: Wireless interface product: RTL8723BE PCIe Wireless Network Adapter vendor: Realtek Semiconductor Co., Ltd. physical id: 0 bus info: pci@0000:02:00.0 logical name: wlp2s0 version: 00 serial: b0:c0:90:5c:1c:d5 width: 64 bits clock: 33MHz capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless configuration: broadcast=yes driver=rtl8723be driverversion=4.4.0-21-generic firmware=N/A ip=192.168.0.8 latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn resources: irq:16 ioport:d000(size=256) memory:df200000-df203fff 00:00.0 Host bridge: Intel Corporation Sky Lake Host Bridge/DRAM Registers (rev 07) 00:01.0 PCI bridge: Intel Corporation Sky Lake PCIe Controller (x16) (rev 07) 00:02.0 VGA compatible controller: Intel Corporation Sky Lake Integrated Graphics (rev 06) 00:14.0 USB controller: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller (rev 31) 00:14.2 Signal processing controller: Intel Corporation Sunrise Point-H Thermal subsystem (rev 31) 00:16.0 Communication controller: Intel Corporation Sunrise Point-H CSME HECI #1 (rev 31) 00:17.0 SATA controller: Intel Corporation Sunrise Point-H SATA controller [AHCI mode] (rev 31) 00:1c.0 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #1 (rev f1) 00:1d.0 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #9 (rev f1) 00:1f.0 ISA bridge: Intel Corporation Sunrise Point-H LPC Controller (rev 31) 00:1f.2 Memory controller: Intel Corporation Sunrise Point-H PMC (rev 31) 00:1f.3 Audio device: Intel Corporation Sunrise Point-H HD Audio (rev 31) 00:1f.4 SMBus: Intel Corporation Sunrise Point-H SMBus (rev 31) 00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (2) I219-V (rev 31) 01:00.0 VGA compatible controller: NVIDIA Corporation GK208 [GeForce GT 730] (rev a1) 01:00.1 Audio device: NVIDIA Corporation GK208 HDMI/DP Audio Controller (rev a1) 02:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter 03:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller (rev 01) 

05/01/2016更新:我​​不知道发生了什么,但问题现在变得更糟。 Wifi连接每5分钟丢失一次,我必须重新连接或重新启动网络管理器。

最后,我尝试了一些不同的方法后解决了这些问题。

  1. 通过运行sudo lshw -class network获取PCI无线网卡的详细信息
  2. 根据产品系列获取您的卡片型号信息。
    例如,正如您在问题描述中所看到的那样
    product: RTL8723BE PCIe Wireless Network Adapter所以我的卡的型号是RTL8723BE

    或者product: RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller所以我的型号是RTL8101/2/6E

  3. 授予权限sudo chmod 755 /etc/pm/config.d/

  4. 打开或创建config并添加SUSPEND_MODULES="rtl8723be" (将rtl8723be替换为您自己的型号)
    然后跑
    echo "options rtl8723be fwlps=N" | sudo tee /etc/modprobe.d/rtl8723be.conf
    (注意当用我的卡替换rtl8723beRTL8101/2/6E我应该只输入.../modprobe.d/RTL8101.conf ;并且不应该写/2/6E

最终重启您的系统。

现在你的系统应该能够在睡眠后自动重新连接,并且在完成此操作后,wifi连接永远不会丢失一次。

“向上/向下箭头可能是一个网络管理器错误,导致网络管理员认为wifi设备实际上是以太网。”,根据Jeremy31的说法。 在这里查看错误信息您应该能够通过安装NetworkManager-1.2.0来修复它。

感谢Jeremy31提供的解决方案。

我有完全一样的问题。 从睡眠中醒来后,wifi仍然有效但网络没有显示。 我通过重新启动网络管理器来解决问题。

sudo service network-manager restart

还是很讨厌。 我希望他们尽快解决这个问题。

这肯定是一个错误。 Bug已在https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1574347上提交

附加信息:我有与OP描述的完全相同的问题,但只有nm-applet图标更改为箭头并且不显示wifi信息的问题。 发生这种情况时,wifi仍可正常工作。

 $ killall nm-applet && nm-applet & 

让图标再次显示的技巧,所以现在只是一个解决方法,以防有人想把它放到脚本中。

可以在运行xubuntu-desktop软件包的两台独立计算机上确认此问题。

另外,两台电脑我都运行了最近的英特尔wifi卡。 (AC-7260的内容)

我遇到了同样的问题。 我通过在/etc/systemd/system/wifi-resume.service发布的仅适用于活动会话的那个;在重新启动时必须再次调用)来修复暂停唤醒问题:

 #/etc/systemd/system/wifi-resume.service #sudo systemctl enable wifi-resume.service [Unit] Description=Restart networkmanager at resume After=suspend.target After=hibernate.target After=hybrid-sleep.target [Service] Type=oneshot ExecStart=/bin/systemctl restart network-manager.service [Install] WantedBy=suspend.target WantedBy=hibernate.target WantedBy=hybrid-sleep.target 

然后在终端中发出此命令以激活它: sudo systemctl enable wifi-resume.service 。 此解决方案来自另一个askubuntu问题答案 ,并在暂停和重启后都可以使用。

然而,即使在修复之后,当我尝试切换wifi网络时,我也会获得与暂停唤醒时相同的行为:wifi基本上已经死了,有两个箭头,而applet说“ 设备没有准备好” 。 我可以通过发布sudo service network-manager restart来重启wifi,但我无法切换网络。

有没有其他人遇到这个和/或有解决方案???

我正在使用LinxuMint 18 Mate(ubuntu16.04)并遇到了同样的问题。

以上所有其他function在我的thinkpad T440S上对我不起作用。

到目前为止似乎唯一有效的解决方法是将内核升级到4.6.3

  • 转到这个网站 。

  • 获取以下文件:

     linux-headers-4.6.3-040603-generic_4.6.3-040603.201606241434_amd64.deb linux-headers-4.6.3-040603_4.6.3-040603.201606241434_all.deb linux-image-4.6.3-040603-generic_4.6.3-040603.201606241434_amd64.deb 
  • 从终端,转到包含上述文件的文件夹并运行:

     sudo dpkg -i *.deb sudo reboot 

如果您使用的是Virtualbox,请运行此sudo /sbin/vboxconfig

如果您要删除它们,请运行:

 sudo dpkg --purge linux-headers-4.6.3-040603 linux-headers-4.6.3-040603-generic 

经过一些更多的测试,情况几乎相同,我有wifi,但我的nm-applet无法看到我周围的所有WIFI。 所以不确定这是否是一个好的解决方法:-)

现在没有解决方案,但我找到了一个帮助我保持wlan的脚本:

 #!/bin/bash # Ping you most used DNS Server and reconnect on fail while true; do if ! ping -c 1 -w 1 8.8.8.8 > /dev/null; then # with "sudo iwconfig" you can examine your name of 'wlan0' nmcli d connect wlan0 fi sleep 2; done 

要自动启动此脚本,只需打开gnome-session-properties并将其添加到列表中。

可以在此网页上找到完整脚本(无需重新连接)。

如果未设置,则为内核当前监管域设置WIFI国家/地区代码

 iw reg get 

设置它

 sudo nano /etc/default/crda REGDOMAIN= 

重启。

只是添加接受的答案(有四个步骤)

出于某种原因,即使我不知道这意味着什么,只有一步对我来说足够了:

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