Slow network Awaking from Suspend

I'm experiencing slow network performance after a wake up from suspend. Noticed someone had an issue with Bluetooth. In my case, it's off. What I did notice from the logs is the following

Jan 01 09:51:58 manjaro0 daemon/network[1138]: utils_dbus_nm.go:538: path is invalid
                                                 ->  manager_active.go:280
                                                 ->  manager_active.go:242
                                                 ->  asm_amd64.s:522
                                                 ->  value.go:447
                                                 ->  value.go:308
                                                 ->  default_handler.go:128
                                                 ->  export.go:153
                                                 ->  asm_amd64.s:1333

Jan 01 09:52:00 manjaro0 ModemManager[467]: <info>  Couldn't check support for device '/sys/devices/pci0000:00/0000:00:1f.6': not supported by any plugin
Jan 01 09:51:58 manjaro0 kernel: igb 0000:03:00.0 enp3s0: igb: enp3s0 NIC Link is Up 10 Mbps Full Duplex, Flow Control: None
Jan 01 09:51:58 manjaro0 kernel: igb 0000:03:00.0: Unsupported Speed/Duplex configuration
Jan 01 09:51:58 manjaro0 NetworkManager[471]: <warn>  [1546354318.8785] device (enp3s0): set-link: failure to set link negotiation

All of this corrects itself once the box is rebooted.

System:    Host: manjaro0 Kernel: 4.20.0-1-MANJARO x86_64 bits: 64 compiler: gcc v: 8.2.1 
           Desktop: Deepin 15.8 Distro: Manjaro Linux 
Machine:   Type: Desktop System: Shuttle product: DH110 v: V1.0 serial: <filter> 
           Mobo: Shuttle model: FS110 v: 1.0 serial: <filter> UEFI: American Megatrends v: 2.06 
           date: 01/05/2018 
Battery:   Device-1: hidpp_battery_0 model: Logitech Wireless Mouse MX Master 
           charge: 100% (should be ignored) status: Discharging 
CPU:       Topology: Quad Core model: Intel Core i5-6400 bits: 64 type: MCP arch: Skylake-S 
           rev: 3 L2 cache: 6144 KiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 21704 
           Speed: 1077 MHz min/max: 800/3300 MHz Core speeds (MHz): 1: 1077 2: 897 3: 1137 
           4: 1782 
Graphics:  Device-1: Intel HD Graphics 530 vendor: Holco Enterprise Co /Shuttle driver: i915 
           v: kernel bus ID: 00:02.0 
           Display: x11 server: X.Org 1.20.3 driver: intel unloaded: modesetting 
           resolution: 1920x1200~60Hz, 1920x1200~60Hz 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 530 (Skylake GT2) v: 4.5 Mesa 18.3.1 
           direct render: Yes 
Audio:     Device-1: Intel 100 Series/C230 Series Family HD Audio 
           vendor: Holco Enterprise Co /Shuttle Sunrise Point-H driver: snd_hda_intel v: kernel 
           bus ID: 00:1f.3 
           Sound Server: ALSA v: k4.20.0-1-MANJARO 
Network:   Device-1: Intel Ethernet I219-LM driver: e1000e v: 3.2.6-k port: f040 bus ID: 00:1f.6 
           IF: enp0s31f6 state: up speed: 1000 Mbps duplex: full mac: <filter> 
           Device-2: Intel I211 Gigabit Network vendor: Holco Enterprise Co /Shuttle driver: igb 
           v: 5.4.0-k port: d000 bus ID: 03:00.0 
           IF: enp3s0 state: up speed: 10 Mbps duplex: full mac: <filter> 
           IF-ID-1: us-il1-wg-ivpn state: unknown speed: N/A duplex: N/A mac: N/A 
Drives:    Local Storage: total: 465.76 GiB used: 49.79 GiB (10.7%) 
           ID-1: /dev/sda vendor: Samsung model: SSD 860 EVO 500GB size: 465.76 GiB 
Partition: ID-1: / size: 440.78 GiB used: 49.79 GiB (11.3%) fs: ext4 dev: /dev/sda2 
           ID-2: swap-1 size: 16.64 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sda3 
Sensors:   System Temperatures: cpu: 31.0 C mobo: 29.8 C 
           Fan Speeds (RPM): N/A 
Info:      Processes: 263 Uptime: 20h 42m Memory: 15.12 GiB used: 2.64 GiB (17.4%) Init: systemd 
           Compilers: gcc: 8.2.1 Shell: zsh v: 5.6.2 inxi: 3.0.28 

I tried different kernels 4.14 and 4.20, still same issue. Also, I tried a different DE.

Hosted by Windstream (Chicago, IL) [4.50 km]: 42.696 ms
Testing download speed................................................................................
Download: 1.46 Mbit/s
Testing upload speed......................................................................................................
Upload: 4.11 Mbit/s

The connection is 50/10. As soon as I see the gateway latency be high like that I know it's gonna return crappy results. I've repeated these steps in and out of a VPN.

Any help would be appreciated.

Thanks for your time and attention,

Your networking setup looks "complicated". Apparently you have an active 1Gbps connection, an active 10Mbps connection, and a Wireguard VPN.

Have you tried manually removing and re-adding the igb kernel module to see if resetting it helps?

sudo modprobe -r igb
sudo modprobe igb

(You may need a systemctl restart NetworkManager in there too)

Do you have your speed set to Auto negotiation on both of your adapters. If not, I would highly recommend that.

Have you tried using your other adapter to see if this is the same with the Intel Ethernet I219-LM and the e1000e driver. Unfortunately the I219-L series is having a lot of problems in Linux recently.

I do not know if both of your NIC's are onboard. If so, I would suggest you disable one of your NIC's in the bios if you are not using both (if that option is available).

It seems that many systems do not suspend/resume well because of issues with networking components. If @jonathon's suggestion does not work, then a full shut down of all networking components prior to suspend may resolve this problem. Your network components can be be shut down and restarted by writing two separate network services to accomplish this automatically.

There is lots of info on the forum about writing these types of services.

Search these terms on the forum:

Systemd suspend resume service file

There are many other posts on this topic if you search the forum.

https://archived.forum.manjaro.org/t/kernel-4-19-0-3-not-network-after-suspending-gnome-edition/63544/2

https://archived.forum.manjaro.org/t/wifi-adapter-tp-link-tl-wn823n-must-be-reconnected-for-it-to-work/52968/19

https://archived.forum.manjaro.org/t/surface-pro-1796-wifi-not-resuming-after-suspend/48133/47

https://archived.forum.manjaro.org/t/thinkpad-x230t-wont-suspend-under-kernel-419rc4-4-18-4-17-4-14-4-9/59798/21

Here are some external links with excellent systemd reference material:

The ArchWiki - systemd

Red Hat - systemd-targets

Red Hat - systemd unit files

Systemd manpage

I would also suggest testing kernel 4.18 (even though it is designated EOL) to see if the issue is present there.

Best of luck.

This seemed to work. What I'll do next is create those files that shutdown the networking before a suspend.

You need to create a systemd service to do that. You will need 2 services, one prior to suspend and one post resume.

I created those service files and it didn't work. I'm assuming I left a step out somewhere. What I did for now was disabled the offending adapter from the BIOS. If I do the steps manually they work.

Again, thanks for all of your assistance. It's appreciated.

Post your systemd service files and I'll see if I can give you any tips to get them working. This should generally be fairly easy to do with a service.

1 Like
#/etc/systemd/system/network-resume.service
#sudo systemctl enable network-resume.service
[[Unit]
Description=Start network components after resuming
After=suspend.target

[Service]
Type=oneshot
ExecStartPre=/bin/sleep 15s
ExecStart=/bin/modprobe igb; ip link set enp3s0 up; systemctl start NetworkManager.service

[Install]
WantedBy=suspend.target
#/etc/systemd/system/network-suspend.service
#sudo systemctl enable network-suspend.service 
[Unit]
Description=Stop network components prior to suspending
Before=sleep.target

[Service]
Type=oneshot
ExecStart=/bin/systemctl stop NetworkManager.service; ip link set enp3s0 down; modprobe -r igb

[Install]
WantedBy=sleep.target
1 Like

I would not chain the commands like that. I would try separate commands, with a sleep of at least 2 seconds between commands.

ExecStartPre=/usr/bin/sleep 15
ExecStart=/usr/bin/modprobe igb
ExecStart=/usr/bin/sleep 3
ExecStart=/usr/bin/ip link set enp3s0 up
ExecStart=/usr/bin/sleep 3
ExecStartPost=/usr/bin/systemctl start NetworkManager

Also, there's this:

though I suspect that might be a typo.

I think these services should fix your suspend/resume issue.

Suspend unit:

#/etc/systemd/system/network-suspend.service
#sudo systemctl enable network-suspend.service
#sudo systemctl start network-suspend.service
#sudo systemctl status network-suspend.service
#sudo systemctl daemon-reload
[Unit]
Description=Network suspend service 
Before=sleep.target
StopWhenUnneeded=yes

[Service]
User=root
Type=oneshot
RemainAfterExit=yes
ExecStartPre=/usr/bin/sudo -u $USER /bin/bash -lc 'nmcli networking off'
ExecStart=/usr/bin/sleep 1
ExecStart=/usr/bin/systemctl stop NetworkManager
ExecStart=/usr/bin/sleep 1
ExecStart=/usr/bin/ip link set enp3s0  down  
ExecStart=/usr/bin/sleep 1
ExecStartPost=/usr/bin/modprobe -r igb

[Install]
WantedBy=sleep.target

Resume unit:

#/etc/systemd/system/network-resume.service
#sudo systemctl enable network-resume.service
#sudo systemctl start network-resume.service
#sudo systemctl status network-resume.service
#sudo systemctl daemon-reload
[Unit]
Description=Network resume service
After=suspend.target
StopWhenUnneeded=yes

[Service]
User=root
Type=oneshot
RemainAfterExit=yes
ExecStartPre=/usr/bin/sleep 10
ExecStart=/usr/bin/modprobe igb
ExecStart=/usr/bin/sleep 2
ExecStart=/usr/bin/ip link set enp3s0 up
ExecStart=/usr/bin/sleep 2
ExecStart=/usr/bin/systemctl start NetworkManager
ExecStart=/usr/bin/sleep 2
ExecStartPost=/usr/bin/sudo -u $USER /bin/bash -lc 'nmcli networking on'

[Install]
WantedBy=suspend.target

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by