我有 Windows 10 和 Ubuntu 20.14 的双启动。
从前一段时间,我的电脑出现问题......当它在 Ubuntu 中启动时,有时会随机启动(我的意思是,大约 30% 的初创公司会出现问题)说Activation of network connection failed
,这是一台台式电脑,所以我使用以太网端口。
当问题出现时,在网络上尝试一些解决方案并不能解决问题。我试过了:
- 此处建议重新启用有线连接
- 重新启动所有路由器 - 我有 2 个,连接方式如下:[ISP 路由器] <LAN 端口 - WAN 端口> [Tplinkrouter] <LAN 端口 - Eth 端口> [PC]。此处建议的解决方案
- 重新安装网络管理器并重新启动:
sudo apt-get install --reinstall network-manager ; sudo reboot now
这里也建议
此外,真正有趣的是,当我从 Windows 10 重新启动到 Ubuntu 时,问题消失了,如果我从 Ubuntu 重新启动到 Ubuntu,那么问题又出现了......
关于我的系统的一些上下文:
- Windows 10 快速启动被禁用
- 双引导在 nvme 驱动器上
- 这个问题永远不会出现在 Windows 上
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:05:00.0
logical name: enp5s0
version: 0c
serial: b4:2e:99:e7:89:ea
size: 100Mbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=5.8.0-48-generic duplex=full firmware=rtl8168g-2_0.0.1 02/06/13 ip=192.168.1.65 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
resources: irq:35 ioport:f000(size=256) memory:fcb00000-fcb00fff memory:f0300000-f0303fff
有什么办法可以解决这个恼人的失败?
提前致谢。
编辑1:
lspci -nn | grep -i ethernet
输出:
05:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 0c)
编辑2:
遵循@heynnema 解决方案:
步骤 1.将脚本“r8169_disable_msi”添加到/etc/initramfs-tools/scripts/init-top
路径并chmod a+x
对其执行以下操作:
要检查这里是否有ls -l /etc/initramfs-tools/scripts/init-top
输出:
total 4
-rwxr-xr-x 1 root root 1118 mar 30 11:59 r8169_disable_msi
第 2 步。 “将 'r8169_disable_msi' 添加到内核命令行(/etc/default/grub, GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" 通常。)”所以我对 /etc/default/grub 文件进行了更改:
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash r8169_disable_msi"
GRUB_CMDLINE_LINUX=""
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480
GRUB_GFXMODE=1920x1080
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
步骤 3. sudo update-initramfs -c -k $(uname -r)
输出:
update-initramfs: Generating /boot/initrd.img-5.8.0-48-generic
W: Possible missing firmware /lib/firmware/amdgpu/navi12_gpu_info.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/arcturus_gpu_info.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/arcturus_ta.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/arcturus_asd.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/arcturus_sos.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/navi12_ta.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/navi12_asd.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/navi12_sos.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/arcturus_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/arcturus_mec2.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/arcturus_mec.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/navi12_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/navi12_mec2.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/navi12_mec.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/navi12_me.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/navi12_pfp.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/navi12_ce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/arcturus_sdma.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/navi12_sdma1.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/navi12_sdma.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/navi10_mes.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/navi12_dmcu.bin for module amdgpu
I: The initramfs will attempt to resume from /dev/nvme0n1p6
I: (UUID=64e37a0f-3360-471d-8c6d-02a5865d7e77)
I: Set the RESUME variable to override this.
步骤 4. sudo update-grub
输出:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.8.0-48-generic
Found initrd image: /boot/initrd.img-5.8.0-48-generic
Found linux image: /boot/vmlinuz-5.8.0-45-generic
Found initrd image: /boot/initrd.img-5.8.0-45-generic
Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings
done
这个解决方案奏效了。