我知道这个问题已经被问过很多次了,但是我已经检查了所有类似的问题,并且没有一个解决方案对我来说真正有用。
所以我有双启动 Windows 10 和 Ubuntu 20.04。昨天,我在我的网络上安装了一台新打印机,通过以太网插入我的路由器。我相信我电脑上的以太网连接仍在工作,但我没有重新启动我的电脑,这是问题首次发生的地方,所以我不能确定。我还运行了 apt update、apt upgrade 和 apt autoremove。在此之后重新启动时,我注意到我的以太网连接抛出了错误“激活网络连接失败”。
我尝试在 Windows 安装中禁用快速启动,这似乎有效;但是,我的以太网连接仅在启动 Windows 然后返回 ubuntu 后才有效——而不是在简单地重新启动 ubuntu 时有效。
到目前为止我已经尝试过:
重新启动并重置路由器
断开我安装的打印机
使用 apt autoremove 重新安装删除的软件包此解决方案
如上所述,在 Windows 10 安装中禁用快速启动
重新安装网络管理器
禁用网卡的电源管理
-- 第一次编辑 --
这是用户 waltinator 建议我查看的日志的输出。我会继续尝试自己解析它,但我想也把它发布在这里,以防有人有任何想法。
Jan 11 16:17:28 henry-ubuntu systemd[1]: Starting Network Manager...
Jan 11 16:17:28 henry-ubuntu NetworkManager[715]: <info> [1610410648.9358] NetworkManager (version 1.22.10) is starting... (for the first time)
Jan 11 16:17:28 henry-ubuntu NetworkManager[715]: <info> [1610410648.9358] Read config: /etc/NetworkManager/NetworkManager.conf (lib: 10-dns-resolved.conf, 20-connectivity-ubuntu.conf, no-mac-addr-change.c>
Jan 11 16:17:28 henry-ubuntu systemd[1]: Started Network Manager.
Jan 11 16:17:28 henry-ubuntu NetworkManager[715]: <info> [1610410648.9375] bus-manager: acquired D-Bus service "org.freedesktop.NetworkManager"
Jan 11 16:17:28 henry-ubuntu NetworkManager[715]: <info> [1610410648.9445] manager[0x557ed53c8030]: monitoring kernel firmware directory '/lib/firmware'.
Jan 11 16:17:28 henry-ubuntu NetworkManager[715]: <info> [1610410648.9446] monitoring ifupdown state file '/run/network/ifstate'.
Jan 11 16:17:29 henry-ubuntu NetworkManager[715]: <info> [1610410649.0114] hostname: hostname: using hostnamed
Jan 11 16:17:29 henry-ubuntu NetworkManager[715]: <info> [1610410649.0114] hostname: hostname changed from (none) to "henry-ubuntu"
Jan 11 16:17:29 henry-ubuntu NetworkManager[715]: <info> [1610410649.0117] dns-mgr[0x557ed53b2290]: init: dns=systemd-resolved rc-manager=symlink, plugin=systemd-resolved
Jan 11 16:17:29 henry-ubuntu NetworkManager[715]: <info> [1610410649.0120] manager[0x557ed53c8030]: rfkill: Wi-Fi hardware radio set enabled
Jan 11 16:17:29 henry-ubuntu NetworkManager[715]: <info> [1610410649.0120] manager[0x557ed53c8030]: rfkill: WWAN hardware radio set enabled
Jan 11 16:17:29 henry-ubuntu NetworkManager[715]: <info> [1610410649.0170] Loaded device plugin: NMTeamFactory (/usr/lib/x86_64-linux-gnu/NetworkManager/1.22.10/libnm-device-plugin-team.so)
Jan 11 16:17:29 henry-ubuntu NetworkManager[715]: <info> [1610410649.0177] Loaded device plugin: NMAtmManager (/usr/lib/x86_64-linux-gnu/NetworkManager/1.22.10/libnm-device-plugin-adsl.so)
Jan 11 16:17:29 henry-ubuntu NetworkManager[715]: <info> [1610410649.0205] Loaded device plugin: NMBluezManager (/usr/lib/x86_64-linux-gnu/NetworkManager/1.22.10/libnm-device-plugin-bluetooth.so)
Jan 11 16:17:29 henry-ubuntu NetworkManager[715]: <info> [1610410649.0211] Loaded device plugin: NMWwanFactory (/usr/lib/x86_64-linux-gnu/NetworkManager/1.22.10/libnm-device-plugin-wwan.so)
Jan 11 16:17:29 henry-ubuntu NetworkManager[715]: <info> [1610410649.0225] Loaded device plugin: NMWifiFactory (/usr/lib/x86_64-linux-gnu/NetworkManager/1.22.10/libnm-device-plugin-wifi.so)
Jan 11 16:17:29 henry-ubuntu NetworkManager[715]: <info> [1610410649.0227] manager: rfkill: Wi-Fi enabled by radio killswitch; enabled by state file
Jan 11 16:17:29 henry-ubuntu NetworkManager[715]: <info> [1610410649.0228] manager: rfkill: WWAN enabled by radio killswitch; enabled by state file
Jan 11 16:17:29 henry-ubuntu NetworkManager[715]: <info> [1610410649.0228] manager: Networking is enabled by state file
Jan 11 16:17:29 henry-ubuntu NetworkManager[715]: <info> [1610410649.0229] dhcp-init: Using DHCP client 'internal'
Jan 11 16:17:29 henry-ubuntu NetworkManager[715]: <info> [1610410649.0237] settings: Loaded settings plugin: ifupdown ("/usr/lib/x86_64-linux-gnu/NetworkManager/1.22.10/libnm-settings-plugin-ifupdown.so")
Jan 11 16:17:29 henry-ubuntu NetworkManager[715]: <info> [1610410649.0237] settings: Loaded settings plugin: keyfile (internal)
Jan 11 16:17:29 henry-ubuntu NetworkManager[715]: <info> [1610410649.0237] ifupdown: management mode: unmanaged
Jan 11 16:17:29 henry-ubuntu NetworkManager[715]: <warn> [1610410649.0239] ifupdown: interfaces file /etc/network/interfaces doesn't exist
Jan 11 16:17:29 henry-ubuntu NetworkManager[715]: <info> [1610410649.0270] device (lo): carrier: link connected
Jan 11 16:17:29 henry-ubuntu NetworkManager[715]: <info> [1610410649.0273] manager: (lo): new Generic device (/org/freedesktop/NetworkManager/Devices/1)
Jan 11 16:17:29 henry-ubuntu NetworkManager[715]: <info> [1610410649.0282] manager: (enp4s0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/2)
Jan 11 16:17:29 henry-ubuntu NetworkManager[715]: <info> [1610410649.0292] device (enp4s0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Jan 11 16:17:29 henry-ubuntu NetworkManager[715]: <warn> [1610410649.2448] Error: failed to open /run/network/ifstate
Jan 11 16:17:29 henry-ubuntu NetworkManager[715]: <info> [1610410649.2488] modem-manager: ModemManager available
Jan 11 16:17:32 henry-ubuntu NetworkManager[715]: <info> [1610410652.1995] device (enp4s0): carrier: link connected
Jan 11 16:17:32 henry-ubuntu NetworkManager[715]: <info> [1610410652.1999] device (enp4s0): state change: unavailable -> disconnected (reason 'carrier-changed', sys-iface-state: 'managed')
Jan 11 16:17:32 henry-ubuntu NetworkManager[715]: <info> [1610410652.2006] policy: auto-activating connection 'Wired connection 1' (8efff847-78d3-4a1a-b288-5ea00e9af99c)
Jan 11 16:17:32 henry-ubuntu NetworkManager[715]: <info> [1610410652.2010] device (enp4s0): Activation: starting connection 'Wired connection 1' (8efff847-78d3-4a1a-b288-5ea00e9af99c)
Jan 11 16:17:32 henry-ubuntu NetworkManager[715]: <info> [1610410652.2011] device (enp4s0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Jan 11 16:17:32 henry-ubuntu NetworkManager[715]: <info> [1610410652.2014] manager: NetworkManager state is now CONNECTING
Jan 11 16:17:32 henry-ubuntu NetworkManager[715]: <info> [1610410652.2016] device (enp4s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Jan 11 16:17:32 henry-ubuntu NetworkManager[715]: <info> [1610410652.2019] device (enp4s0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Jan 11 16:17:32 henry-ubuntu NetworkManager[715]: <info> [1610410652.2021] dhcp4 (enp4s0): activation: beginning transaction (timeout in 45 seconds)
Jan 11 16:18:03 henry-ubuntu NetworkManager[715]: <info> [1610410683.1176] agent-manager: agent[16fc2fa8dd625d49,:1.76/org.gnome.Shell.NetworkAgent/1000]: agent registered
Jan 11 16:18:17 henry-ubuntu NetworkManager[715]: <warn> [1610410697.1389] dhcp4 (enp4s0): request timed out
Jan 11 16:18:17 henry-ubuntu NetworkManager[715]: <info> [1610410697.1389] dhcp4 (enp4s0): state changed unknown -> timeout
Jan 11 16:18:17 henry-ubuntu NetworkManager[715]: <info> [1610410697.1390] device (enp4s0): state change: ip-config -> failed (reason 'ip-config-unavailable', sys-iface-state: 'managed')
Jan 11 16:18:17 henry-ubuntu NetworkManager[715]: <info> [1610410697.1394] manager: NetworkManager state is now DISCONNECTED
Jan 11 16:18:17 henry-ubuntu NetworkManager[715]: <warn> [1610410697.1401] device (enp4s0): Activation: failed for connection 'Wired connection 1'
Jan 11 16:18:17 henry-ubuntu NetworkManager[715]: <info> [1610410697.1404] device (enp4s0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Jan 11 16:18:17 henry-ubuntu NetworkManager[715]: <info> [1610410697.1571] dhcp4 (enp4s0): canceled DHCP transaction
Jan 11 16:18:17 henry-ubuntu NetworkManager[715]: <info> [1610410697.1572] dhcp4 (enp4s0): state changed timeout -> done
Jan 11 16:18:17 henry-ubuntu NetworkManager[715]: <info> [1610410697.1615] policy: auto-activating connection 'Wired connection 1' (8efff847-78d3-4a1a-b288-5ea00e9af99c)
Jan 11 16:18:17 henry-ubuntu NetworkManager[715]: <info> [1610410697.1620] device (enp4s0): Activation: starting connection 'Wired connection 1' (8efff847-78d3-4a1a-b288-5ea00e9af99c)
Jan 11 16:18:17 henry-ubuntu NetworkManager[715]: <info> [1610410697.1621] device (enp4s0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Jan 11 16:18:17 henry-ubuntu NetworkManager[715]: <info> [1610410697.1623] manager: NetworkManager state is now CONNECTING
Jan 11 16:18:17 henry-ubuntu NetworkManager[715]: <info> [1610410697.1625] device (enp4s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Jan 11 16:18:17 henry-ubuntu NetworkManager[715]: <info> [1610410697.1628] device (enp4s0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Jan 11 16:18:17 henry-ubuntu NetworkManager[715]: <info> [1610410697.1630] dhcp4 (enp4s0): activation: beginning transaction (timeout in 45 seconds)
-- 第二次编辑 --
关于<warn>
消息:
- ifupdown:接口文件 /etc/network/interfaces 不存在
/etc/network/ 目录没有接口文件,包含 if-up.d、if-down.d 等文件
- 错误:无法打开/run/network/ifstate
/run/ 不包含网络文件夹
- dhcp4(enp4s0):请求超时
这是否意味着我应该重新配置 DHCP 服务器,或者其他什么?
- 激活:连接“有线连接 1”失败
我认为这只是我所发布的错误的另一个版本,而不是“线索”
-- 第三次编辑 --
实际上,我认为是 dhcp 超时消息导致了问题。当我从 Windows 启动后检查日志时,我没有收到该错误,而是收到一堆其他 dhcp4 消息,表明已成功获取 IP、主机名等。
-- 第四次编辑 --
我删除了该分区上的所有内容后重新安装了 ubuntu。但仍然遇到同样的问题。