自从我在台式电脑上安装了 Ubuntu 20.04 后,我一直遇到奇怪的问题有线网络连接:有时,在操作系统完成启动过程并显示登录屏幕后,屏幕上将显示网络连接图标状态栏不会切换到“OK”状态,仍然坚持“連接”状态(相同的图标,但部分填充)。登录后,网络不可达。
我说 ”有时“因为这个问题并不是在每次启动时出现,而只是偶尔出现,以一种看似随机的方式。
由于这个问题是间歇性的,我会排除与硬件/驱动程序相关的问题;如果我不得不猜测,我会选择与 Ubuntu 相关的问题,但我甚至不知道如何开始调试这个问题。
运行sudo lshw -C network
产生以下输出:
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:01:00.0
logical name: enp1s0
version: 15
serial: xxxxxx
size: 1Gbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s
resources: irq:16 ioport:3000(size=256) memory:a1104000-a1104fff memory:a1100000-a1103fff
这是 BAD 启动的输出sudo journalctl -b 0 -u NetworkManager
(即网络连接无法激活时):
-- Logs begin at Tue 2020-12-01 15:28:02 CET, end at Sun 2020-12-06 15:16:00 CET. --
dic 01 18:26:16 elminster systemd[1]: Starting Network Manager...
dic 01 18:26:16 elminster NetworkManager[1005]: <info> [1606843576.2813] NetworkManager (version 1.22.10) is starting... (for the first time)
dic 01 18:26:16 elminster NetworkManager[1005]: <info> [1606843576.2813] Read config: /etc/NetworkManager/NetworkManager.conf (lib: 10-dns-resolved.conf, 20-connectivity-ubuntu.conf, no-mac-addr-change.conf) (run: 10-globally-managed-devices.conf) (etc: default-wifi-powersave-on.conf)
dic 01 18:26:16 elminster systemd[1]: Started Network Manager.
dic 01 18:26:16 elminster NetworkManager[1005]: <info> [1606843576.2836] bus-manager: acquired D-Bus service "org.freedesktop.NetworkManager"
dic 01 18:26:16 elminster NetworkManager[1005]: <info> [1606843576.2923] manager[0x55e3b0b54030]: monitoring kernel firmware directory '/lib/firmware'.
dic 01 18:26:16 elminster NetworkManager[1005]: <info> [1606843576.2923] monitoring ifupdown state file '/run/network/ifstate'.
dic 01 18:26:16 elminster NetworkManager[1005]: <info> [1606843576.3791] hostname: hostname: using hostnamed
dic 01 18:26:16 elminster NetworkManager[1005]: <info> [1606843576.3791] hostname: hostname changed from (none) to "elminster"
dic 01 18:26:16 elminster NetworkManager[1005]: <info> [1606843576.3793] dns-mgr[0x55e3b0b3e290]: init: dns=systemd-resolved rc-manager=symlink, plugin=systemd-resolved
dic 01 18:26:16 elminster NetworkManager[1005]: <info> [1606843576.3795] manager[0x55e3b0b54030]: rfkill: Wi-Fi hardware radio set enabled
dic 01 18:26:16 elminster NetworkManager[1005]: <info> [1606843576.3795] manager[0x55e3b0b54030]: rfkill: WWAN hardware radio set enabled
dic 01 18:26:16 elminster NetworkManager[1005]: <info> [1606843576.3877] Loaded device plugin: NMAtmManager (/usr/lib/x86_64-linux-gnu/NetworkManager/1.22.10/libnm-device-plugin-adsl.so)
dic 01 18:26:16 elminster NetworkManager[1005]: <info> [1606843576.3947] Loaded device plugin: NMTeamFactory (/usr/lib/x86_64-linux-gnu/NetworkManager/1.22.10/libnm-device-plugin-team.so)
dic 01 18:26:16 elminster NetworkManager[1005]: <info> [1606843576.3972] Loaded device plugin: NMWifiFactory (/usr/lib/x86_64-linux-gnu/NetworkManager/1.22.10/libnm-device-plugin-wifi.so)
dic 01 18:26:16 elminster NetworkManager[1005]: <info> [1606843576.4021] Loaded device plugin: NMWwanFactory (/usr/lib/x86_64-linux-gnu/NetworkManager/1.22.10/libnm-device-plugin-wwan.so)
dic 01 18:26:16 elminster NetworkManager[1005]: <info> [1606843576.4091] Loaded device plugin: NMBluezManager (/usr/lib/x86_64-linux-gnu/NetworkManager/1.22.10/libnm-device-plugin-bluetooth.so)
dic 01 18:26:16 elminster NetworkManager[1005]: <info> [1606843576.4093] manager: rfkill: Wi-Fi enabled by radio killswitch; enabled by state file
dic 01 18:26:16 elminster NetworkManager[1005]: <info> [1606843576.4094] manager: rfkill: WWAN enabled by radio killswitch; enabled by state file
dic 01 18:26:16 elminster NetworkManager[1005]: <info> [1606843576.4094] manager: Networking is enabled by state file
dic 01 18:26:16 elminster NetworkManager[1005]: <info> [1606843576.4095] dhcp-init: Using DHCP client 'internal'
dic 01 18:26:16 elminster NetworkManager[1005]: <info> [1606843576.4117] settings: Loaded settings plugin: ifupdown ("/usr/lib/x86_64-linux-gnu/NetworkManager/1.22.10/libnm-settings-plugin-ifupdown.so")
dic 01 18:26:16 elminster NetworkManager[1005]: <info> [1606843576.4118] settings: Loaded settings plugin: keyfile (internal)
dic 01 18:26:16 elminster NetworkManager[1005]: <info> [1606843576.4118] ifupdown: management mode: unmanaged
dic 01 18:26:16 elminster NetworkManager[1005]: <warn> [1606843576.4122] ifupdown: interfaces file /etc/network/interfaces doesn't exist
dic 01 18:26:16 elminster NetworkManager[1005]: <info> [1606843576.4141] device (lo): carrier: link connected
dic 01 18:26:16 elminster NetworkManager[1005]: <info> [1606843576.4142] manager: (lo): new Generic device (/org/freedesktop/NetworkManager/Devices/1)
dic 01 18:26:16 elminster NetworkManager[1005]: <info> [1606843576.4148] manager: (enp1s0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/2)
dic 01 18:26:16 elminster NetworkManager[1005]: <info> [1606843576.4180] settings: (enp1s0): created default wired connection 'Wired connection 1'
dic 01 18:26:16 elminster NetworkManager[1005]: <info> [1606843576.4187] device (enp1s0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
dic 01 18:26:16 elminster NetworkManager[1005]: <warn> [1606843576.5374] Error: failed to open /run/network/ifstate
dic 01 18:26:16 elminster NetworkManager[1005]: <info> [1606843576.5442] modem-manager: ModemManager available
dic 01 18:26:20 elminster NetworkManager[1005]: <info> [1606843580.0982] device (enp1s0): carrier: link connected
dic 01 18:26:20 elminster NetworkManager[1005]: <info> [1606843580.0984] device (enp1s0): state change: unavailable -> disconnected (reason 'carrier-changed', sys-iface-state: 'managed')
dic 01 18:26:20 elminster NetworkManager[1005]: <info> [1606843580.0989] policy: auto-activating connection 'Wired connection 1' (60f5244b-484f-3471-bbc5-cea3a254d520)
dic 01 18:26:20 elminster NetworkManager[1005]: <info> [1606843580.0993] device (enp1s0): Activation: starting connection 'Wired connection 1' (60f5244b-484f-3471-bbc5-cea3a254d520)
dic 01 18:26:20 elminster NetworkManager[1005]: <info> [1606843580.0994] device (enp1s0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
dic 01 18:26:20 elminster NetworkManager[1005]: <info> [1606843580.0996] manager: NetworkManager state is now CONNECTING
dic 01 18:26:20 elminster NetworkManager[1005]: <info> [1606843580.0997] device (enp1s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
dic 01 18:26:20 elminster NetworkManager[1005]: <info> [1606843580.1000] device (enp1s0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
dic 01 18:26:20 elminster NetworkManager[1005]: <info> [1606843580.1002] dhcp4 (enp1s0): activation: beginning transaction (timeout in 45 seconds)
dic 01 18:26:32 elminster NetworkManager[1005]: <info> [1606843592.9532] agent-manager: agent[e115c8494fc78893,:1.72/org.gnome.Shell.NetworkAgent/1000]: agent registered
dic 01 18:27:05 elminster NetworkManager[1005]: <warn> [1606843625.8067] dhcp4 (enp1s0): request timed out
dic 01 18:27:05 elminster NetworkManager[1005]: <info> [1606843625.8068] dhcp4 (enp1s0): state changed unknown -> timeout
dic 01 18:27:05 elminster NetworkManager[1005]: <info> [1606843625.8069] device (enp1s0): state change: ip-config -> failed (reason 'ip-config-unavailable', sys-iface-state: 'managed')
dic 01 18:27:05 elminster NetworkManager[1005]: <info> [1606843625.8079] manager: NetworkManager state is now CONNECTED_LOCAL
dic 01 18:27:05 elminster NetworkManager[1005]: <warn> [1606843625.8098] device (enp1s0): Activation: failed for connection 'Wired connection 1'
dic 01 18:27:05 elminster NetworkManager[1005]: <info> [1606843625.8103] device (enp1s0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
dic 01 18:27:05 elminster NetworkManager[1005]: <info> [1606843625.8267] dhcp4 (enp1s0): canceled DHCP transaction
dic 01 18:27:05 elminster NetworkManager[1005]: <info> [1606843625.8267] dhcp4 (enp1s0): state changed timeout -> done
dic 01 18:27:05 elminster NetworkManager[1005]: <info> [1606843625.8293] policy: auto-activating connection 'Wired connection 1' (60f5244b-484f-3471-bbc5-cea3a254d520)
dic 01 18:27:05 elminster NetworkManager[1005]: <info> [1606843625.8298] device (enp1s0): Activation: starting connection 'Wired connection 1' (60f5244b-484f-3471-bbc5-cea3a254d520)
dic 01 18:27:05 elminster NetworkManager[1005]: <info> [1606843625.8299] device (enp1s0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
dic 01 18:27:05 elminster NetworkManager[1005]: <info> [1606843625.8301] manager: NetworkManager state is now CONNECTING
dic 01 18:27:05 elminster NetworkManager[1005]: <info> [1606843625.8303] device (enp1s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
dic 01 18:27:05 elminster NetworkManager[1005]: <info> [1606843625.8307] device (enp1s0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
dic 01 18:27:05 elminster NetworkManager[1005]: <info> [1606843625.8309] dhcp4 (enp1s0): activation: beginning transaction (timeout in 45 seconds)
dic 01 18:27:50 elminster NetworkManager[1005]: <warn> [1606843670.8087] dhcp4 (enp1s0): request timed out
dic 01 18:27:50 elminster NetworkManager[1005]: <info> [1606843670.8088] dhcp4 (enp1s0): state changed unknown -> timeout
dic 01 18:27:50 elminster NetworkManager[1005]: <info> [1606843670.8089] device (enp1s0): state change: ip-config -> failed (reason 'ip-config-unavailable', sys-iface-state: 'managed')
dic 01 18:27:50 elminster NetworkManager[1005]: <info> [1606843670.8098] manager: NetworkManager state is now CONNECTED_LOCAL
dic 01 18:27:50 elminster NetworkManager[1005]: <warn> [1606843670.8115] device (enp1s0): Activation: failed for connection 'Wired connection 1'
dic 01 18:27:50 elminster NetworkManager[1005]: <info> [1606843670.8120] device (enp1s0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
dic 01 18:27:50 elminster NetworkManager[1005]: <info> [1606843670.8427] dhcp4 (enp1s0): canceled DHCP transaction
dic 01 18:27:50 elminster NetworkManager[1005]: <info> [1606843670.8427] dhcp4 (enp1s0): state changed timeout -> done
dic 01 18:27:50 elminster NetworkManager[1005]: <info> [1606843670.8467] policy: auto-activating connection 'Wired connection 1' (60f5244b-484f-3471-bbc5-cea3a254d520)
dic 01 18:27:50 elminster NetworkManager[1005]: <info> [1606843670.8474] device (enp1s0): Activation: starting connection 'Wired connection 1' (60f5244b-484f-3471-bbc5-cea3a254d520)
dic 01 18:27:50 elminster NetworkManager[1005]: <info> [1606843670.8475] device (enp1s0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
dic 01 18:27:50 elminster NetworkManager[1005]: <info> [1606843670.8477] manager: NetworkManager state is now CONNECTING
dic 01 18:27:50 elminster NetworkManager[1005]: <info> [1606843670.8479] device (enp1s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
dic 01 18:27:50 elminster NetworkManager[1005]: <info> [1606843670.8483] device (enp1s0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
dic 01 18:27:50 elminster NetworkManager[1005]: <info> [1606843670.8485] dhcp4 (enp1s0): activation: beginning transaction (timeout in 45 seconds)
dic 01 18:28:35 elminster NetworkManager[1005]: <warn> [1606843715.8092] dhcp4 (enp1s0): request timed out
dic 01 18:28:35 elminster NetworkManager[1005]: <info> [1606843715.8092] dhcp4 (enp1s0): state changed unknown -> timeout
dic 01 18:28:35 elminster NetworkManager[1005]: <info> [1606843715.8094] device (enp1s0): state change: ip-config -> failed (reason 'ip-config-unavailable', sys-iface-state: 'managed')
dic 01 18:28:35 elminster NetworkManager[1005]: <info> [1606843715.8104] manager: NetworkManager state is now CONNECTED_LOCAL
dic 01 18:28:35 elminster NetworkManager[1005]: <warn> [1606843715.8122] device (enp1s0): Activation: failed for connection 'Wired connection 1'
dic 01 18:28:35 elminster NetworkManager[1005]: <info> [1606843715.8128] device (enp1s0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
dic 01 18:28:35 elminster NetworkManager[1005]: <info> [1606843715.8306] dhcp4 (enp1s0): canceled DHCP transaction
dic 01 18:28:35 elminster NetworkManager[1005]: <info> [1606843715.8307] dhcp4 (enp1s0): state changed timeout -> done
dic 01 18:28:35 elminster NetworkManager[1005]: <info> [1606843715.8332] policy: auto-activating connection 'Wired connection 1' (60f5244b-484f-3471-bbc5-cea3a254d520)
dic 01 18:28:35 elminster NetworkManager[1005]: <info> [1606843715.8338] device (enp1s0): Activation: starting connection 'Wired connection 1' (60f5244b-484f-3471-bbc5-cea3a254d520)
dic 01 18:28:35 elminster NetworkManager[1005]: <info> [1606843715.8339] device (enp1s0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
有任何想法吗?
提前感谢所有回答的人。