在系统从挂起状态恢复时,以太网保持短暂连接并且可以建立连接。大约 5-10 秒后,设备断开连接并自动重新连接。由于连接在恢复时已保留建立,因此网络管理器继续断开连接并重新连接似乎不寻常。我尝试搜索类似的错误,但大多数用户的体验似乎是以下之一:
- 界面绝不恢复后重新出现
- 恢复后 Wi-Fi 不可用
- 连接间歇性中断
- 其他各种节能相关问题
我尝试通过设置/sys/class/net/enp6s0/power/control
为 来禁用界面上的省电功能on
。
以太网设备包括:
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller
06:00.0 Ethernet controller: Intel Corporation I211 Gigabit Network Connection (rev 03)
英特尔正在使用中。
请注意,在下面的日志中,网络管理员将设备置于未管理状态11:27:16
,并且根据/var/log/syslog
,系统在11:27:00
May 09 22:51:12 <hostname-redacted> NetworkManager[1280]: <info> [1620640272.8868] manager: sleep: sleep requested (sleeping: no enabled: yes)
May 09 22:51:12 <hostname-redacted> NetworkManager[1280]: <info> [1620640272.8868] device (enp5s0): state change: unavailable -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
May 09 22:51:12 <hostname-redacted> NetworkManager[1280]: <info> [1620640272.9488] device (<bluetooth-redacted>): state change: disconnected -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
May 09 22:51:12 <hostname-redacted> NetworkManager[1280]: <info> [1620640272.9491] manager: NetworkManager state is now ASLEEP
|
May 10 11:27:03 <hostname-redacted> kernel: [154647.921847] igb 0000:06:00.0 enp6s0: igb: enp6s0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX
|
May 10 11:27:16 <hostname-redacted> NetworkManager[1280]: <info> [1620678436.9239] manager: sleep: wake requested (sleeping: yes enabled: yes)
May 10 11:27:16 <hostname-redacted> NetworkManager[1280]: <info> [1620678436.9240] device (enp6s0): state change: activated -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
May 10 11:27:16 <hostname-redacted> NetworkManager[1280]: <info> [1620678436.9489] dhcp4 (enp6s0): canceled DHCP transaction
May 10 11:27:16 <hostname-redacted> NetworkManager[1280]: <info> [1620678436.9489] dhcp4 (enp6s0): state changed bound -> done
May 10 11:27:16 <hostname-redacted> NetworkManager[1280]: <info> [1620678436.9492] dhcp6 (enp6s0): canceled DHCP transaction
May 10 11:27:16 <hostname-redacted> NetworkManager[1280]: <info> [1620678436.9492] dhcp6 (enp6s0): state changed bound -> done
May 10 11:27:16 <hostname-redacted> NetworkManager[1280]: <info> [1620678436.9537] manager: NetworkManager state is now CONNECTED_GLOBAL
May 10 11:27:16 <hostname-redacted> NetworkManager[1280]: <info> [1620678436.9832] manager: NetworkManager state is now DISCONNECTED
May 10 11:27:16 <hostname-redacted> NetworkManager[1280]: <info> [1620678436.9842] device (enp5s0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'managed')
May 10 11:27:17 <hostname-redacted> NetworkManager[1280]: <info> [1620678437.2059] device (enp6s0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'managed')
May 10 11:27:17 <hostname-redacted> NetworkManager[1280]: <info> [1620678437.2306] device (<bluetooth-redacted>): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'managed')
May 10 11:27:17 <hostname-redacted> NetworkManager[1280]: <info> [1620678437.2317] device (<bluetooth-redacted>): state change: unavailable -> disconnected (reason 'none', sys-iface-state: 'managed')
May 10 11:27:20 <hostname-redacted> NetworkManager[1280]: <info> [1620678440.8616] device (enp6s0): carrier: link connected
May 10 11:27:20 <hostname-redacted> NetworkManager[1280]: <info> [1620678440.8618] device (enp6s0): state change: unavailable -> disconnected (reason 'carrier-changed', sys-iface-state: 'managed')
May 10 11:27:20 <hostname-redacted> NetworkManager[1280]: <info> [1620678440.8628] policy: auto-activating connection 'Ethernet' (ec1845cf-b56b-413b-865e-66ae2ed76c0d)
May 10 11:27:20 <hostname-redacted> NetworkManager[1280]: <info> [1620678440.8632] device (enp6s0): Activation: starting connection 'Ethernet' (ec1845cf-b56b-413b-865e-66ae2ed76c0d)
May 10 11:27:20 <hostname-redacted> NetworkManager[1280]: <info> [1620678440.8632] device (enp6s0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
May 10 11:27:20 <hostname-redacted> NetworkManager[1280]: <info> [1620678440.8635] manager: NetworkManager state is now CONNECTING
May 10 11:27:20 <hostname-redacted> NetworkManager[1280]: <info> [1620678440.9094] device (enp6s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
May 10 11:27:20 <hostname-redacted> NetworkManager[1280]: <info> [1620678440.9105] device (enp6s0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
May 10 11:27:20 <hostname-redacted> NetworkManager[1280]: <info> [1620678440.9108] dhcp4 (enp6s0): activation: beginning transaction (timeout in 45 seconds)
May 10 11:27:24 <hostname-redacted> NetworkManager[1280]: <info> [1620678444.6296] device (enp6s0): carrier: link connected
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.1534] dhcp6 (enp6s0): activation: beginning transaction (timeout in 45 seconds)
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.1638] dhcp6 (enp6s0): option dhcp6_name_servers => '<redacted>'
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.1638] dhcp6 (enp6s0): state changed unknown -> bound
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6313] dhcp4 (enp6s0): option dhcp_lease_time => '604800'
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6313] dhcp4 (enp6s0): option domain_name => '<redacted>'
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6313] dhcp4 (enp6s0): option domain_name_servers => '<redacted>'
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6313] dhcp4 (enp6s0): option expiry => '1621283245'
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6313] dhcp4 (enp6s0): option host_name => '<hostname-redacted>'
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6313] dhcp4 (enp6s0): option ip_address => '10.0.0.50'
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6314] dhcp4 (enp6s0): option next_server => '10.0.0.1'
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6314] dhcp4 (enp6s0): option requested_broadcast_address => '1'
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6314] dhcp4 (enp6s0): option requested_domain_name => '1'
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6314] dhcp4 (enp6s0): option requested_domain_name_servers => '1'
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6314] dhcp4 (enp6s0): option requested_domain_search => '1'
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6314] dhcp4 (enp6s0): option requested_host_name => '1'
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6314] dhcp4 (enp6s0): option requested_interface_mtu => '1'
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6314] dhcp4 (enp6s0): option requested_ms_classless_static_routes => '1'
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6314] dhcp4 (enp6s0): option requested_nis_domain => '1'
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6314] dhcp4 (enp6s0): option requested_nis_servers => '1'
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6314] dhcp4 (enp6s0): option requested_ntp_servers => '1'
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6314] dhcp4 (enp6s0): option requested_rfc3442_classless_static_routes => '1'
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6314] dhcp4 (enp6s0): option requested_root_path => '1'
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6314] dhcp4 (enp6s0): option requested_routers => '1'
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6314] dhcp4 (enp6s0): option requested_static_routes => '1'
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6315] dhcp4 (enp6s0): option requested_subnet_mask => '1'
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6315] dhcp4 (enp6s0): option requested_time_offset => '1'
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6315] dhcp4 (enp6s0): option requested_wpad => '1'
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6315] dhcp4 (enp6s0): option routers => '10.0.0.1'
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6315] dhcp4 (enp6s0): option subnet_mask => '255.255.255.0'
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6315] dhcp4 (enp6s0): state changed unknown -> bound
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6331] device (enp6s0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6352] device (enp6s0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6355] device (enp6s0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6360] manager: NetworkManager state is now CONNECTED_LOCAL
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6371] manager: NetworkManager state is now CONNECTED_SITE
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6372] policy: set 'Ethernet' (enp6s0) as default for IPv4 routing and DNS
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6374] policy: set 'Ethernet' (enp6s0) as default for IPv6 routing and DNS
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6379] device (enp6s0): Activation: successful, device activated.
May 10 11:27:25 <hostname-redacted> NetworkManager[1280]: <info> [1620678445.6385] manager: NetworkManager state is now CONNECTED_GLOBAL
编辑我已经将此问题归咎于 NetworkManager,禁用它并使用 networkd 即可解决问题。不过,我仍然更喜欢使用 NetworkManager 的解决方案。