You are not logged in.

#1 2019-01-20 15:08:34

axel
Member
Registered: 2007-12-10
Posts: 77

Network doesn't work after suspend

When my system wakes up after being suspended I cannot access the internet. The only way to fix it is by stopping and starting again the network service. I am not using network manager nor dhcp. I have a static ip address set. The module of my ethernet adapter is e1000e.

The problem has appeared in the last two to three weeks. The system is fully up to date. kernel 4.20.3-arch1-1 and kde applications 18.12.1 and plasma 5.14.

Any idea on how to debug or fix this?

Offline

#2 2019-01-27 16:08:29

Starclimber
Member
From: Mars
Registered: 2018-12-23
Posts: 13

Re: Network doesn't work after suspend

What network manager are you using?

Can your computer communicate with other machines in your LAN?

Can you ping to machines outside of your LAN? (e.g. 8.8.8.8 for Google DNS servers)

Offline

#3 2019-02-09 19:31:02

axel
Member
Registered: 2007-12-10
Posts: 77

Re: Network doesn't work after suspend

I am not using any network manager. I have a systemd network service which sets a static ip to my pc. My pc cannot ping my router or any external machine.

$ cat /etc/systemd/system/network.service
[Unit]
Description=Network Connectivity
Wants=network.target
Before=network.target

[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/etc/conf.d/network
ExecStart=/sbin/ip link set dev ${interface} up
ExecStart=/sbin/ip addr add ${address}/${netmask} broadcast ${broadcast} dev ${interface}
ExecStart=/sbin/ip route add default via ${gateway}
ExecStop=/sbin/ip addr flush dev ${interface}
ExecStop=/sbin/ip link set dev ${interface} down

[Install]
WantedBy=multi-user.target
$ cat /etc/conf.d/network
interface=eth0
address=192.168.1.2
netmask=255.255.255.0
broadcast=192.168.1.255
gateway=192.168.1.1

Offline

#4 2019-02-09 20:10:34

seth
Member
Registered: 2012-09-03
Posts: 51,191

Re: Network doesn't work after suspend

ip l; ip r

before and after the S3?
Do you get away w/ just flushing and re-adding (ie. w/o bringing the interface down and up)?

e1000e has a "SmartPowerDownEnable" parameter (0/1, default seems 0) which might be worth a shot (try loading the module w/ each value explicitly set and see whether it makes a difference)

Does it matter how long the S3 lasts (seconds ./. hours)?

ceterum censeo: https://wiki.archlinux.org/index.php/Du … t_Start-Up (though I don't suspect it to be the issue here, since the connection can be re-established)

Online

#5 2019-02-10 20:56:13

axel
Member
Registered: 2007-12-10
Posts: 77

Re: Network doesn't work after suspend

seth wrote:
ip l; ip r

before and after the S3?
Do you get away w/ just flushing and re-adding (ie. w/o bringing the interface down and up)?

e1000e has a "SmartPowerDownEnable" parameter (0/1, default seems 0) which might be worth a shot (try loading the module w/ each value explicitly set and see whether it makes a difference)

Does it matter how long the S3 lasts (seconds ./. hours)?

ceterum censeo: https://wiki.archlinux.org/index.php/Du … t_Start-Up (though I don't suspect it to be the issue here, since the connection can be re-established)

ip l; ip r is the same before and after S3.

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
4: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
default via 192.168.1.1 dev eth0 
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.2

I have to stop and start the sevice. Nothing else worked. Tried also the SmartPowerDownEnable parameter, didn't work either. I also don't have a dual boot system.

A couple of times the system got back from suspend and the network was working. It had been sleeping for hours.

This setup has been working for years now, since migrating from rc.conf, without any problem.

I checked the Arch wiki and didn't find something about /etc/conf.d/network. Maybe my service is obsolete now and I have to change its configuration?

Offline

#6 2019-02-10 21:01:06

seth
Member
Registered: 2012-09-03
Posts: 51,191

Re: Network doesn't work after suspend

I have to stop and start the sevice. Nothing else worked.

For clarification: just performing the ExecStop and ExecStart commands by hand does *not* work?

Do you have access to the router logs?

Online

#7 2019-02-10 21:14:30

axel
Member
Registered: 2007-12-10
Posts: 77

Re: Network doesn't work after suspend

seth wrote:

I have to stop and start the sevice. Nothing else worked.

For clarification: just performing the ExecStop and ExecStart commands by hand does *not* work?

Do you have access to the router logs?

Sorry, performing manually ExecStop and ExecStart (by replacing the variables with their values) does work.

I have access to the router logs, but after resume I can't even ping the router.

Offline

#8 2019-02-10 21:23:14

seth
Member
Registered: 2012-09-03
Posts: 51,191

Re: Network doesn't work after suspend

The idea is to check whether the router records any incident during the S3 (or rejects after the S3) as lead for further investigation.
To mitigate the issue, you could add sleep hooks, https://wiki.archlinux.org/index.php/Po … leep_hooks

Online

Board footer

Powered by FluxBB