问题现象
Fedora 43, kernel 6.19.11, Intel WiFi (iwlmld 驱动), 5GHz 802.11ax (HE) 连接。
dmesg 持续刷屏:
text
iwlwifi 0000:09:00.0: missed beacons exceeds threshold, but receiving data. Stay connected, Expect bugs.
每条消息间隔精确 0.102s = beacon interval (100ms),说明每个 beacon 周期都丢 。最终触发 Connection to AP lost 真实断线。
源码分析(kernel 6.19)
触发路径:drivers/net/wireless/intel/iwlwifi/mld/link.c
text
// line ~46192
void iwl_mld_handle_missed_beacon_notif(struct iwl_mld *mld, struct iwl_rx_packet *pkt)
{
u32 missed_bcon = le32_to_cpu(notif->consec_missed_beacons);
u32 missed_bcon_since_rx = le32_to_cpu(notif->consec_missed_beacons_since_last_rx);
if (missed_bcon >= IWL_MLD_MISSED_BEACONS_THRESHOLD_LONG) {
if (missed_bcon_since_rx >= IWL_MLD_MISSED_BEACONS_SINCE_RX_THOLD) {
ieee80211_connection_loss(vif); // 真实断线
return;
}
IWL_WARN(mld, "missed beacons exceeds threshold, but receiving data...");
return;
}
}
两个阈值:
| 常量 | 默认值 | 含义 |
|---|---|---|
| IWL_MLD_MISSED_BEACONS_THRESHOLD_LONG | 16 | 连续丢失 beacon 总数阈值 |
| IWL_MLD_MISSED_BEACONS_SINCE_RX_THOLD | 4 | 自上次收到数据后连续丢失阈值(触发断线) |
disable_11ax 与 HE 参数关联(line ~45937)
text
if (!link->he_support || iwlwifi_mod_params.disable_11ax ||
(vif->type == NL80211_IFTYPE_STATION && !vif->cfg.assoc)) {
changes &= ~LINK_CONTEXT_MODIFY_HE_PARAMS; // 跳过 HE 参数下发固件
goto send_cmd;
}
disable_11ax=1 直接让驱动跳过 HE 参数配置,固件退回 VHT (802.11ac) beacon monitor 逻辑,绕开 HE beacon timing 不兼容问题。
根因分析
为什么 power_scheme=1 和 power_save=off 不够?
这两个参数只控制电源管理策略,不影响 802.11ax (HE) 的 beacon 处理逻辑。iwlmld 驱动对 HE beacon 有独立的 timing 期望:
- 802.11ax 引入 TWT (Target Wake Time) 和 OFDMA 资源调度
- iwlmld 是 Intel 新一代 Multi-Link Driver(为 Wi-Fi 7 设计),对 11ax beacon timing 比 iwlmvm 更严格
- 部分消费级路由器的 11ax beacon 发送时序与 iwlmld 期望不完全匹配
- 固件的 beacon monitor 计时器按固定间隔超时 → 每个 beacon 周期都报 missed
- 数据帧有独立 EDCA/TXOP 机制,不受影响 → "receiving data" 仍然正常
为什么 bt_coex_active=0 不是关键?
BT 共存的时间窗口分配是随机的,不会精确地每 100ms 触发一次。日志中 0.102s 的精确间隔排除了 BT 共存作为主因。
上游 Bug 状态
Bug 203709 (bugzilla.kernel.org) --- OPEN,未修复
"evidence has been presented indicating that this is likely a firmware bug, but no firmware fix has been documented on the tracker, and new issue reports continue to surface."
- 影响 kernel 5.x → 6.19+(2019-2026),跨越多年
- 影响多型号:AX200/AX201/AX210/8265/7260 等
- Intel 承认但从未提供固件修复
相关 Patch
| Patch | 状态 | 说明 |
|---|---|---|
| "Make missed beacon timeout configurable"(2022) | 未合入 | 将硬编码阈值 16 改为 beacon_timeout 参数;Intel 回复要修固件但从未兑现 |
| "iwlmld: always do MLO scan before link selection"(2025-03) | 已合入 | 改善 missed beacon 后的行为(触发 MLO scan),但不解决根因 |
Workaround(社区验证有效)
方案 B:disable_11ax=1(推荐,理论依据最强)
text
# /etc/modprobe.d/iwlwifi.conf
options iwlwifi disable_11ax=1 power_save=0
# 立即生效(短暂断网)
sudo modprobe -r iwlmld && sudo modprobe iwlmld
速度从 1200Mbps 降至约 867Mbps(VHT 80MHz),日常无感知。
完整优化配置
text
# /etc/modprobe.d/iwlwifi.conf --- 禁用 11ax + 省电
options iwlwifi disable_11ax=1 power_save=0
# /etc/modprobe.d/iwlmld.conf --- 驱动层 CAM 模式
options iwlmld power_scheme=1
# /etc/NetworkManager/conf.d/wifi-power.conf --- NM 层省电
[connection]
wifi.powersave = 2
三层配置的关系
| 层级 | 配置 | 作用 |
|---|---|---|
| 协议层 | disable_11ax=1 | 退回 VHT,绕开 HE beacon timing 固件 bug |
| 驱动层 | power_scheme=1 (CAM) | 关闭驱动级电源管理,radio 保持全功率 |
| NM 层 | wifi.powersave=2 | 关闭 NetworkManager 电源管理 |
参考链接
- Bug 203709:
https://bugzilla.kernel.org/show_bug.cgi?id=203709 - Patch "Make missed beacon timeout configurable":
https://patchwork.kernel.org/project/linux-wireless/patch/20220226045047.643695-1-mikezackles@gmail.com/ - 源码 (kernel 6.19 iwlmld link.c):
https://elixir.bootlin.com/linux/v6.19/source/drivers/net/wireless/intel/iwlwifi/mld/link.c - Arch Linux Forum 讨论:
https://bbs.archlinux.org/viewtopic.php?id=296047