20.10 服务器 WiFi 频繁断线

20.10 服务器 WiFi 频繁断线

我们安装了一台装有 Intel 无线网卡的 Ubuntu 20.10 服务器,WiFi 极不稳定,经常断线,几乎每分钟一次。详情如下:Ubuntu 版本:

Distributor ID: Ubuntu
Description:    Ubuntu 20.10
Release:    20.10
Codename:   groovy

Linux 内核是:

5.8.0-43-generic

硬件版本如下:

00:14.3 Network controller: Intel Corporation Wireless-AC 9462

系统日志有以下错误:

Apr 28 20:49:37 wpa_supplicant[916]: wlp0s20f3: CTRL-EVENT-BEACON-LOSS
Apr 28 20:49:37 wpa_supplicant[916]: message repeated 2 times: [ wlp0s20f3: CTRL-EVENT-BEACON-LOSS ]
Apr 28 20:49:37 wpa_supplicant[916]: wlp0s20f3: CTRL-EVENT-DISCONNECTED bssid=e4:c3:2a:21:6b:49 reason=4 locally_generated=1
Apr 28 20:49:38 ntpd[1153]: Deleting interface #82 wlp0s20f3, 192.168.1.22#123, interface stats: received=1, sent=1, dropped=0, active_time=83 secs
Apr 28 20:49:38 ntpd[1153]: Deleting interface #83 wlp0s20f3, fe80::46af:28ff:fe0a:9c9f%3#123, interface stats: received=0, sent=0, dropped=0, active_time=83 secs
Apr 28 20:49:38 wpa_supplicant[916]: wlp0s20f3: SME: Trying to authenticate with e4:c3:2a:21:6b:49 (SSID='test' freq=2412 MHz)
Apr 28 20:49:38 kernel: [ 4105.452210] wlp0s20f3: authenticate with e4:c3:2a:21:6b:49
Apr 28 20:49:38 kernel: [ 4105.457695] wlp0s20f3: send auth to e4:c3:2a:21:6b:49 (try 1/3)
Apr 28 20:49:38 wpa_supplicant[916]: wlp0s20f3: Trying to associate with e4:c3:2a:21:6b:49 (SSID='test' freq=2412 MHz)
Apr 28 20:49:38 kernel: [ 4105.561893] wlp0s20f3: send auth to e4:c3:2a:21:6b:49 (try 2/3)
Apr 28 20:49:38 kernel: [ 4105.564522] wlp0s20f3: authenticated
Apr 28 20:49:38 kernel: [ 4105.565689] wlp0s20f3: associate with e4:c3:2a:21:6b:49 (try 1/3)
Apr 28 20:49:38 kernel: [ 4105.570818] wlp0s20f3: RX AssocResp from e4:c3:2a:21:6b:49 (capab=0x431 status=0 aid=5)
Apr 28 20:49:38 wpa_supplicant[916]: wlp0s20f3: Associated with e4:c3:2a:21:6b:49
Apr 28 20:49:38 wpa_supplicant[916]: wlp0s20f3: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Apr 28 20:49:38 kernel: [ 4105.574803] wlp0s20f3: associated
Apr 28 20:49:38 wpa_supplicant[916]: wlp0s20f3: WPA: Key negotiation completed with e4:c3:2a:21:6b:49 [PTK=CCMP GTK=TKIP]
Apr 28 20:49:38 wpa_supplicant[916]: wlp0s20f3: CTRL-EVENT-CONNECTED - Connection to e4:c3:2a:21:6b:49 completed [id=0 id_str=]

上述系统日志几乎每分钟都会连续出现。

启动出现以下与驱动程序相关的错误:

[    6.028328] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-56.ucode failed with error -2
[    6.032948] iwlwifi 0000:00:14.3: loaded firmware version 55.d9698065.0 QuZ-a0-hr-b0-55.ucode op_mode iwlmvm
[    6.032975] iwlwifi 0000:00:14.3: Direct firmware load for iwl-debug-yoyo.bin failed with error -2

如果有人遇到过类似的问题并且能够解决,请告诉我。我们已经禁用了默认的 netplan 并使用 ifupdown+wpa_supplicant 干杯!

答案1

在更多英特尔 wifi 卡用户升级到 >=5.1 内核后,此处会出现“信标丢失”报告。重要的日志行如下:

wpa_supplicant: wlp0s20f3: CTRL-EVENT-BEACON-LOSS
wpa_supplicant: wlp0s20f3: CTRL-EVENT-DISCONNECTED bssid=.. reason=4 locally_generated=1

要点:从内核 5.1 开始,iwlwifi更加严格当未看到一定数量的信标时,断开连接。虽然丢失本身可能有不同的原因(接入点设置/频谱环境/错误),但如果稳定的连接优先于最佳性能或省电功能,则当前值从用户角度来看过于混乱。

您可以在bugid中阅读#203709. 解决方法修补于 1 月份提出,将常量作为内核构建之外的运行时参数。如果您想尝试一下(在笔记本电脑上编译需要修改 4 个文件并花费约 2 小时),请按照构建自己的内核docs,然后在启动时设置模块参数或写入/sys/module/iwlwifi/parameters/beacon_timeout并密切关注这一点,直到解决方案合并。

答案2

在此讨论主题中修补其中一位成员提到要切换WIFI模式

80211n 支持

键入 11bg 支持,帮助解决了我的问题。Ping 延迟非常低,yjrtr 几乎没有 CTRL-EVENT-BEACON-LOSS 报告。

ping低延迟:

Ping 低延迟

不再有 CTRL-EVENT-BEACON-LOSS 报告:

[不再有 CTRL-EVENT-BEACON-LOSS 报告

我正在使用 TP-Link 无线 N 路由器 WR840N 型号 TL-WR840N,它有 2 种 WIFI 模式:

a. 11bg混合
b. 11bgn 混合

我的 Debian-10 操作系统,$ uname -a Linux debian-pc 4.19.0-21-amd64 #1 SMP Debian 4.19.249-2 (2022-06-30) x86_64 GNU/Linux

相关内容