Network slow to resume after suspend

I have noticed recently that my machine takes a while to pick up a network connection after suspend. It can take up to 10 seconds for the network to resume. I’m on an ethernet connection and no issues once it connects.

Any ideas why this might be happening? It doesn’t seem like a big deal but it gets annoying waiting around.

https://clbin.com/U7Yby

Summary

System:
Kernel: 5.19.7-arch1-1 arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
Desktop: sway v: 1.8-dev-d0b9bf94 dm: LightDM Distro: EndeavourOS
base: Arch Linux
Machine:
Type: Desktop Mobo: Micro-Star model: B450 TOMAHAWK MAX (MS-7C02) v: 1.0
serial: UEFI: American Megatrends v: 3.60
date: 04/22/2020
CPU:
Info: 6-core model: AMD Ryzen 5 3600 bits: 64 type: MT MCP arch: Zen 2
rev: 0 cache: L1: 384 KiB L2: 3 MiB L3: 32 MiB
Speed (MHz): avg: 2332 high: 3789 min/max: 2200/4208 boost: enabled
cores: 1: 2200 2: 2200 3: 2200 4: 2197 5: 2200 6: 2200 7: 2200 8: 3789
9: 2200 10: 2200 11: 2200 12: 2200 bogomips: 86425
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
Device-1: AMD Lexa PRO [Radeon 540/540X/550/550X / RX 540X/550/550X]
vendor: Sapphire driver: amdgpu v: kernel arch: GCN-4 pcie: speed: 8 GT/s
lanes: 8 ports: active: DP-1 empty: DVI-D-1,HDMI-A-1 bus-ID: 26:00.0
chip-ID: 1002:699f
Display: wayland server: X.org v: 1.21.1.4 with: Xwayland v: 21.1.99
compositor: sway v: 1.8-dev-d0b9bf94 driver: X: loaded: amdgpu
unloaded: fbdev,modesetting,vesa gpu: amdgpu display-ID: 1
Monitor-1: DP-1 model: Dell U2720Q res: 3840x2160 dpi: 163
diag: 685mm (27")
OpenGL: renderer: AMD Radeon RX 550 / 550 Series (polaris12 LLVM 14.0.6
DRM 3.47 5.19.7-arch1-1) v: 4.6 Mesa 22.1.7 direct render: Yes
Audio:
Device-1: AMD Baffin HDMI/DP Audio [Radeon RX 550 640SP / 560/560X]
vendor: Sapphire driver: snd_hda_intel v: kernel pcie: speed: 8 GT/s
lanes: 8 bus-ID: 26:00.1 chip-ID: 1002:aae0
Device-2: AMD Starship/Matisse HD Audio vendor: Micro-Star MSI
driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s lanes: 16
bus-ID: 28:00.4 chip-ID: 1022:1487
Sound Server-1: ALSA v: k5.19.7-arch1-1 running: yes
Sound Server-2: sndio v: N/A running: no
Sound Server-3: JACK v: 1.9.21 running: no
Sound Server-4: PulseAudio v: 16.1 running: no
Sound Server-5: PipeWire v: 0.3.57 running: yes
Network:
Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
vendor: Micro-Star MSI driver: r8169 v: kernel pcie: speed: 2.5 GT/s
lanes: 1 port: f000 bus-ID: 22:00.0 chip-ID: 10ec:8168
IF: enp34s0 state: up speed: 100 Mbps duplex: full mac:
Bluetooth:
Device-1: Cambridge Silicon Radio Bluetooth Dongle (HCI mode) type: USB
driver: btusb v: 0.8 bus-ID: 1-9:4 chip-ID: 0a12:0001
Report: rfkill ID: hci0 rfk-id: 19 state: up address: see --recommends
Drives:
Local Storage: total: 2.27 TiB used: 293.58 GiB (12.6%)
ID-1: /dev/sda vendor: Crucial model: CT1000MX500SSD1 size: 931.51 GiB
speed: 6.0 Gb/s serial:
ID-2: /dev/sdb vendor: Crucial model: CT500MX500SSD1 size: 465.76 GiB
speed: 6.0 Gb/s serial:
ID-3: /dev/sdc vendor: Western Digital model: WD10EZRX-00A8LB0
size: 931.51 GiB speed: 6.0 Gb/s serial:
Partition:
ID-1: / size: 227.84 GiB used: 88.94 GiB (39.0%) fs: ext4 dev: /dev/sdb5
ID-2: /boot/efi size: 96 MiB used: 29.2 MiB (30.4%) fs: vfat
dev: /dev/sdb1
Swap:
Alert: No swap data was found.
Sensors:
System Temperatures: cpu: 47.8 C mobo: N/A gpu: amdgpu temp: 47.0 C
Fan Speeds (RPM): N/A gpu: amdgpu fan: 1053
Info:
Processes: 335 Uptime: 3d 12h 16m Memory: 31.3 GiB used: 10.67 GiB (34.1%)
Init: systemd v: 251 default: graphical Compilers: gcc: 12.2.0
clang: 14.0.6 Packages: pacman: 1402 Shell: fish v: 3.5.1
running-in: xfce4-terminal inxi: 3.3.20

It seems to be related to Network Manager or the kernel. Try linux-lts and see if that helps. If so, it’s likely a kernel regression that will be fixed at some point.

Otherwise systemctl restart NetworkManager will get things running again.