正如标题所述,我的 wifi 有点奇怪。我已经在 Google 上搜索了一段时间,但还没有找到解决方案。我尝试过将sudo iwconfig wlo1 power off
线路更改wifi.powersave = 3
为。我尝试过重新启动、靠近路由器以及从其他设备测试网络。我(目前)没有以太网电缆可以进行测试。/etc/Network Manager/conf.d/default-wifi-powersave-on.conf
wifi.powersave = 2
sudo lshw -C network
(插入或拔出时)的输出为:
*-network
description: Wireless interface
product: Cannon Lake PCH CNVi WiFi
vendor: Intel Corporation
physical id: 14.3
bus info: pci@0000:00:14.3
logical name: wlo1
version: 10
serial: 04:d3:b0:ab:82:8b
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=iwlwifi driverversion=5.19.0-43-generic firmware=46.fae53a8b.0 9000-pu-b0-jf-b0- ip=192.168.2.143 latency=0 link=yes multicast=yes wireless=IEEE 802.11
resources: irq:16 memory:a4414000-a4417fff
*-network
description: Ethernet interface
product: QCA8171 Gigabit Ethernet
vendor: Qualcomm Atheros
physical id: 0
bus info: pci@0000:03:00.0
logical name: enp3s0
version: 10
serial: 30:9c:23:fe:34:2a
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm pciexpress msi msix bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=alx driverversion=5.19.0-43-generic latency=0 link=no multicast=yes port=twisted pair
resources: irq:16 memory:a4200000-a423ffff ioport:3000(size=128)
并输出
interface=$(nmcli -t -f active,device d wifi list | grep '^yes' | cut -d':' -f2)
echo -e "\n \033[1;33mInterface:\033[0m $interface"
signal_strength=$(iw dev $interface link | awk '/signal/ {print $2}')
echo -e " \033[1;33mSignal strength:\033[0m $signal_strength"
signal_quality=$(nmcli d wifi list ifname $interface | grep '*' | awk '{print $8}')
echo -e " \033[1;33mSignal quality:\033[0m $signal_quality"
signal_bars=$(nmcli -t -f active,bars d wifi list | grep '^yes' | awk -F: '{print $2}')
echo -e " \033[1;33mSignal bars:\033[0m $signal_bars"
speed=$(nmcli -t -f IN-USE,RATE dev wifi list | grep '*' | awk -F: '{print $2}')
echo -e " \033[1;33mWi-Fi Speed:\033[0m $speed"
channel=$(nmcli -t -f IN-USE,CHAN dev wifi list | grep '*' | awk -F: '{print $2}')
echo -e " \033[1;33mWi-Fi Channel:\033[0m $channel"
noise=$(awk 'NR==3 {print "Link: " $3 " Level: " $4 " Noise: " $5}' /proc/net/wireless)
echo -e " \033[1;33mWi-Fi Noise, Link and Quality Level:\033[0m $noise";
拔掉电源时:
Interface: wlo1
Signal strength: -66
Signal quality: Mbit/s
Signal bars: ▂▄▆_
Wi-Fi Speed: 540 Mbit/s
Wi-Fi Channel: 44
Wi-Fi Noise, Link and Quality Level: Link: 44. Level: -66. Noise: -256
插入后为:
Interface: wlo1
Signal strength: -63
Signal quality: Mbit/s
Signal bars: ▂▄▆_
Wi-Fi Speed: 540 Mbit/s
Wi-Fi Channel: 44
Wi-Fi Noise, Link and Quality Level: Link: 46. Level: -64. Noise: -256
编辑:感谢 waltinator 的建议,sudo journalctl --follow
我能够诊断并找到解决方案。此命令显示我遇到了重复的 Microcode SW 错误。谷歌搜索错误让我找到了这一页,底部的解决方案更改/sys/module/iwlwifi/parameters
为11n_disable=1 bt_coex_active=0 uapsd_disable=1
似乎已经解决了我的问题。