类似于这个问题:Activation of network connection failed,但我有以下问题。机器启动并在启动时连接到 wifi,但如果连接断开(出于任何原因),则连接不会重新启动并给出错误消息“网络连接激活失败”。我必须重新启动机器才能重新连接。如果我在第一次连接后尝试连接到不同的网络,也会发生这种情况。
我没有尝试解决这个问题,要么手动尝试连接到 wifi 网络,要么通过 systemctl 停止/重新启动网络管理器。
还有什么我可以尝试解决这个问题的,所以我不需要在每次它下降时重新启动?
我正在运行 Ubuntu 20.04,内核版本为 5.8.0-63-generic,因为我有一个 Realtek RTL8723DE wifi 适配器,并且没有更新的驱动程序(来自这里:https ://github.com/lwfinger/rtw88 )可用于更高的内核版本(请参阅我之前的问题:Realtek wifi driver for RTL8723DE for linux kernel version 5.11.0-26-generic (ubuntu 20.04))
请注意,我无法访问路由器进行有线连接,因此 wifi 是我唯一的连接选择。
编辑:按照下面的评论,我已将输出添加sudo journalctl -b 0 -u NetworkManager
到https://pastebin.ubuntu.com/p/WgTt6KGyyj/,显示网络第一次连接,然后在我关闭 wifi 后无法连接重新开始,通过一个循环,如:
Jun 14 21:07:40 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237260.5736] sup-iface[0x56336ea5ba10,wlo1]: supports 5 scan SSIDs
Jun 14 21:07:40 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237260.5778] device (wlo1): supplicant interface state: starting -> ready
Jun 14 21:07:40 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237260.5780] device (p2p-dev-wlo1): state change: unavailable -> disconnected (reason 'supplicant-available', sys-iface-state: 'managed')
Jun 14 21:07:40 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237260.5828] device (wlo1): state change: unavailable -> disconnected (reason 'supplicant-available', sys-iface-state: 'managed')
Jun 14 21:07:42 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237262.3582] policy: auto-activating connection 'Top Flat' (6a3647ab-a928-4d36-b895-e6a53f857391)
Jun 14 21:07:42 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237262.3595] device (wlo1): Activation: starting connection 'Top Flat' (6a3647ab-a928-4d36-b895-e6a53f857391)
Jun 14 21:07:42 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237262.3599] device (wlo1): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Jun 14 21:07:42 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237262.3610] manager: NetworkManager state is now CONNECTING
Jun 14 21:07:42 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237262.6724] device (wlo1): set-hw-addr: reset MAC address to A4:FC:77:7C:A3:0D (preserve)
Jun 14 21:07:42 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237262.6727] device (wlo1): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Jun 14 21:07:42 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237262.6731] device (wlo1): Activation: (wifi) access point 'Top Flat' has security, but secrets are required.
Jun 14 21:07:42 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237262.6731] device (wlo1): state change: config -> need-auth (reason 'none', sys-iface-state: 'managed')
Jun 14 21:07:42 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237262.7303] device (wlo1): supplicant interface state: ready -> disconnected
Jun 14 21:07:42 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237262.7303] device (p2p-dev-wlo1): supplicant management interface state: ready -> disconnected
Jun 14 21:07:42 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237262.7304] device (wlo1): supplicant interface state: disconnected -> inactive
Jun 14 21:07:42 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237262.7305] device (p2p-dev-wlo1): supplicant management interface state: disconnected -> inactive
Jun 14 21:07:42 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237262.7327] device (wlo1): state change: need-auth -> prepare (reason 'none', sys-iface-state: 'managed')
Jun 14 21:07:42 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237262.7334] device (wlo1): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Jun 14 21:07:42 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237262.7339] device (wlo1): Activation: (wifi) connection 'Top Flat' has security, and secrets exist. No new secrets needed.
Jun 14 21:07:42 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237262.7340] Config: added 'ssid' value 'Top Flat'
Jun 14 21:07:42 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237262.7340] Config: added 'scan_ssid' value '1'
Jun 14 21:07:42 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237262.7341] Config: added 'bgscan' value 'simple:30:-65:300'
Jun 14 21:07:42 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237262.7341] Config: added 'key_mgmt' value 'WPA-PSK WPA-PSK-SHA256 FT-PSK'
Jun 14 21:07:42 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237262.7341] Config: added 'psk' value '<hidden>'
Jun 14 21:07:42 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237262.7644] device (wlo1): supplicant interface state: inactive -> scanning
Jun 14 21:07:42 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237262.7645] device (p2p-dev-wlo1): supplicant management interface state: inactive -> scanning
Jun 14 21:07:44 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237264.4815] device (wlo1): supplicant interface state: scanning -> disconnected
Jun 14 21:07:44 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237264.4823] device (p2p-dev-wlo1): supplicant management interface state: scanning -> disconnected
Jun 14 21:07:44 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237264.5860] device (wlo1): supplicant interface state: disconnected -> scanning
Jun 14 21:07:44 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237264.5862] device (p2p-dev-wlo1): supplicant management interface state: disconnected -> scanning
Jun 14 21:07:45 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237265.9966] device (wlo1): supplicant interface state: scanning -> disconnected
Jun 14 21:07:45 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237265.9966] device (p2p-dev-wlo1): supplicant management interface state: scanning -> disconnected
Jun 14 21:07:46 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237266.0819] device (wlo1): supplicant interface state: disconnected -> scanning
Jun 14 21:07:46 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237266.0821] device (p2p-dev-wlo1): supplicant management interface state: disconnected -> scanning
Jun 14 21:07:47 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237267.4902] device (wlo1): supplicant interface state: scanning -> disconnected
Jun 14 21:07:47 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237267.4910] device (p2p-dev-wlo1): supplicant management interface state: scanning -> disconnected
Jun 14 21:07:47 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237267.9780] device (wlo1): supplicant interface state: disconnected -> scanning
Jun 14 21:07:47 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237267.9782] device (p2p-dev-wlo1): supplicant management interface state: disconnected -> scanning
Jun 14 21:07:49 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237269.3960] device (wlo1): supplicant interface state: scanning -> disconnected
Jun 14 21:07:49 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237269.3961] device (p2p-dev-wlo1): supplicant management interface state: scanning -> disconnected
Jun 14 21:07:49 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237269.8740] device (wlo1): supplicant interface state: disconnected -> scanning
Jun 14 21:07:49 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237269.8742] device (p2p-dev-wlo1): supplicant management interface state: disconnected -> scanning
Jun 14 21:07:51 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237271.2798] device (wlo1): supplicant interface state: scanning -> disconnected
Jun 14 21:07:51 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237271.2798] device (p2p-dev-wlo1): supplicant management interface state: scanning -> disconnected
Jun 14 21:07:52 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237272.2704] device (wlo1): supplicant interface state: disconnected -> scanning
Jun 14 21:07:52 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237272.2705] device (p2p-dev-wlo1): supplicant management interface state: disconnected -> scanning
Jun 14 21:07:53 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237273.6836] device (wlo1): supplicant interface state: scanning -> disconnected
Jun 14 21:07:53 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237273.6843] device (p2p-dev-wlo1): supplicant management interface state: scanning -> disconnected
Jun 14 21:07:54 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237274.6710] device (wlo1): supplicant interface state: disconnected -> scanning
Jun 14 21:07:54 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237274.6712] device (p2p-dev-wlo1): supplicant management interface state: disconnected -> scanning
Jun 14 21:07:56 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237276.0713] device (wlo1): supplicant interface state: scanning -> disconnected
Jun 14 21:07:56 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237276.0713] device (p2p-dev-wlo1): supplicant management interface state: scanning -> disconnected
Jun 14 21:08:01 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237281.3994] device (wlo1): supplicant interface state: disconnected -> scanning
Jun 14 21:08:01 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237281.3995] device (p2p-dev-wlo1): supplicant management interface state: disconnected -> scanning
Jun 14 21:08:06 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237286.1046] device (wlo1): supplicant interface state: scanning -> disconnected
Jun 14 21:08:06 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237286.1046] device (p2p-dev-wlo1): supplicant management interface state: scanning -> disconnected
Jun 14 21:08:07 HP-Laptop-15-db0598sa NetworkManager[642]: <warn> [1655237287.6290] device (wlo1): Activation: (wifi) association took too long, failing activation
Jun 14 21:08:07 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237287.6291] device (wlo1): state change: config -> failed (reason 'ssid-not-found', sys-iface-state: 'managed')
Jun 14 21:08:07 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237287.6302] manager: NetworkManager state is now DISCONNECTED
Jun 14 21:08:07 HP-Laptop-15-db0598sa NetworkManager[642]: <warn> [1655237287.6390] device (wlo1): Activation: failed for connection 'Top Flat'
Jun 14 21:08:07 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237287.6494] device (wlo1): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Jun 14 21:08:07 HP-Laptop-15-db0598sa NetworkManager[642]: <info> [1655237287.6666] device (wlo1): set-hw-addr: set MAC address to 4A:D0:E7:0C:83:44 (scanning)
EDIT2:我还在 NetworkManager 中禁用了随机 MAC 切换,这也没有解决问题
EDIT3:我已经使用脚本为这个问题拍摄了 wifi 配置的快照:我的无线/WiFi 连接不起作用。诊断问题需要哪些信息?wifi何时启动,何时未启动(并且无法重新连接)
工作/连接:https ://pastebin.ubuntu.com/p/dTFptYhv8N/
不工作/不连接:https ://pastebin.ubuntu.com/p/PPhHZNWcfd/
EDIT4:我已经启动并重新启动到 5.13.0-48,它似乎更稳定,所以注意这个空间!
我一直在尝试在我正在查看的所有线程中发布此内容,但这里有一个可能会有所帮助的创可贴。原始求解器获得了功劳。 Wifi 不断掉线 - Ubuntu 20.04 和 Broadcom 无线适配器
正如上面的编辑 (4) 中提到的:我现在已经启动到 5.13.0-48,之前没有看到适配器,但现在似乎是,并且在我关闭/打开它后连接又恢复了再次,因此问题中可能没有“激活网络连接失败”的问题。
如果它发生在这个最新的内核版本中,我会在它发生时打开一个全新的 Q。