从 14.04 更新后出现 16.04 Wifi/以太网问题

从 14.04 更新后出现 16.04 Wifi/以太网问题

将 Ubuntu 从 14.04 升级到 16.04 后,我的 wifi 连接遇到了一些问题。

通过有线连接检查一下(注意响应延迟)。

leo@nelson:~$ ping facebook.com
PING facebook.com (66.220.158.68) 56(84) bytes of data.
64 bytes from edge-star-mini-shv-07-frc3.facebook.com (66.220.158.68): icmp_seq=1 ttl=75 time=154 ms
64 bytes from edge-star-mini-shv-07-frc3.facebook.com (66.220.158.68): icmp_seq=2 ttl=75 time=155 ms
64 bytes from edge-star-mini-shv-07-frc3.facebook.com (66.220.158.68): icmp_seq=3 ttl=75 time=155 ms
64 bytes from edge-star-mini-shv-07-frc3.facebook.com (66.220.158.68): icmp_seq=4 ttl=75 time=154 ms
64 bytes from edge-star-mini-shv-07-frc3.facebook.com (66.220.158.68): icmp_seq=5 ttl=75 time=155 ms
64 bytes from edge-star-mini-shv-07-frc3.facebook.com (66.220.158.68): icmp_seq=6 ttl=75 time=155 ms
64 bytes from edge-star-mini-shv-07-frc3.facebook.com (66.220.158.68): icmp_seq=7 ttl=75 time=155 ms
64 bytes from edge-star-mini-shv-07-frc3.facebook.com (66.220.158.68): icmp_seq=8 ttl=75 time=156 ms
64 bytes from edge-star-mini-shv-07-frc3.facebook.com (66.220.158.68): icmp_seq=9 ttl=75 time=156 ms
64 bytes from edge-star-mini-shv-07-frc3.facebook.com (66.220.158.68): icmp_seq=10 ttl=75 time=162 ms
64 bytes from edge-star-mini-shv-07-frc3.facebook.com (66.220.158.68): icmp_seq=11 ttl=75 time=154 ms
64 bytes from edge-star-mini-shv-07-frc3.facebook.com (66.220.158.68): icmp_seq=12 ttl=75 time=154 ms
64 bytes from edge-star-mini-shv-07-frc3.facebook.com (66.220.158.68): icmp_seq=13 ttl=75 time=155 ms
^C
--- facebook.com ping statistics ---
13 packets transmitted, 13 received, 0% packet loss, time 12001ms
rtt min/avg/max/mdev = 154.211/155.791/162.531/2.067 ms

但当我切换到 WiFi 时:

leo@nelson:~$ ping facebook.com
PING facebook.com (66.220.158.68) 56(84) bytes of data.
64 bytes from edge-star-mini-shv-07-frc3.facebook.com (66.220.158.68): icmp_seq=1 ttl=79 time=323 ms
64 bytes from edge-star-mini-shv-07-frc3.facebook.com (66.220.158.68): icmp_seq=2 ttl=79 time=361 ms
64 bytes from edge-star-mini-shv-07-frc3.facebook.com (66.220.158.68): icmp_seq=3 ttl=79 time=1008 ms
64 bytes from edge-star-mini-shv-07-frc3.facebook.com (66.220.158.68): icmp_seq=4 ttl=79 time=652 ms
64 bytes from edge-star-mini-shv-07-frc3.facebook.com (66.220.158.68): icmp_seq=5 ttl=79 time=999 ms
64 bytes from edge-star-mini-shv-07-frc3.facebook.com (66.220.158.68): icmp_seq=6 ttl=79 time=1010 ms
64 bytes from edge-star-mini-shv-07-frc3.facebook.com (66.220.158.68): icmp_seq=7 ttl=79 time=1003 ms
64 bytes from edge-star-mini-shv-07-frc3.facebook.com (66.220.158.68): icmp_seq=8 ttl=79 time=1008 ms
64 bytes from edge-star-mini-shv-07-frc3.facebook.com (66.220.158.68): icmp_seq=9 ttl=79 time=420 ms
64 bytes from edge-star-mini-shv-07-frc3.facebook.com (66.220.158.68): icmp_seq=10 ttl=79 time=266 ms
64 bytes from edge-star-mini-shv-07-frc3.facebook.com (66.220.158.68): icmp_seq=11 ttl=79 time=168 ms
64 bytes from edge-star-mini-shv-07-frc3.facebook.com (66.220.158.68): icmp_seq=12 ttl=79 time=1009 ms
64 bytes from edge-star-mini-shv-07-frc3.facebook.com (66.220.158.68): icmp_seq=13 ttl=79 time=1005 ms
64 bytes from edge-star-mini-shv-07-frc3.facebook.com (66.220.158.68): icmp_seq=14 ttl=79 time=471 ms
^C
--- facebook.com ping statistics ---
14 packets transmitted, 14 received, 0% packet loss, time 13028ms
rtt min/avg/max/mdev = 168.777/693.596/1010.408/329.180 ms, pipe 2

我在同一个地方使用 2 个不同的互联网提供商和 2 个不同的路由器。两个连接都出现同样的问题。我也尝试过使用其他装有 Ubuntu 12.04 的电脑,效果很好。

自从我安装了 16.04 以来,我就遇到了这个问题

附加信息:我一直使用有线连接来工作,因为它无法通过 wifi 使用...但有时(每隔约 20-30 分钟)有线连接会断开(我使用不同 ISP 的两个路由器都会发生这种情况)。

小米无线网卡信息:

leo@nelson:~$ sudo lshw -class network
sudo: imposible resolver el anfitrión nelson
[sudo] password for leo: 
  *-network               
       descripción: Ethernet interface
       producto: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       fabricante: Realtek Semiconductor Co., Ltd.
       id físico: 0
       información del bus: pci@0000:01:00.0
       nombre lógico: eth0
       versión: 06
       serie: 4c:72:b9:58:9c:95
       tamaño: 100Mbit/s
       capacidad: 1Gbit/s
       anchura: 64 bits
       reloj: 33MHz
       capacidades: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuración: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168e-3_0.0.4 03/27/12 ip=192.168.0.18 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
       recursos: irq:28 ioport:e000(size=256) memoria:d0004000-d0004fff memoria:d0000000-d0003fff
  *-network
       descripción: Interfaz inalámbrica
       producto: RT5390 Wireless 802.11n 1T/1R PCIe
       fabricante: Ralink corp.
       id físico: 0
       información del bus: pci@0000:02:00.0
       nombre lógico: wlan0
       versión: 00
       serie: 20:10:7a:8e:3d:66
       anchura: 32 bits
       reloj: 33MHz
       capacidades: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuración: broadcast=yes driver=rt2800pci driverversion=4.4.0-34-generic firmware=0.34 ip=192.168.1.157 latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn
       recursos: irq:17 memoria:fea00000-fea0ffff

正如@chili555所问,这里是“dmesg | grep rt2”输出

leo@nelson:~$ dmesg | grep rt2
[   14.104800] rt2800pci 0000:02:00.0: enabling device (0000 -> 0002)
[   14.105008] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5390, rev 0502 detected
[   14.109544] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 5390 detected
[   78.812904] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2860.bin'
[   79.015681] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.34
[  105.903521] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[  106.351522] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[  106.799553] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[  107.247543] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[  107.759574] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[  108.211584] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[  108.727599] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[  109.555615] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[  148.965666] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[  149.413726] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[  149.925810] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[  150.777953] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[  367.323945] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[  368.171986] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[  368.944044] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[  369.448049] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[  469.630931] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[  470.478973] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[  470.931053] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[  471.387076] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[  471.843081] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[  472.291140] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[  472.739165] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[  473.191144] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[  473.691199] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[  474.191255] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[ 1191.044092] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[ 1191.816158] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[ 1192.316182] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[ 4549.926258] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[ 5030.979039] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[ 5031.427145] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[ 5031.883092] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[ 5032.655142] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[ 7430.737637] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[ 7431.185659] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[ 7432.033748] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[ 7432.497744] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[ 7432.997769] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[ 7433.497799] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush
[10551.963800] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush

添加了 Jeremy31 请求的 iwconfig

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

eno1      no wireless extensions.

enp0s19f2u5  no wireless extensions.

wlp2s0    IEEE 802.11bgn  ESSID:"Liit"  
          Mode:Managed  Frequency:2.462 GHz  Access Point: 54:BE:F7:61:84:25   
          Bit Rate=11 Mb/s   Tx-Power=20 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=43/70  Signal level=-67 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:1637  Invalid misc:528   Missed beacon:0

答案1

我建议你尝试一个驱动程序参数。从终端:

sudo -i
echo "options rt2800pci nohwcrypt=Y"  >  /etc/modprobe.d/rt2800pci.conf
exit.

重启。有什么改善吗?检查消息日志:

dmesg | grep rt2

您上面发布的错误、警告等是变好、相同还是变差了?

如果你想尝试编译向后移植, 我建议:

cd ~/Downloads/backports-4.2.2-1

或者您下载该包的任何地方,如果没有下载。

make defconfig-wifi
make
sudo make install

在此情况下,命令“make”需要很长时间。请耐心等待。重新启动。有任何改善吗?检查消息日志:

dmesg | grep rt2

答案2

您可能必须将 r8169 驱动程序列入黑名单,然后尝试从 universe 存储库安装 r8168 驱动程序 r8168-dkms。套餐详情

如果这不能解决您的有线连接问题,请尝试更换跳线,因为它可能存在间歇性短路。

就无线而言,你应该尝试2011_1007_RT5390_RT5392_Linux_STA_V2.5.0.3_DPO 已更新,可与 Linux 内核 3.8 及以上版本兼容。安装说明在同一页。如果您觉得有价值,我会在这里复制它们。

编辑:据@Nelson Galdeman Graziano 报道,最近的更新似乎解决了这个问题。因此,首先要尝试的sudo apt updatesudo apt upgrade

来源:

http://packages.ubuntu.com/search?keywords=r8168&searchon=names&suite=xenial§ion=all

答案3

无线网卡上的电源管理已启用。要在启动时禁用

sudo -H gedit /lib/systemd/system/wifi-power-management-off.service
输入以下内容
[Unit]
Description=Disable power management for wlan0
Requires=sys-subsystem-net-devices-wlan0.device
After=network.target

[Service] Type=oneshot ExecStartPre= /bin/sleep 25 ExecStart=/sbin/iwconfig wlan0 power off

[Install] WantedBy=multi-user.target

保存文件,退出 gedit,然后
systemctl enable wifi-power-management-off.service

这可能会提示您输入两次密码,重新启动

如果你在挂起/睡眠后遇到问题,那么你还需要

sudo -H gedit /etc/systemd/system/root-resume.service
进入
[Unit]
Description=Turn off wlan power management
After=suspend.target

[Service] Type=simple ExecStartPre= /bin/sleep 25 ExecStart= /sbin/iwconfig wlan0 power off

[Install] WantedBy=suspend.target

并激活

sudo systemctl enable root-resume

睡眠/暂停修复的来源是https://askubuntu.com/a/614245/300665

相关内容