402 字
2 分钟
待机后 Wi-Fi 频繁断开问题排查
问题描述
Debian 系统待机了几天,终端中出现了以下错误信息:
root@xh-8745:~# [54752.126446] iwlwifi 0000:04:00.0: No beacon heard and the session protection is over already...[54755.308518] iwlwifi 0000:04:00.0: No beacon heard and the session protection is over already...[142103.828226] iwlwifi 0000:04:00.0: Unhandled alg:0x3f0707[142103.829683] iwlwifi 0000:04:00.0: Unhandled alg:0x3f0707[519059.901737] iwlwifi 0000:04:00.0: No beacon heard and the session protection is over already...[732665.451691] iwluifi 0000:04:00.0: Not associated and the session protection is over already...[740482.146316] iwlwifi 0000:04:00.0: Not associated and the session protection is over already...[748394.177118] iwlwifi 0000:04:00.0: Not associated and the session protection is over already...[756106.464972] iwlwifi 0000:04:00.0: Not associated and the session protection is over already...[761989.387681] iwlwifi 0000:04:00.0: Not associated and the session protection is over already...查询 AI 后怀疑是频繁断网问题。路由器经确认无异常,其他设备连接状态正常。
排查步骤
1. 查看无线网卡状态
root@xh-8745:/home/xh# iwconfig wlp4s0wlp4s0 IEEE 802.11 ESSID:"k3p" Mode:Managed Frequency:5.18 GHz Access Point: 6A:34:26:12:7A:0E Bit Rate=1.1342 Gb/s Tx-Power=22 dBm Retry short limit:7 RTS thr:off Fragment thr:off Encryption key:off Power Management:on Link Quality=70/70 Signal level=-34 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:58 Missed beacon:02. 问题定位
发现 Power Management:on,即 Wi-Fi 省电模式已开启,这可能是导致频繁断网的原因。
3. 解决方案:关闭 Wi-Fi 省电模式
方案一:临时关闭(重启后失效)
iwconfig wlp4s0 power off方案二:永久关闭
修改 NetworkManager 配置文件:
vim /etc/NetworkManager/conf.d/wifi-powersave.conf添加以下内容:
[connection]wifi.powersave = 2参数说明:
| 值 | 含义 |
|---|---|
| 0 | 默认 |
| 1 | 忽略 |
| 2 | 禁用(推荐) |
| 3 | 启用 |
4. 生效配置
修改完成后重启 NetworkManager:
systemctl restart NetworkManager5. 验证结果
检查省电模式是否已关闭:
iwconfig wlp4s0 | grep Power输出 Power Management:off 即表示设置成功。
后续观察
待机和重启后持续观察是否还有类似报错。
待机后 Wi-Fi 频繁断开问题排查
https://fuwari.cbba.top/posts/待机后-wi-fi-频繁断开问题排查/