Ubuntu 23.04 上的热点在几秒钟后终止

Ubuntu 23.04 上的热点在几秒钟后终止

我正在使用 GUI 在 Ubuntu 23.04 中打开热点(设置 > Wifi > ... > 打开 Wifi 热点)。然后 GUI 向我显示了热点的信息页面,但是当我等待几秒钟时,热点自动终止,我收到通知“激活网络连接失败”。

我尝试wpasupplicant按照以下建议将软件包降级到版本 2:2.9.0-21build1这个答案这篇博文并且成功了。但事实并非如此总是可以。我必须尝试多次才能稳定。这个答案建议关闭防火墙,但在我的情况下ufw status打印“不活动”。

按照建议问题,我检查了一下journalctl --follow,发现在尝试创建热点但失败时出现了以下消息:

Sep 11 17:40:15 MyComputer NetworkManager[1271]: <info>  [1694425215.9796] audit: op="connection-update" uuid="80ac3828-83f1-44fd-ba7a-906207600c48" name="Hotspot" args="connection.timestamp" pid=10109 uid=1000 result="success"
Sep 11 17:40:16 MyComputer NetworkManager[1271]: <info>  [1694425216.0013] device (wlp2s0): disconnecting for new activation request.
Sep 11 17:40:16 MyComputer NetworkManager[1271]: <info>  [1694425216.0014] device (wlp2s0): state change: activated -> deactivating (reason 'new-activation', sys-iface-state: 'managed')
Sep 11 17:40:16 MyComputer NetworkManager[1271]: <info>  [1694425216.0052] audit: op="connection-activate" uuid="80ac3828-83f1-44fd-ba7a-906207600c48" name="Hotspot" pid=10109 uid=1000 result="success"
Sep 11 17:40:16 MyComputer dbus-daemon[1203]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.12' (uid=0 pid=1271 comm="/usr/sbin/NetworkManager --no-daemon" label="unconfined")
Sep 11 17:40:16 MyComputer systemd[1]: Starting NetworkManager-dispatcher.service - Network Manager Script Dispatcher Service...
Sep 11 17:40:16 MyComputer dbus-daemon[1203]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Sep 11 17:40:16 MyComputer systemd[1]: Started NetworkManager-dispatcher.service - Network Manager Script Dispatcher Service.
Sep 11 17:40:16 MyComputer kernel: wlp2s0: deauthenticating from xx:xx:xx:xx:xx:xx by local choice (Reason: 3=DEAUTH_LEAVING)
Sep 11 17:40:16 MyComputer wpa_supplicant[1274]: wlp2s0: CTRL-EVENT-DISCONNECTED bssid=xx:xx:xx:xx:xx:xx reason=3 locally_generated=1
Sep 11 17:40:16 MyComputer wpa_supplicant[1274]: wlp2s0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
Sep 11 17:40:16 MyComputer NetworkManager[1271]: <info>  [1694425216.2119] device (wlp2s0): state change: deactivating -> disconnected (reason 'new-activation', sys-iface-state: 'managed')
Sep 11 17:40:16 MyComputer avahi-daemon[1201]: Withdrawing address record for fe80::c5eb:c1b5:97da:9fd1 on wlp2s0.
Sep 11 17:40:16 MyComputer avahi-daemon[1201]: Leaving mDNS multicast group on interface wlp2s0.IPv6 with address fe80::c5eb:c1b5:97da:9fd1.
Sep 11 17:40:16 MyComputer avahi-daemon[1201]: Interface wlp2s0.IPv6 no longer relevant for mDNS.
Sep 11 17:40:16 MyComputer wpa_supplicant[1274]: wlp2s0: CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
Sep 11 17:40:16 MyComputer NetworkManager[1271]: <info>  [1694425216.2416] dhcp4 (wlp2s0): canceled DHCP transaction
Sep 11 17:40:16 MyComputer NetworkManager[1271]: <info>  [1694425216.2417] dhcp4 (wlp2s0): activation: beginning transaction (timeout in 45 seconds)
Sep 11 17:40:16 MyComputer NetworkManager[1271]: <info>  [1694425216.2417] dhcp4 (wlp2s0): state changed no lease
Sep 11 17:40:16 MyComputer wpa_supplicant[1274]: wlp2s0: Reject scan trigger since one is already pending
Sep 11 17:40:16 MyComputer avahi-daemon[1201]: Withdrawing address record for 7.250.140.92 on wlp2s0.
Sep 11 17:40:16 MyComputer avahi-daemon[1201]: Leaving mDNS multicast group on interface wlp2s0.IPv4 with address 7.250.140.92.
Sep 11 17:40:16 MyComputer avahi-daemon[1201]: Interface wlp2s0.IPv4 no longer relevant for mDNS.
Sep 11 17:40:16 MyComputer NetworkManager[1271]: <info>  [1694425216.2961] device (wlp2s0): Activation: starting connection 'Hotspot' (80ac3828-83f1-44fd-ba7a-906207600c48)
Sep 11 17:40:16 MyComputer NetworkManager[1271]: <info>  [1694425216.2969] device (wlp2s0): supplicant interface state: completed -> disconnected
Sep 11 17:40:16 MyComputer NetworkManager[1271]: <info>  [1694425216.2970] device (p2p-dev-wlp2s0): supplicant management interface state: completed -> disconnected
Sep 11 17:40:16 MyComputer NetworkManager[1271]: <info>  [1694425216.3059] device (wlp2s0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Sep 11 17:40:16 MyComputer NetworkManager[1271]: <info>  [1694425216.3066] manager: NetworkManager state is now CONNECTING
Sep 11 17:40:16 MyComputer openconnect[8344]: BYE-Paket senden: Aborted by caller
Sep 11 17:40:16 MyComputer systemd-resolved[1121]: vpn0: Bus client reset search domain list.
Sep 11 17:40:16 MyComputer systemd-resolved[1121]: vpn0: Bus client set default route setting: no
Sep 11 17:40:16 MyComputer openconnect[8344]: User cancelled (SIGINT/SIGTERM); exiting.
Sep 11 17:40:16 MyComputer NetworkManager[1271]: <info>  [1694425216.3162] device (wlp2s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Sep 11 17:40:16 MyComputer NetworkManager[1271]: <info>  [1694425216.3165] device (wlp2s0): Activation: (wifi) access point 'Hotspot' has security, but secrets are required.
Sep 11 17:40:16 MyComputer NetworkManager[1271]: <info>  [1694425216.3165] device (wlp2s0): state change: config -> need-auth (reason 'none', sys-iface-state: 'managed')
Sep 11 17:40:16 MyComputer kernel: IPv6: ADDRCONF(NETDEV_CHANGE): vpn0: link becomes ready
Sep 11 17:40:16 MyComputer NetworkManager[1271]: <info>  [1694425216.3201] device (vpn0): state change: activated -> unmanaged (reason 'connection-assumed', sys-iface-state: 'external')
Sep 11 17:40:16 MyComputer NetworkManager[1271]: <info>  [1694425216.3210] device (wlp2s0): state change: need-auth -> prepare (reason 'none', sys-iface-state: 'managed')
Sep 11 17:40:16 MyComputer NetworkManager[1271]: <info>  [1694425216.3222] device (wlp2s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Sep 11 17:40:16 MyComputer NetworkManager[1271]: <info>  [1694425216.3226] device (wlp2s0): Activation: (wifi) connection 'Hotspot' has security, and secrets exist.  No new secrets needed.
Sep 11 17:40:16 MyComputer NetworkManager[1271]: <info>  [1694425216.3227] Config: added 'ssid' value 'MyComputer'
Sep 11 17:40:16 MyComputer NetworkManager[1271]: <info>  [1694425216.3227] Config: added 'mode' value '2'
Sep 11 17:40:16 MyComputer NetworkManager[1271]: <info>  [1694425216.3227] Config: added 'frequency' value '2472'
Sep 11 17:40:16 MyComputer NetworkManager[1271]: <info>  [1694425216.3227] Config: added 'key_mgmt' value 'WPA-PSK WPA-PSK-SHA256'
Sep 11 17:40:16 MyComputer NetworkManager[1271]: <info>  [1694425216.3227] Config: added 'psk' value '<hidden>'
Sep 11 17:40:16 MyComputer NetworkManager[1271]: <info>  [1694425216.3227] Config: added 'proto' value 'RSN'
Sep 11 17:40:16 MyComputer NetworkManager[1271]: <info>  [1694425216.3227] Config: added 'pairwise' value 'CCMP'
Sep 11 17:40:16 MyComputer NetworkManager[1271]: <info>  [1694425216.3227] Config: added 'group' value 'CCMP'
Sep 11 17:40:16 MyComputer systemd-resolved[1121]: vpn0: Bus client reset DNS server list.
Sep 11 17:40:16 MyComputer wpa_supplicant[1274]: Note: nl80211 driver interface is not designed to be used with ap_scan=2; this can result in connection failures
Sep 11 17:40:16 MyComputer wpa_supplicant[1274]: wlp2s0: Failed to start AP functionality
Sep 11 17:40:16 MyComputer wpa_supplicant[1274]: wlp2s0: Failed to start AP functionality
Sep 11 17:40:26 MyComputer systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.
Sep 11 17:40:41 MyComputer NetworkManager[1271]: <warn>  [1694425241.3069] device (wlp2s0): Activation: (wifi) Hotspot network creation took too long, failing activation
Sep 11 17:40:41 MyComputer NetworkManager[1271]: <info>  [1694425241.3070] device (wlp2s0): state change: config -> failed (reason 'supplicant-timeout', sys-iface-state: 'managed')
Sep 11 17:40:41 MyComputer NetworkManager[1271]: <info>  [1694425241.3076] manager: NetworkManager state is now CONNECTED_LOCAL
Sep 11 17:40:41 MyComputer NetworkManager[1271]: <warn>  [1694425241.3080] device (wlp2s0): Activation: failed for connection 'Hotspot'
Sep 11 17:40:41 MyComputer NetworkManager[1271]: <info>  [1694425241.3084] device (wlp2s0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Sep 11 17:40:41 MyComputer wpa_supplicant[1274]: wlp2s0: Reject scan trigger since one is already pending
Sep 11 17:40:42 MyComputer wpa_supplicant[1274]: wlp2s0: CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
Sep 11 17:40:42 MyComputer wpa_supplicant[1274]: wlp2s0: CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
Sep 11 17:40:42 MyComputer wpa_supplicant[1274]: wlp2s0: CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
Sep 11 17:40:42 MyComputer wpa_supplicant[1274]: wlp2s0: CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
Sep 11 17:40:42 MyComputer wpa_supplicant[1274]: wlp2s0: CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
Sep 11 17:40:44 MyComputer systemd[1]: systemd-hostnamed.service: Deactivated successfully.
Sep 11 17:40:45 MyComputer wpa_supplicant[1274]: wlp2s0: CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
Sep 11 17:40:45 MyComputer wpa_supplicant[1274]: wlp2s0: CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
Sep 11 17:40:45 MyComputer wpa_supplicant[1274]: wlp2s0: CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
Sep 11 17:40:45 MyComputer wpa_supplicant[1274]: wlp2s0: CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
Sep 11 17:40:46 MyComputer NetworkManager[1271]: <info>  [1694425246.1988] policy: auto-activating connection 'HomeWifi' (7e12d06a-4979-4831-a41b-16b38531724c)
Sep 11 17:40:46 MyComputer NetworkManager[1271]: <info>  [1694425246.1992] device (wlp2s0): Activation: starting connection 'HomeWifi' (7e12d06a-4979-4831-a41b-16b38531724c)
Sep 11 17:40:46 MyComputer NetworkManager[1271]: <info>  [1694425246.1993] device (wlp2s0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Sep 11 17:40:46 MyComputer NetworkManager[1271]: <info>  [1694425246.1995] manager: NetworkManager state is now CONNECTING
Sep 11 17:40:46 MyComputer NetworkManager[1271]: <info>  [1694425246.1998] device (wlp2s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Sep 11 17:40:46 MyComputer NetworkManager[1271]: <info>  [1694425246.2000] device (wlp2s0): Activation: (wifi) connection 'HomeWifi' requires no security.  No secrets needed.
Sep 11 17:40:46 MyComputer NetworkManager[1271]: <info>  [1694425246.2000] Config: added 'ssid' value 'HomeWifi'
Sep 11 17:40:46 MyComputer NetworkManager[1271]: <info>  [1694425246.2000] Config: added 'scan_ssid' value '1'
Sep 11 17:40:46 MyComputer NetworkManager[1271]: <info>  [1694425246.2001] Config: added 'bgscan' value 'simple:30:-70:86400'
Sep 11 17:40:46 MyComputer NetworkManager[1271]: <info>  [1694425246.2001] Config: added 'key_mgmt' value 'NONE'
Sep 11 17:40:46 MyComputer wpa_supplicant[1274]: wlp2s0: SME: Trying to authenticate with xx:xx:xx:xx:xx:xx (SSID='HomeWifi' freq=5220 MHz)
Sep 11 17:40:46 MyComputer kernel: wlp2s0: authenticate with xx:xx:xx:xx:xx:xx
Sep 11 17:40:46 MyComputer NetworkManager[1271]: <info>  [1694425246.2560] device (wlp2s0): supplicant interface state: disconnected -> authenticating
Sep 11 17:40:46 MyComputer NetworkManager[1271]: <info>  [1694425246.2560] device (p2p-dev-wlp2s0): supplicant management interface state: disconnected -> authenticating
Sep 11 17:40:46 MyComputer wpa_supplicant[1274]: wlp2s0: Trying to associate with xx:xx:xx:xx:xx:xx (SSID='HomeWifi' freq=5220 MHz)
Sep 11 17:40:46 MyComputer kernel: wlp2s0: send auth to xx:xx:xx:xx:xx:xx (try 1/3)
Sep 11 17:40:46 MyComputer kernel: wlp2s0: authenticated
Sep 11 17:40:46 MyComputer kernel: wlp2s0: associate with xx:xx:xx:xx:xx:xx (try 1/3)
Sep 11 17:40:46 MyComputer NetworkManager[1271]: <info>  [1694425246.2580] device (wlp2s0): supplicant interface state: authenticating -> associating
Sep 11 17:40:46 MyComputer NetworkManager[1271]: <info>  [1694425246.2580] device (p2p-dev-wlp2s0): supplicant management interface state: authenticating -> associating
Sep 11 17:40:46 MyComputer kernel: wlp2s0: RX AssocResp from xx:xx:xx:xx:xx:xx (capab=0x1501 status=0 aid=1)
Sep 11 17:40:46 MyComputer kernel: wlp2s0: associated
Sep 11 17:40:46 MyComputer wpa_supplicant[1274]: wlp2s0: Associated with xx:xx:xx:xx:xx:xx
Sep 11 17:40:46 MyComputer wpa_supplicant[1274]: wlp2s0: CTRL-EVENT-CONNECTED - Connection to xx:xx:xx:xx:xx:xx completed [id=0 id_str=]
Sep 11 17:40:46 MyComputer kernel: ath: EEPROM regdomain: 0x809c
Sep 11 17:40:46 MyComputer kernel: ath: EEPROM indicates we should expect a country code
Sep 11 17:40:46 MyComputer kernel: ath: doing EEPROM country->regdmn map search
Sep 11 17:40:46 MyComputer kernel: ath: country maps to regdmn code: 0x52
Sep 11 17:40:46 MyComputer kernel: ath: Country alpha2 being used: CN
Sep 11 17:40:46 MyComputer kernel: ath: Regpair used: 0x52
Sep 11 17:40:46 MyComputer kernel: ath: regdomain 0x809c dynamically updated by country element
Sep 11 17:40:46 MyComputer kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wlp2s0: link becomes ready
Sep 11 17:40:46 MyComputer wpa_supplicant[1274]: wlp2s0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Sep 11 17:40:46 MyComputer wpa_supplicant[1274]: wlp2s0: CTRL-EVENT-REGDOM-CHANGE init=COUNTRY_IE type=COUNTRY alpha2=CN
Sep 11 17:40:46 MyComputer NetworkManager[1271]: <info>  [1694425246.3464] device (wlp2s0): supplicant interface state: associating -> completed
Sep 11 17:40:46 MyComputer NetworkManager[1271]: <info>  [1694425246.3465] device (wlp2s0): Activation: (wifi) Stage 2 of 5 (Device Configure) successful. Connected to wireless network "HomeWifi"
Sep 11 17:40:46 MyComputer NetworkManager[1271]: <info>  [1694425246.3466] device (p2p-dev-wlp2s0): supplicant management interface state: associating -> completed
Sep 11 17:40:46 MyComputer NetworkManager[1271]: <info>  [1694425246.3473] device (wlp2s0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Sep 11 17:40:46 MyComputer NetworkManager[1271]: <info>  [1694425246.3489] dhcp4 (wlp2s0): activation: beginning transaction (timeout in 45 seconds)
Sep 11 17:40:46 MyComputer avahi-daemon[1201]: Joining mDNS multicast group on interface wlp2s0.IPv6 with address fe80::c5eb:c1b5:97da:9fd1.
Sep 11 17:40:46 MyComputer kernel: wlp2s0: Limiting TX power to 23 (23 - 0) dBm as advertised by xx:xx:xx:xx:xx:xx
Sep 11 17:40:46 MyComputer avahi-daemon[1201]: New relevant interface wlp2s0.IPv6 for mDNS.
Sep 11 17:40:46 MyComputer avahi-daemon[1201]: Registering new address record for fe80::c5eb:c1b5:97da:9fd1 on wlp2s0.*.
Sep 11 17:40:46 MyComputer NetworkManager[1271]: <info>  [1694425246.3671] dhcp4 (wlp2s0): state changed new lease, address=7.250.140.92
Sep 11 17:40:46 MyComputer NetworkManager[1271]: <info>  [1694425246.3683] policy: set 'HomeWifi' (wlp2s0) as default for IPv4 routing and DNS
Sep 11 17:40:46 MyComputer avahi-daemon[1201]: Joining mDNS multicast group on interface wlp2s0.IPv4 with address 7.250.140.92.
Sep 11 17:40:46 MyComputer avahi-daemon[1201]: New relevant interface wlp2s0.IPv4 for mDNS.
Sep 11 17:40:46 MyComputer avahi-daemon[1201]: Registering new address record for 7.250.140.92 on wlp2s0.IPv4.
Sep 11 17:40:46 MyComputer dbus-daemon[1203]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.12' (uid=0 pid=1271 comm="/usr/sbin/NetworkManager --no-daemon" label="unconfined")
Sep 11 17:40:46 MyComputer systemd-resolved[1121]: wlp2s0: Bus client set default route setting: yes
Sep 11 17:40:46 MyComputer systemd-resolved[1121]: wlp2s0: Bus client set DNS server list to: 114.114.114.114, 114.114.115.115, 223.5.5.5, 223.6.6.6, 180.76.76.76
Sep 11 17:40:46 MyComputer NetworkManager[1271]: <info>  [1694425246.3946] device (wlp2s0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
Sep 11 17:40:46 MyComputer systemd[1]: Starting NetworkManager-dispatcher.service - Network Manager Script Dispatcher Service...
Sep 11 17:40:46 MyComputer dbus-daemon[1203]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Sep 11 17:40:46 MyComputer systemd[1]: Started NetworkManager-dispatcher.service - Network Manager Script Dispatcher Service.
Sep 11 17:40:46 MyComputer NetworkManager[1271]: <info>  [1694425246.4570] device (wlp2s0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
Sep 11 17:40:46 MyComputer NetworkManager[1271]: <info>  [1694425246.4573] device (wlp2s0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
Sep 11 17:40:46 MyComputer NetworkManager[1271]: <info>  [1694425246.4577] manager: NetworkManager state is now CONNECTED_SITE
Sep 11 17:40:46 MyComputer NetworkManager[1271]: <info>  [1694425246.4593] device (wlp2s0): Activation: successful, device activated.
Sep 11 17:40:46 MyComputer wpa_supplicant[1274]: wlp2s0: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-55 noise=-101 txrate=104000
Sep 11 17:40:48 MyComputer NetworkManager[1271]: <info>  [1694425248.0783] manager: NetworkManager state is now CONNECTED_GLOBAL

在这个日志中,你可以看到它首先断开与当前 Wifi 和 VPN 的连接,然后创建热点,创建失败,然后重新连接到原始 Wifi。以下几行看起来特别有趣:

wpa_supplicant[1274]: wlp2s0: Failed to start AP functionality
NetworkManager[1271]: <warn>  [1694425241.3069] device (wlp2s0): Activation: (wifi) Hotspot network creation took too long, failing activation
NetworkManager[1271]: <info>  [1694425241.3070] device (wlp2s0): state change: config -> failed (reason 'supplicant-timeout', sys-iface-state: 'managed')

我想指出的是,不久前我能够在 Ubuntu 22.04(或更早版本)上可靠地操作此设备上的热点。因此,网卡应该能够做到这一点。

相关内容