You are not logged in.

#1 2018-02-21 17:23:28

Cavsfan
Member
From: USA
Registered: 2015-07-08
Posts: 101

[SOLVED] No network connection after suspend

This just began happening over the last 2 weeks and I have yet to figure out why.

I thought it was only when my VPN was connected but, that  is not the case. Every single time I put the system to sleep (suspend), when I wake it there is no internet connection.
I have to reboot the system to get the connection back and Arch is the only system that does this. I have Windows 10 and a couple of Xubuntu installs on here and they are all fine.

It was about the time the 4.15.1-2-ARCH kernel was released but, it also does it on the LTS kernel so the kernel has nothing to do with it apparently.

I can suspend it for 5 minutes or 2 hours and it will not connect after it is awakened.

Any help would be appreciated.

Last edited by Cavsfan (2019-08-22 14:35:21)

Offline

#2 2018-02-21 17:48:57

seth
Member
Registered: 2012-09-03
Posts: 49,986

Re: [SOLVED] No network connection after suspend

check dmesg, your journal and the rfkill state (in case it's wifi - what brings us to the question of details on HW and how you configure your network)

Offline

#3 2018-02-21 18:18:45

Cavsfan
Member
From: USA
Registered: 2015-07-08
Posts: 101

Re: [SOLVED] No network connection after suspend

seth wrote:

check dmesg, your journal and the rfkill state (in case it's wifi - what brings us to the question of details on HW and how you configure your network)

Not sure what I am looking for in dmesg.  But, I am not using wifi, I am physically connected to a wifi router, which is physically connected to my modem.

[cavsfan@Le-Beast ~]$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.100  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::224:21ff:fe51:213a  prefixlen 64  scopeid 0x20<link>
        ether 00:24:21:51:21:3a  txqueuelen 1000  (Ethernet)
        RX packets 54604  bytes 71371631 (68.0 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 35919  bytes 6254778 (5.9 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 11869  bytes 707267 (690.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 11869  bytes 707267 (690.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Last edited by Cavsfan (2021-07-14 04:59:21)

Offline

#4 2018-02-21 18:53:27

seth
Member
Registered: 2012-09-03
Posts: 49,986

Re: [SOLVED] No network connection after suspend

So no wifi, but still: what is your exact HW (lspci/lsusb) and how do you configure your network?
Any message related to the interface or the used kernel module around the S3 might be relevant - esp. oc. those which say "error" ;-)

Offline

#5 2018-02-21 18:54:12

lula
Member
Registered: 2009-07-16
Posts: 71

Re: [SOLVED] No network connection after suspend

I'm having the same problem after suspending my laptop, no wired connection can be established, and it started as you wrote about two weaks ago, no problems until then. I noticed when this was happening that the link state of the interface is down and couldn't be activated again. I tried with ip (from package iproute2) ethtool, restarting NetworkManager, etc. neither solved the problem. The only way i get the interface back to work is to unload and load the driver module again.

[root@lifebook:~]# lspci -knn
...
03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)
        Subsystem: Fujitsu Limited. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10cf:1945]
        Kernel driver in use: r8169
        Kernel modules: r8169
...
[root@lifebook:~]#  modprobe -r r8169
[root@lifebook:~]# modprobe  r8169

HTH

Offline

#6 2018-02-21 19:49:09

Cavsfan
Member
From: USA
Registered: 2015-07-08
Posts: 101

Re: [SOLVED] No network connection after suspend

Seth, 9 year old Ethernet controller. It cannot handle the speed coming into my house it's so old.

I thought it could not be just me. Thanks lula for posting that.

lspci -knn
...
03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller [10ec:8136] (rev 01)
	Subsystem: Micro-Star International Co., Ltd. [MSI] RTL810xE PCI Express Fast Ethernet controller [1462:529c]
	Kernel driver in use: r8169
	Kernel modules: r8169

I'll give that a try next time it happens.

Offline

#7 2018-02-21 20:29:22

seth
Member
Registered: 2012-09-03
Posts: 49,986

Re: [SOLVED] No network connection after suspend

The internet has this all over the place for the module, see eg. https://ask.fedoraproject.org/en/questi … g-suspend/ (there'sa lso a link to kernel bugs)

Wild guess, @Cavsfan: do you use networkmanager as well?

Offline

#8 2018-02-21 21:43:13

Cavsfan
Member
From: USA
Registered: 2015-07-08
Posts: 101

Re: [SOLVED] No network connection after suspend

seth wrote:

The internet has this all over the place for the module, see eg. https://ask.fedoraproject.org/en/questi … g-suspend/ (there'sa lso a link to kernel bugs)

Wild guess, @Cavsfan: do you use networkmanager as well?

I searched for a while trying to find anyone else having this problem. Did not know r8169 was involved. Yes, I have networkmanager installed.

lula, I put it in suspend and woke it up after a short while, no network. I tried what you used and it worked - got my network back w/o a reboot.

Made an alias out of it to use until the problem is fixed.

Offline

#9 2018-02-21 21:47:59

seth
Member
Registered: 2012-09-03
Posts: 49,986

Re: [SOLVED] No network connection after suspend

You could use a /usr/lib/systemd/system-sleep/ hook.
Try w/o networkmanager. Stop and disable the service and connect w/ eg. dhcpcd.

Offline

#10 2018-02-21 22:58:41

Cavsfan
Member
From: USA
Registered: 2015-07-08
Posts: 101

Re: [SOLVED] No network connection after suspend

seth wrote:

You could use a /usr/lib/systemd/system-sleep/ hook.
Try w/o networkmanager. Stop and disable the service and connect w/ eg. dhcpcd.

I need networkmanager for my VPN.

Offline

#11 2018-02-21 23:03:14

seth
Member
Registered: 2012-09-03
Posts: 49,986

Re: [SOLVED] No network connection after suspend

Unlikely "need", but the idea was more to try whether NM is crucial. You could also try to stop NM before (and restart it after) the S3.

Offline

#12 2018-02-21 23:48:08

lula
Member
Registered: 2009-07-16
Posts: 71

Re: [SOLVED] No network connection after suspend

seth, nice idea, i'll try it next time, but according to all problems with the r8169 module you quoted (and i read about) i assume that NM isn't crusial, but who knows... funny thing is, it was introduced with an update just a few weeks ago, i had no problem with it before

Offline

#13 2018-02-22 19:04:18

Cavsfan
Member
From: USA
Registered: 2015-07-08
Posts: 101

Re: [SOLVED] No network connection after suspend

seth wrote:

Unlikely "need", but the idea was more to try whether NM is crucial. You could also try to stop NM before (and restart it after) the S3.

It is a required dependency of my VPN.

I added this alias and it worked perfectly.

#Fix Internet after Suspend
alias fix-internet="sudo modprobe -r r8169 && sleep 10 && sudo modprobe r8169"
lula wrote:

seth, nice idea, i'll try it next time, but according to all problems with the r8169 module you quoted (and i read about) i assume that NM isn't crusial, but who knows... funny thing is, it was introduced with an update just a few weeks ago, i had no problem with it before

Although NM was updated on 2018-02-14, which was approximately the time this started.

Offline

#14 2018-02-22 19:56:51

seth
Member
Registered: 2012-09-03
Posts: 49,986

Re: [SOLVED] No network connection after suspend

What VPN would that be?
Anyway, it'd be good to narrow the cause, so please just try w/o NM

Also: /usr/lib/systemd/system-sleep/fix_internet.sh

#!/bin/sh
case $1/$2 in
	pre/*)
	;;
	post/*)
	 modprobe -r r8169
         modprobe r8169
	;;
esac

Offline

#15 2018-02-22 20:55:13

Cavsfan
Member
From: USA
Registered: 2015-07-08
Posts: 101

Re: [SOLVED] No network connection after suspend

seth wrote:

What VPN would that be?
Anyway, it'd be good to narrow the cause, so please just try w/o NM

Also: /usr/lib/systemd/system-sleep/fix_internet.sh

#!/bin/sh
case $1/$2 in
	pre/*)
	;;
	post/*)
	 modprobe -r r8169
         modprobe r8169
	;;
esac

NetworkManager is indeed the culprit. I take that back about being a required dependency, it is an optional dependency.

I do like using the networkmanager applet in the top Xfce panel though. But, I can live without it until networkmanager is fixed.

Offline

#16 2018-02-22 21:38:30

seth
Member
Registered: 2012-09-03
Posts: 49,986

Re: [SOLVED] No network connection after suspend

man 5 networkmanager.conf
Try "carrier-wait-timeout" and "ignore-carrier" - just another wild shot.

Offline

#17 2018-02-22 23:08:57

Cavsfan
Member
From: USA
Registered: 2015-07-08
Posts: 101

Re: [SOLVED] No network connection after suspend

I had installed Gnome when I first installed Arch a few years ago and I see now that networkmanager is part of Gnome so I deleted it.
Because I didn't really need it. I use Xfce only and have tried to get rid of everything Gnome but, things popup sometimes.

But, while trying to clean up other things associated with networkmanager, I messed up internet access altogether.

So, I'll have to figure out what I did to get it back. Shouldn't be too difficult... I hope. smile

Thanks

Offline

#18 2018-02-23 19:43:30

Cavsfan
Member
From: USA
Registered: 2015-07-08
Posts: 101

Re: [SOLVED] No network connection after suspend

I got my internet access back and networkmanager 1.10.5dev+3+g5159c34ea-1 was indeed the cause of internet connection loss after suspend.

What I had to do was install networkmanager version (1.10.2-1), networkmanager-dispatcher-ntpd, network-manager-applet from /var/cache/pacman/pkg/ and reboot and it was back.
I've got networkmanager in the ignore section in /etc/pacman.conf so it won't be updated for now.

We know networkmanager is uneeded; but, that is the only 3 packages I removed when I lost internet access. When I re-installed them I had internet again.

So, that would leave networkmanager-dispatcher-ntpd as what I was missing. It is a required dependency of ntp. Maybe I'll delete the other 2 later and see how that goes.

Thanks for pachist and history in terminal. smile

Last edited by Cavsfan (2021-07-14 05:03:48)

Offline

#19 2018-02-23 20:19:03

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: [SOLVED] No network connection after suspend

If you remove networkmanager, then you have to configure your network in another way, e.g. manually or with systemd-networkd, dhcpcd, wpa_supplicant, netctl, wicd or connman, ...
https://wiki.archlinux.org/index.php/Ne … figuration
https://wiki.archlinux.org/index.php/Wi … figuration

As for ntp, that is used for time synchronization and has nothing to do with network connectivity:
https://wiki.archlinux.org/index.php/Ne … col_daemon
There are also a few alternative clients:
https://wiki.archlinux.org/index.php/Ca … e_Protocol


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#20 2018-02-23 20:30:03

Cavsfan
Member
From: USA
Registered: 2015-07-08
Posts: 101

Re: [SOLVED] No network connection after suspend

Well, this is still not resolved. At first I tried suspend with the older version of networkmanager but, i still lost internet connection.

I tried removing networkmanager by itself and got dependency errors about network-manager-applet and  networkmanager-dispatcher-ntpd.

When I remove all 3, I lose internet altogether. So, while I can see that you should not need networkmanager, I seem to need it.

I'll just keep using lula's fix for this in an alias until I see I don't need it any more.

Progandy, I just now seen your post. I think I'll just leave it as is and use the alias to stop and start the kernel module. That solves my problem.

Offline

#21 2018-02-23 21:05:31

seth
Member
Registered: 2012-09-03
Posts: 49,986

Re: [SOLVED] No network connection after suspend

An alias is a horrible workaround - https://bbs.archlinux.org/viewtopic.php … 2#p1769792 to do this automatically.

Offline

#22 2018-02-23 21:32:47

Cavsfan
Member
From: USA
Registered: 2015-07-08
Posts: 101

Re: [SOLVED] No network connection after suspend

seth wrote:

An alias is a horrible workaround - https://bbs.archlinux.org/viewtopic.php … 2#p1769792 to do this automatically.

I guess but, I thought it might eventually be fixed and then what about that patch?

Offline

#23 2018-02-23 21:36:20

seth
Member
Registered: 2012-09-03
Posts: 49,986

Re: [SOLVED] No network connection after suspend

Humm? What patch?
Comment #14 is just a hook for systemd-sleep to reload the module after the wakeup. If you don't need it anymore, you can just remove the patch.
Of course you'll not "automatically" notice that this is no longer required (because NM is fixed or whatever), but it's faar more convenient.

Offline

#24 2018-02-23 21:57:59

Cavsfan
Member
From: USA
Registered: 2015-07-08
Posts: 101

Re: [SOLVED] No network connection after suspend

Thanks Seth, I added it and it worked immediately.

I thought you were the one that referred to it as a "patch".

Offline

#25 2018-02-23 23:43:28

lula
Member
Registered: 2009-07-16
Posts: 71

Re: [SOLVED] No network connection after suspend

I'm still not convinced about NM not being the problem, because the first time i did what seth proposed (stopping NM before suspend) my wired connection worked instantly after wakeup and starting NM again, but it sometimes did even w/o stopping/starting NM before/after suspend. I'll think, i'll just keep on observing the problem w/o a systemd hook or other workarounds and stay with (un)/loading the module and report back, if there's any change

Last edited by lula (2018-02-24 00:18:22)

Offline

Board footer

Powered by FluxBB