Network not working after suspend

Questions about cabled networking
Forum rules
Before you post please read how to get help
Post Reply
m-s-a
Level 1
Level 1
Posts: 29
Joined: Wed Aug 05, 2015 2:16 pm

Network not working after suspend

Post by m-s-a » Tue Mar 28, 2017 1:16 pm

Hello,

I am using an ethernet USB adapter under LinuxMint 18 (Sarah). I have all Mint updates installed, including up to level 5, except for the very latest kernel.
Kernel is 4.4.0-66-generic

Since about 1 or 2 weeks, when I suspend and resume the system, network does no longer work. Browsers report unknown servers and ping says "unknown host".
Restart NetworkManager fixes the problem.

I have not had this problem before. I used to use WiFi, but switched to wired ethernet about 2 months ago after I having problems with WiFi (refer to viewtopic.php?f=53&t=236813&start=20).
Ethernet worked fine until this started 1 or 2 weeks ago

The old WiFi symptoms are similar, except that for the WiFi connection, it just happened at random times in the middle of regular operation, while with the ethernet, it is definitely triggered by resume after suspend.

Also, I did install network-manager-openvpn and network-manager-openvpn-gnome 2 weeks ago; so it is possible that this might have something to do with this....

Any idea what I could do to fix this?

Thank you!

tmarco
Level 1
Level 1
Posts: 4
Joined: Tue Mar 28, 2017 4:07 pm

Re: Network not working after suspend

Post by tmarco » Tue Mar 28, 2017 4:13 pm

I have been having the same issue. It appears that the system is losing its DNS address. I have the IP and DNS hardcoded so not relying on DHCP. When this happens I can reach local resources via their IP address but names are not resolving. It seems to be happening overnight and I have to reboot to get it working again. This system had been working fine until last week when I installed updates.

m-s-a
Level 1
Level 1
Posts: 29
Joined: Wed Aug 05, 2015 2:16 pm

Re: Network not working after suspend

Post by m-s-a » Tue Mar 28, 2017 6:45 pm

tmarco wrote:I have been having the same issue. It appears that the system is losing its DNS address. I have the IP and DNS hardcoded so not relying on DHCP. When this happens I can reach local resources via their IP address but names are not resolving. It seems to be happening overnight and I have to reboot to get it working again. This system had been working fine until last week when I installed updates.
Yeah, the timeframe fits.

For me, I am not sure if it is simply DNS, or if networking as a whole is affected. I guess I could try to ping an IP next time....

Running "sudo systemctl restart NetworkManager" should fix this without having to reboot...

m-s-a
Level 1
Level 1
Posts: 29
Joined: Wed Aug 05, 2015 2:16 pm

Re: Network not working after suspend

Post by m-s-a » Wed Mar 29, 2017 2:15 am

tmarco wrote:I have been having the same issue. It appears that the system is losing its DNS address. I have the IP and DNS hardcoded so not relying on DHCP. When this happens I can reach local resources via their IP address but names are not resolving. It seems to be happening overnight and I have to reboot to get it working again. This system had been working fine until last week when I installed updates.
So I did some tests on my machine after waking up from suspend. Pinging an IP works fine. Then I tried nslookup:

Code: Select all

$ nslookup www.google.com
Server:		127.0.1.1
Address:	127.0.1.1#53

** server can't find www.google.com: REFUSED


$ nslookup www.google.com 8.8.8.8
Server:		8.8.8.8
Address:	8.8.8.8#53

Non-authoritative answer:
Name:	www.google.com
Address: 172.217.5.68


$ nslookup www.google.com 192.168.99.1
Server:		192.168.99.1
Address:	192.168.99.1#53

Non-authoritative answer:
Name:	www.google.com
Address: 74.125.21.99
Name:	www.google.com
Address: 74.125.21.103
Name:	www.google.com
Address: 74.125.21.147
Name:	www.google.com
Address: 74.125.21.104
Name:	www.google.com
Address: 74.125.21.106
Name:	www.google.com
Address: 74.125.21.105

$ sudo systemctl restart NetworkManager

$ nslookup www.google.com
Server:		127.0.1.1
Address:	127.0.1.1#53

Non-authoritative answer:
Name:	www.google.com
Address: 74.125.21.105
Name:	www.google.com
Address: 74.125.21.106
Name:	www.google.com
Address: 74.125.21.104
Name:	www.google.com
Address: 74.125.21.147
Name:	www.google.com
Address: 74.125.21.103
Name:	www.google.com
Address: 74.125.21.99

So nslookup against a specific name server IP works fine, but without explicitly specifying the name server IP it fails. After NetworkManager restart, nslookup without the name server IP does work.

In both cases (before and after NetworkManager restart), it tries to go against 127.0.0.1, but before the restart, it comes back with "** server can't find www.google.com: REFUSED".

tmarco
Level 1
Level 1
Posts: 4
Joined: Tue Mar 28, 2017 4:07 pm

Re: Network not working after suspend

Post by tmarco » Thu Mar 30, 2017 9:39 am

Sound like this same issue I am having every morning. I can't believe we are the only two with the problem.

tmarco
Level 1
Level 1
Posts: 4
Joined: Tue Mar 28, 2017 4:07 pm

Re: Network not working after suspend

Post by tmarco » Thu Mar 30, 2017 10:30 am

More info. I have my machine set to never suspend.

m-s-a
Level 1
Level 1
Posts: 29
Joined: Wed Aug 05, 2015 2:16 pm

Re: Network not working after suspend

Post by m-s-a » Thu Mar 30, 2017 4:42 pm

tmarco wrote:I have my machine set to never suspend.
So it is not happening on suspend for you? What triggers it? Just long period of inactivity?

Did you do a kernel update before this started? What kernel version are you using? Do you have network-manager-openvpn and/or network-manager-openvpn-gnome installed?

Also, I am connected to a Asus RT-N53. What router are you using?

I noticed that there are some messages in syslog:
Mar 29 16:20:41 XPS15-msata NetworkManager[20412]: <info> [1490829641.2193] device (enx8cae4cf44445): state change: activated -> unmanaged (reason 'removed') [100 10 36]
Mar 29 16:20:41 XPS15-msata avahi-daemon[1241]: Interface enx8cae4cf44445.IPv6 no longer relevant for mDNS.
Mar 29 16:20:41 XPS15-msata avahi-daemon[1241]: Leaving mDNS multicast group on interface enx8cae4cf44445.IPv6 with address fe80::8eae:4cff:fef4:4445.
Mar 29 16:20:41 XPS15-msata avahi-daemon[1241]: Interface enx8cae4cf44445.IPv4 no longer relevant for mDNS.
Mar 29 16:20:41 XPS15-msata avahi-daemon[1241]: Leaving mDNS multicast group on interface enx8cae4cf44445.IPv4 with address 192.168.1.121.
Mar 29 16:20:41 XPS15-msata avahi-daemon[1241]: Withdrawing address record for fe80::8eae:4cff:fef4:4445 on enx8cae4cf44445.
Mar 29 16:20:41 XPS15-msata avahi-daemon[1241]: Withdrawing address record for 192.168.1.121 on enx8cae4cf44445.

I am not sure if those are related to the root cause or just more symptoms, though....
So for now I just keep the shell window open with the NetworkManager restart command, rather than spending more time on finding it.

tmarco
Level 1
Level 1
Posts: 4
Joined: Tue Mar 28, 2017 4:07 pm

Re: Network not working after suspend

Post by tmarco » Thu Mar 30, 2017 5:31 pm

I have no idea what is triggering the problem. I leave the machine in the evening and in the morning it is broken. I did do a kernel update prior to this happening, it was either 4.4.0-63, 4.4,0-64 or 4.4.0-66 that caused it. I have been installing new kernals as they are released to see if it gets fixed. Installed 4.40-71 this morning so will see what happens tonight. I will check the syslog in the morning for DNS enteries. No vpn packages installed.

m-s-a
Level 1
Level 1
Posts: 29
Joined: Wed Aug 05, 2015 2:16 pm

Re: Network not working after suspend

Post by m-s-a » Thu Apr 06, 2017 4:15 pm

Seems like updating kernel from 4.4.0-66 to 4.4.0-72 last night fixed this problem...

Two suspends so far and both woke up without network issues.
Before, every single suspend had the problem...

bruno5438
Level 1
Level 1
Posts: 10
Joined: Wed Jul 20, 2016 3:46 pm
Location: France

Re: Network not working after suspend

Post by bruno5438 » Mon Apr 10, 2017 4:25 pm

Bonsoir,
The same problem, USB <--> Realtek (Driver=r8152) no DNS resolution.
Only "sudo systemctl restart network-manager.service" work. Without problem before this last few weeks.

kernel 4.8.0-46-generic
++Bruno
--
Linux-User #365449 with the Linux Counter, http://counter.li.org/
--

bruno5438
Level 1
Level 1
Posts: 10
Joined: Wed Jul 20, 2016 3:46 pm
Location: France

Re: Network not working after suspend

Post by bruno5438 » Fri Apr 14, 2017 2:37 am

Hi,

This is this bug with dnsmasq :
https://www.ubuntuupdates.org/bugs?package_name=dnsmasq

It's seem corrected with the upgrade yesterday night of the dnsmasq package !

$ dpkg -l dnsmasq
ii dnsmasq 2.75-1ubuntu0.16.04.2 all Small caching DNS proxy and DHCP/TFTP server

You confirm ?

++Bruno
--
Linux-User #365449 with the Linux Counter, http://counter.li.org/
--

m-s-a
Level 1
Level 1
Posts: 29
Joined: Wed Aug 05, 2015 2:16 pm

Re: Network not working after suspend

Post by m-s-a » Mon May 15, 2017 2:12 am

After I initially thought this problem was permanently solved, it has come back a few times; but it is pretty rare.

I also noticed that when it does happen, the menu that belongs to the NetworkManager applet looks different. E.g. it has lost the normal profile options that I have circled in redi n the attached screenshot - they would be gone then, leaving only a bunch of "Ethernet unmanaged" entries. Not sure what those are. Probably some virtual docker network adapters...

Post Reply

Return to “Ethernet”