我刚刚升级到 21.04。现在从挂起状态唤醒后。网线显示为未插上。我找到了一个解决方案。那就是我必须删除并重新安装以太网设备驱动程序。通过 modprobe -r 然后 -i。每次从挂起状态唤醒后。
有什么优雅而简单的解决方案可以解决这个问题?
从 20.10 升级到 21.04
lspci -nn | grep -i ethernet
04:00.0 Ethernet controller [0200]: Qualcomm Atheros Killer E220x Gigabit Ethernet Controller [1969:e091] (rev 13)
sudo lshw -C network
*-network
description: Ethernet interface
product: Killer E220x Gigabit Ethernet Controller
vendor: Qualcomm Atheros
physical id: 0
bus info: pci@0000:04:00.0
logical name: enp4s0
version: 13
serial: 44:8a:5b:46:f3:a5
size: 1Gbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm pciexpress msi msix bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=alx driverversion=5.11.0-18-generic duplex=full ip=192.168.1.158 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
resources: irq:19 memory:f7900000-f793ffff ioport:d000(size=128)
*-network DISABLED
description: Wireless interface
product: Wireless 3160
vendor: Intel Corporation
physical id: 0
bus info: pci@0000:05:00.0
logical name: wlp5s0
version: 83
serial: 30:3a:64:5f:7b:1b
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=iwlwifi driverversion=5.11.0-18-generic firmware=17.3216344376.0 3160-17.ucode latency=0 link=no multicast=yes wireless=IEEE 802.11
resources: irq:35 memory:f7800000-f7801fff
inxi -Fxz
System: Kernel: 5.11.0-18-generic x86_64 bits: 64 compiler: gcc v: 10.2.1 Desktop: GNOME 3.38.4
Distro: Ubuntu 21.04 (Hirsute Hippo)
Machine: Type: Laptop System: Micro-Star product: GP70 2PE v: REV:1.0 serial: <filter>
Mobo: Micro-Star model: MS-175A v: REV:1.0 serial: <filter> BIOS: American Megatrends v: E175AIMS.109
date: 05/27/2014
Battery: ID-1: BAT1 charge: 6.8 Wh condition: 6.8/48.8 Wh (14%) model: MSI Corp. MS-175A status: Full
CPU: Info: Quad Core model: Intel Core i7-4710HQ bits: 64 type: MT MCP arch: Haswell rev: 3 L2 cache: 6 MiB
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 39909
Speed: 2561 MHz min/max: 1800/3500 MHz Core speeds (MHz): 1: 2561 2: 2852 3: 2695 4: 2582 5: 2495 6: 2494 7: 2467
8: 2487
Graphics: Device-1: Intel 4th Gen Core Processor Integrated Graphics vendor: Micro-Star MSI driver: i915 v: kernel
bus ID: 00:02.0
Device-2: NVIDIA GM108M [GeForce 840M] vendor: Micro-Star MSI driver: nvidia v: 460.80 bus ID: 01:00.0
Display: x11 server: X.Org 1.20.11 driver: loaded: modesetting,nvidia unloaded: fbdev,nouveau,vesa
resolution: 1600x900
OpenGL: renderer: GeForce 840M/PCIe/SSE2 v: 4.6.0 NVIDIA 460.80 direct render: Yes
Audio: Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio vendor: Micro-Star MSI driver: snd_hda_intel
v: kernel bus ID: 00:03.0
Device-2: Intel 8 Series/C220 Series High Definition Audio vendor: Micro-Star MSI driver: snd_hda_intel v: kernel
bus ID: 00:1b.0
Sound Server: ALSA v: k5.11.0-18-generic
Network: Device-1: Qualcomm Atheros Killer E220x Gigabit Ethernet vendor: Micro-Star MSI driver: alx v: kernel port: d000
bus ID: 04:00.0
IF: enp4s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Device-2: Intel Wireless 3160 driver: iwlwifi v: kernel port: d000 bus ID: 05:00.0
IF: wlp5s0 state: down mac: <filter>
Bluetooth: Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8 bus ID: 1-1.3:4
Report: ID: hci0 state: up running pscan bt-v: 2.1 lmp-v: 4.0 address: <filter>
Drives: Local Storage: total: 931.51 GiB used: 596.27 GiB (64.0%)
ID-1: /dev/sda vendor: Toshiba model: MQ01ABD100 size: 931.51 GiB temp: 39 C
Partition: ID-1: / size: 914.9 GiB used: 596.27 GiB (65.2%) fs: ext4 dev: /dev/sda4
ID-2: /boot/efi size: 512 MiB used: 4 KiB (0.0%) fs: vfat dev: /dev/sda3
Swap: ID-1: swap-1 type: file size: 2 GiB used: 23.8 MiB (1.2%) file: /swapfile
Sensors: System Temperatures: cpu: 84.0 C mobo: N/A gpu: nvidia temp: 42 C
Fan Speeds (RPM): N/A
Info: Processes: 365 Uptime: 7h 58m Memory: 15.55 GiB used: 5.48 GiB (35.2%) Init: systemd runlevel: 5 Compilers:
gcc: 10.3.0 Packages: 2784 Shell: Bash v: 5.1.4 inxi: 3.3.01
cat /etc/network/interfaces and cat /etc/netplan/*.yaml
cat: /etc/network/interfaces: No such file or directory
cat: and: No such file or directory
cat: cat: No such file or directory
# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager
更新。我遵循了这里的建议。从挂起状态唤醒后,驱动程序不会自动删除和安装。 https://askubuntu.com/a/1058760/1247412
答案1
terminal
尝试这个...nm-connection-editor
并选择要编辑的有线连接。
- 确认设备以太网地址
- 确认 WOL
- 将链接协商更改为自动
- 或者尝试 Manual/1000Mb/full
- 重启并重新测试
还要验证自动连接...
更新#1:
查看错误报告https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1931301
更新 #2:
使用了以下解决方法修复Ubuntu 18.04-挂起后以太网断开连接
答案2
我在从 20.08 升级到 21.04 时遇到了同样的问题,使用了一段时间的无线,今天从头开始重新安装了 21.04,以为是某个升级错误。
全新安装仍然以同样的方式失败。
mike@mike-XPS-8930:~$ lspci -nn | grep -i ethernet 04:00.0 以太网控制器 [0200]: Qualcomm Atheros Killer E2400 千兆以太网控制器 [1969:e0a1] (rev 10) mike@mike-XPS-8930:~$
答案3
我认为重启太麻烦,没有必要。只需重新加载网卡内核模块即可使坏掉的网卡恢复活力。
最近我的网卡从睡眠状态恢复到 RAM 时也出现了同样的问题。但过去我 100% 确定没有出现过问题。我怀疑是新内核驱动程序 5.11.0-25-generic 出了问题
因此,在 Ubuntu 20.04 中,lshw -C network
我获取了驱动程序名称,然后modprobe -rv driver_name
将删除,然后modprobe -v driver_name
我的有线以太网网络又回来了
其他方法都不管用,systemctl restart NetworkManager
没有 modprobe driver recicle 步骤就无法唤醒我的以太网卡。我怀疑是 WOL 的问题,我的意思是他们在等待局域网唤醒,而不是本地从睡眠中恢复
aug 27 01:54:53 berbecel NetworkManager[2357602]: <info> [1630018493.3313] manager: sleep: sleep requested (sleeping: no enabled: yes)
aug 27 01:54:53 berbecel NetworkManager[2357602]: <info> [1630018493.3314] manager: NetworkManager state is now ASLEEP
aug 27 01:54:53 berbecel NetworkManager[2357602]: <info> [1630018493.3317] device (enp2s0): state change: activated -> deactivating (reason 'sleeping', sys-iface-state: 'managed')
aug 27 01:54:53 berbecel NetworkManager[2357602]: <info> [1630018493.3692] device (enp2s0): state change: deactivating -> disconnected (reason 'sleeping', sys-iface-state: 'managed')
aug 27 01:54:53 berbecel NetworkManager[2357602]: <info> [1630018493.3881] dhcp4 (enp2s0): canceled DHCP transaction
aug 27 01:54:53 berbecel NetworkManager[2357602]: <info> [1630018493.3881] dhcp4 (enp2s0): state changed bound -> done
aug 27 01:54:53 berbecel NetworkManager[2357602]: <info> [1630018493.3920] device (enp2s0): state change: disconnected -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
aug 28 02:24:11 berbecel NetworkManager[2357602]: <info> [1630106651.3796] manager: sleep: wake requested (sleeping: yes enabled: yes)
aug 28 02:24:11 berbecel NetworkManager[2357602]: <info> [1630106651.3797] device (enp2s0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'managed')
aug 28 02:24:11 berbecel NetworkManager[2357602]: <info> [1630106651.3812] manager: NetworkManager state is now DISCONNECTED
但是之后
aug 28 02:47:59 berbecel NetworkManager[2368981]: <info> [1630108079.2431] device (enp2s0): driver '(null)' does not support carrier detection.
aug 28 02:47:59 berbecel NetworkManager[2368981]: <info> [1630108079.2433] device (enp2s0): driver 'alx' does not support carrier detection.
aug 28 02:47:59 berbecel NetworkManager[2368981]: <info> [1630108079.2436] manager: (enp2s0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/2)
aug 28 02:47:59 berbecel NetworkManager[2368981]: <info> [1630108079.2445] device (enp2s0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
aug 28 02:47:59 berbecel NetworkManager[2368981]: <info> [1630108079.2565] device (enp2s0): state change: unavailable -> disconnected (reason 'none', sys-iface-state: 'managed')
aug 28 02:47:59 berbecel NetworkManager[2368981]: <info> [1630108079.2577] device (enp2s0): Activation: starting connection 'rdslink' (7ef38c4e-886b-3738-b740-eb3b676cde2d)
aug 28 02:47:59 berbecel NetworkManager[2368981]: <info> [1630108079.2578] device (enp2s0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
aug 28 02:47:59 berbecel NetworkManager[2368981]: <info> [1630108079.2586] device (enp2s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
aug 28 02:47:59 berbecel NetworkManager[2368981]: <info> [1630108079.2592] device (enp2s0): state change: config -> failed (reason 'config-failed', sys-iface-state: 'managed')
aug 28 02:47:59 berbecel NetworkManager[2368981]: <warn> [1630108079.2606] device (enp2s0): Activation: failed for connection 'rdslink'
所以看起来device (enp2s0): driver 'alx' does not support carrier detection.
意味着我的 QCA8171 千兆以太网没有 WOL 支持并且进入睡眠状态意味着将预先睡眠以等待永远不会到达的 WOl 信号?