You are not logged in.

#1 2019-11-08 12:49:14

zxip
Member
Registered: 2019-11-08
Posts: 6

[SOLVED] No Internet after resume from sleep, maybe dhcpcd issue

Hi,

I have recently been having an issue where my internet stops working after resuming from sleep. It had been working for a few months and I changed nothing in relation to my network setup.

I am using the interface specific services for dhcpcd and wpa_supplicant.
I tried using the general dhcpcd and wpa_supplicant services as well as the restart and no-wait units files for  the interface specific dhcpcd@ service from the arch wiki:

/etc/systemd/system/dhcpcd@.service.d/dhcpcdrestart.conf

[Service]
Restart=always

and

/etc/systemd/system/dhcpcd@.service.d/no-wait.conf

[Service]
ExecStart=
ExecStart=/usr/bin/dhcpcd -b -q %I

After resuming from sleep, wpa_supplicant seems to start fine, but dhcpcd reports 'carrier lost' and stops doing anything.
In this state I can only stop dhcpcd using SIGKILL.

This is the journalctl log after resume at 08:43:38 and when restarting the service using systemctl at 08:49:29:

Nov 08 08:43:38 laptop dhcpcd[169468]: wlp2s0: fe80::1 is unreachable
Nov 08 08:43:38 laptop dhcpcd[169468]: wlp2s0: carrier lost
Nov 08 08:43:39 laptop dhcpcd[169468]: wlp2s0: deleting address XXXX:XXXX:XXXX:X:XXXX:XXXX:XXXX:XXXX/XX
Nov 08 08:43:39 laptop dhcpcd[169468]: wlp2s0: deleting route to XXXX:XXXX:XXXX:X::/XX via fe80::1
Nov 08 08:43:39 laptop dhcpcd[169468]: wlp2s0: deleting default route via fe80::1
Nov 08 08:49:29 laptop systemd[1]: Stopping dhcpcd on wlp2s0...
Nov 08 08:49:29 laptop dhcpcd[301351]: sending signal TERM to pid 169468
Nov 08 08:49:29 laptop dhcpcd[301351]: waiting for pid 169468 to exit
Nov 08 08:49:29 laptop dhcpcd[301351]: sending signal TERM to pid 169468
Nov 08 08:49:29 laptop dhcpcd[301351]: waiting for pid 169468 to exit
Nov 08 08:49:39 laptop dhcpcd[301351]: pid 169468 failed to exit
Nov 08 08:49:39 laptop systemd[1]: dhcpcd@wlp2s0.service: Control process exited, code=exited, status=1/FAILURE
Nov 08 08:49:39 laptop dhcpcd[301351]: pid 169468 failed to exit
Nov 08 08:51:09 laptop systemd[1]: dhcpcd@wlp2s0.service: State 'stop-sigterm' timed out. Killing.
Nov 08 08:51:09 laptop systemd[1]: dhcpcd@wlp2s0.service: Killing process 169468 (dhcpcd) with signal SIGKILL.
Nov 08 08:51:09 laptop systemd[1]: dhcpcd@wlp2s0.service: Main process exited, code=killed, status=9/KILL
Nov 08 08:51:09 laptop systemd[1]: dhcpcd@wlp2s0.service: Failed with result 'exit-code'.
Nov 08 08:51:09 laptop systemd[1]: Stopped dhcpcd on wlp2s0.
Nov 08 08:51:09 laptop systemd[1]: Starting dhcpcd on wlp2s0...
Nov 08 08:51:09 laptop dhcpcd[304135]: forked to background, child pid 304136
Nov 08 08:51:09 laptop systemd[1]: Started dhcpcd on wlp2s0.
Nov 08 08:51:09 laptop dhcpcd[304136]: DUID XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX
Nov 08 08:51:09 laptop dhcpcd[304136]: wlp2s0: IAID XX:XX:XX:XX
Nov 08 08:51:09 laptop dhcpcd[304136]: wlp2s0: adding address XXXX::XXXX:XXXX:XXXX:XXXX
Nov 08 08:51:09 laptop dhcpcd[304136]: wlp2s0: soliciting an IPv6 router
Nov 08 08:51:09 laptop dhcpcd[304136]: wlp2s0: soliciting a DHCP lease
Nov 08 08:51:10 laptop dhcpcd[304136]: wlp2s0: offered XXX.XX.XXX.XX from XXX.XXX.XX.XX
Nov 08 08:51:10 laptop dhcpcd[304136]: wlp2s0: probing address XXX.XX.XXX.XX/XX
Nov 08 08:51:11 laptop dhcpcd[304136]: wlp2s0: Router Advertisement from fe80::1
Nov 08 08:51:11 laptop dhcpcd[304136]: wlp2s0: adding address XXXX:XXXX:XXXX:X:XXXX:XXXX:XXXX:XXXX/XX
Nov 08 08:51:11 laptop dhcpcd[304136]: wlp2s0: adding route to XXXX:XXXX:XXXX:X::/XX via fe80::1
Nov 08 08:51:11 laptop dhcpcd[304136]: wlp2s0: requesting DHCPv6 information
Nov 08 08:51:11 laptop dhcpcd[304136]: wlp2s0: adding default route via fe80::1
Nov 08 08:51:11 laptop dhcpcd[304136]: wlp2s0: Router Advertisement from fe80::1
Nov 08 08:51:15 laptop dhcpcd[304136]: wlp2s0: leased XXX.XX.XXX.XX for 600 seconds
Nov 08 08:51:15 laptop dhcpcd[304136]: wlp2s0: adding route to XXX.XX.XXX.X/XX
Nov 08 08:51:15 laptop dhcpcd[304136]: wlp2s0: adding default route via XXX.XX.XXX.X
Nov 08 08:51:17 laptop dhcpcd[304136]: wlp2s0: Router Advertisement from fe80::1
Nov 08 08:51:21 laptop dhcpcd[304136]: wlp2s0: Router Advertisement from fe80::1

After restarting dhcpcd my internet sometimes kinda works. I can for example ping archlinux.org but the first ping takes about 10 seconds. I can also connect to archlinux.org in my browser but not to other URLs. After restarting wpa_supplicant and dhcpcd again it is usually fully working again.
Does anyone know what is going on?

The wpa_supplicant log after resume:

Nov 08 08:43:38 laptop wpa_supplicant[168154]: wlp2s0: CTRL-EVENT-DISCONNECTED bssid=XX:XX:XX:XX:XX:XX reason=3 locally_generated=1
Nov 08 08:43:38 laptop wpa_supplicant[168154]: wlp2s0: PMKSA-CACHE-REMOVED XX:XX:XX:XX:XX:XX 0
Nov 08 08:43:38 laptop wpa_supplicant[168154]: wlp2s0: PMKSA-CACHE-REMOVED XX:XX:XX:XX:XX:XX 0
Nov 08 08:43:38 laptop wpa_supplicant[168154]: wlp2s0: CTRL-EVENT-REGDOM-CHANGE init=DRIVER type=WORLD
Nov 08 08:43:42 laptop wpa_supplicant[168154]: wlp2s0: CTRL-EVENT-REGDOM-CHANGE init=DRIVER type=COUNTRY alpha2=DE
Nov 08 08:43:42 laptop wpa_supplicant[168154]: wlp2s0: SME: Trying to authenticate with XX:XX:XX:XX:XX:XX (SSID='eduroam' freq=5240 MHz)
Nov 08 08:43:42 laptop wpa_supplicant[168154]: wlp2s0: Trying to associate with XX:XX:XX:XX:XX:XX (SSID='eduroam' freq=5240 MHz)
Nov 08 08:43:42 laptop wpa_supplicant[168154]: wlp2s0: Associated with XX:XX:XX:XX:XX:XX
Nov 08 08:43:42 laptop wpa_supplicant[168154]: wlp2s0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Nov 08 08:43:42 laptop wpa_supplicant[168154]: wlp2s0: CTRL-EVENT-EAP-STARTED EAP authentication started
Nov 08 08:43:42 laptop wpa_supplicant[168154]: wlp2s0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=21 -> NAK
Nov 08 08:43:42 laptop wpa_supplicant[168154]: wlp2s0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=25
Nov 08 08:43:42 laptop wpa_supplicant[168154]: wlp2s0: CTRL-EVENT-EAP-METHOD EAP vendor 0 method 25 (PEAP) selected
Nov 08 08:43:42 laptop wpa_supplicant[168154]: wlp2s0: CTRL-EVENT-EAP-PEER-CERT depth=3 subject='/C=DE/O=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Nov 08 08:43:42 laptop wpa_supplicant[168154]: wlp2s0: CTRL-EVENT-EAP-PEER-CERT depth=2 subject='/C=DE/O=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Nov 08 08:43:42 laptop wpa_supplicant[168154]: wlp2s0: CTRL-EVENT-EAP-PEER-CERT depth=1 subject='/C=DE/O=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Nov 08 08:43:42 laptop wpa_supplicant[168154]: wlp2s0: CTRL-EVENT-EAP-PEER-CERT depth=0 subject='/C=DE/ST=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Nov 08 08:43:42 laptop wpa_supplicant[168154]: wlp2s0: CTRL-EVENT-EAP-PEER-ALT depth=0 DNS:radius.xxxxxxxxxxxxxxxxx
Nov 08 08:43:42 laptop wpa_supplicant[168154]: wlp2s0: CTRL-EVENT-EAP-PEER-ALT depth=0 DNS:radius1.xxxxxxxxxxxxxxxxx
Nov 08 08:43:42 laptop wpa_supplicant[168154]: wlp2s0: CTRL-EVENT-EAP-PEER-ALT depth=0 DNS:radius2.xxxxxxxxxxxxxxxxx
Nov 08 08:43:42 laptop wpa_supplicant[168154]: wlp2s0: CTRL-EVENT-EAP-PEER-ALT depth=0 DNS:radius3.xxxxxxxxxxxxxxxxx
Nov 08 08:43:42 laptop wpa_supplicant[168154]: EAP-MSCHAPV2: Authentication succeeded
Nov 08 08:43:42 laptop wpa_supplicant[168154]: EAP-TLV: TLV Result - Success - EAP-TLV/Phase2 Completed
Nov 08 08:43:42 laptop wpa_supplicant[168154]: wlp2s0: CTRL-EVENT-EAP-SUCCESS EAP authentication completed successfully
Nov 08 08:43:42 laptop wpa_supplicant[168154]: wlp2s0: PMKSA-CACHE-ADDED XX:XX:XX:XX:XX:XX 0
Nov 08 08:43:42 laptop wpa_supplicant[168154]: wlp2s0: WPA: Key negotiation completed with XX:XX:XX:XX:XX:XX [PTK=CCMP GTK=CCMP]
Nov 08 08:43:42 laptop wpa_supplicant[168154]: wlp2s0: CTRL-EVENT-CONNECTED - Connection to XX:XX:XX:XX:XX:XX completed [id=0 id_str=]

Last edited by zxip (2019-11-11 09:26:22)

Offline

#2 2019-11-08 14:51:37

seth
Member
Registered: 2012-09-03
Posts: 12,905

Re: [SOLVED] No Internet after resume from sleep, maybe dhcpcd issue

After restarting wpa_supplicant and dhcpcd again

Output of

systemctl list-unit-files --state=enabled

?

Offline

#3 2019-11-09 08:52:39

zxip
Member
Registered: 2019-11-08
Posts: 6

Re: [SOLVED] No Internet after resume from sleep, maybe dhcpcd issue

UNIT FILE                           STATE  
var-lib-snapd-snap-core-7917.mount  enabled
var-lib-snapd-snap-core-8039.mount  enabled
var-lib-snapd-snap-spotify-36.mount enabled
apparmor.service                    enabled
autovt@.service                     enabled
bluetooth.service                   enabled
dbus-org.bluez.service              enabled
getty@.service                      enabled
openvpn-reconnect.service           enabled
snapd.apparmor.service              enabled
snapd.service                       enabled
tor.service                         enabled
ufw.service                         enabled
remote-fs.target                    enabled

14 unit files listed.

Offline

#4 2019-11-09 09:07:32

seth
Member
Registered: 2012-09-03
Posts: 12,905

Re: [SOLVED] No Internet after resume from sleep, maybe dhcpcd issue

There's no service controlling the NICs. How do you "start wpa_supplicant and dhcpcd" to begin with?

Offline

#5 2019-11-09 09:27:42

zxip
Member
Registered: 2019-11-08
Posts: 6

Re: [SOLVED] No Internet after resume from sleep, maybe dhcpcd issue

They were enabled using systemctl e.g.:

systemctl enable dhcpcd@wlp2s0

Starting and restarting is also done using systemctl.

I have disabled and enabled the general and interface specific versions when experimenting with getting it working again but at least one version is always enabled.
I don't know why they don't show up as enabled.

This is the output directly after enabling the dhcpcd service:

# systemctl enable dhcpcd@wlp2s0
# systemctl status dhcpcd@wlp2s0
● dhcpcd@wlp2s0.service - dhcpcd on wlp2s0
   Loaded: loaded (/usr/lib/systemd/system/dhcpcd@.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/dhcpcd@.service.d
           └─dhcpcdrestart.conf, no-wait.conf
   Active: active (running) since Sat 2019-11-09 09:55:00 CET; 26min ago
 Main PID: 909270 (dhcpcd)
    Tasks: 3 (limit: 9422)
   Memory: 3.6M
   CGroup: /system.slice/system-dhcpcd.slice/dhcpcd@wlp2s0.service
           ├─909270 dhcpcd: wlp2s0 [ip4] [ip6]
           ├─975545 /bin/sh /usr/lib/dhcpcd/dhcpcd-run-hooks
           ├─975547 /bin/sh /usr/bin/resolvconf -a wlp2s0.ra
           └─975558 rm -f /run/resolvconf/metrics/0000302 wlp2s0.ra

Nov 09 10:18:16 laptop dhcpcd[909270]: wlp2s0: Router Advertisement from fe80::1
Nov 09 10:18:19 laptop dhcpcd[909270]: wlp2s0: Router Advertisement from fe80::1
Nov 09 10:18:50 laptop dhcpcd[909270]: wlp2s0: Router Advertisement from fe80::1
Nov 09 10:20:44 laptop dhcpcd[909270]: wlp2s0: Router Advertisement from fe80::1
Nov 09 10:21:15 laptop dhcpcd[909270]: wlp2s0: Router Advertisement from fe80::1
Nov 09 10:21:25 laptop dhcpcd[909270]: wlp2s0: Router Advertisement from fe80::1
Nov 09 10:21:30 laptop dhcpcd[909270]: wlp2s0: Router Advertisement from fe80::1
Nov 09 10:21:47 laptop dhcpcd[909270]: wlp2s0: Router Advertisement from fe80::1
Nov 09 10:21:51 laptop dhcpcd[909270]: wlp2s0: Router Advertisement from fe80::1
Nov 09 10:21:58 laptop dhcpcd[909270]: wlp2s0: Router Advertisement from fe80::1

# systemctl list-unit-files --state=enabled
UNIT FILE                           STATE  
var-lib-snapd-snap-core-7917.mount  enabled
var-lib-snapd-snap-core-8039.mount  enabled
var-lib-snapd-snap-spotify-36.mount enabled
apparmor.service                    enabled
autovt@.service                     enabled
bluetooth.service                   enabled
dbus-org.bluez.service              enabled
getty@.service                      enabled
openvpn-reconnect.service           enabled
snapd.apparmor.service              enabled
snapd.service                       enabled
tor.service                         enabled
remote-fs.target                    enabled

13 unit files listed.

Edit: I have also disabled ufw because I thought it might have something do with the issue. There is really no reason for it to be running. Although I had enabled ufw long before the internet problems started, so that should probably be unrelated.

Last edited by zxip (2019-11-09 09:30:48)

Offline

#6 2019-11-09 09:38:58

seth
Member
Registered: 2012-09-03
Posts: 12,905

Re: [SOLVED] No Internet after resume from sleep, maybe dhcpcd issue

This is weird, but to be sure: you do not explicitly run wpa_supplicant but use a dhcpcd hook?

Nov 08 08:43:38 laptop dhcpcd[169468]: wlp2s0: carrier lost

The carrier here is wpa_supplicant and dhcpcd should™ be able to regain that automagically.

Offline

#7 2019-11-09 09:51:48

zxip
Member
Registered: 2019-11-08
Posts: 6

Re: [SOLVED] No Internet after resume from sleep, maybe dhcpcd issue

I do not use the a dhcpcd hook. wpa_supplicant@wlp2s0 is also enabled using systemd.

Maybe it has something to do with the fact that pkill dhcpcd just fails after 'carrier lost' unless using SIGKILL.
Can dhcpcd just crash or something like that?

And in systemctl list-unit-files wpa_supplicant and dhcpcd are labeled as 'indirect'

# systemctl list-unit-files | grep -e 'dhcpcd' -e 'wpa_supplicant'
dhcpcd.service                             disabled
dhcpcd@.service                            indirect
wpa_supplicant-nl80211@.service            disabled
wpa_supplicant-wired@.service              disabled
wpa_supplicant.service                     disabled
wpa_supplicant@.service                    indirect

Edit: Something I forgot to mention. It only fails after a while. If it is working and I restart wpa_supplicant, then dchpcd recovers and everything is fine. But if my laptop is in sleep for maybe like 20 min. it fails at resume. Maybe if fails after the dchp lease expires?

Last edited by zxip (2019-11-09 09:56:57)

Offline

#8 2019-11-09 09:55:28

seth
Member
Registered: 2012-09-03
Posts: 12,905

Re: [SOLVED] No Internet after resume from sleep, maybe dhcpcd issue

Offline

#9 2019-11-09 10:31:25

zxip
Member
Registered: 2019-11-08
Posts: 6

Re: [SOLVED] No Internet after resume from sleep, maybe dhcpcd issue

Still not working it seems. What I did exactly:

# ln -s /usr/share/dhcpcd/hooks/10-wpa_supplicant /usr/lib/dhcpcd/dhcpcd-hooks/
# systemctl disable wpa_supplicant@wlp2s0
# systemctl stop wpa_supplicant@wlp2s0
# systemctl restart dhcpcd@wlp2s0
CTRL+C // It was taking a really long time probably failing to stop using SIGTERM
# pkill -KILL dhcpcd // After this systemd auto restarts dchpcd because of Restart=Always
// The log below starts here

Result: I have a working internet connection.

Then I did a little experiment:

  1. Put laptop to sleep and resume before lease expires (11:04:18 in log)

  2. Put latop to sleep such that it sleeps while the lease expires (11:10:11 in log)

In case 1 my internet was working again fine after resume.
In case 2 it was not. Same issue. Fixed after running:

pkill -KILL dhcpcd

Log since the inital pkill -KILL dhcpcd

Nov 09 11:00:08 laptop systemd[1]: Starting dhcpcd on wlp2s0...
Nov 09 11:00:08 laptop dhcpcd[1063539]: forked to background, child pid 1063540
Nov 09 11:00:08 laptop systemd[1]: Started dhcpcd on wlp2s0.
Nov 09 11:00:08 laptop dhcpcd[1063540]: wlp2s0: waiting for carrier
Nov 09 11:00:12 laptop dhcpcd[1063540]: wlp2s0: carrier acquired
Nov 09 11:00:12 laptop dhcpcd[1063540]: DUID XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX
Nov 09 11:00:12 laptop dhcpcd[1063540]: wlp2s0: IAID XX:XX:XX:XX
Nov 09 11:00:12 laptop dhcpcd[1063540]: wlp2s0: adding address XXXX::XXXX:XXXX:XXXX:XXXX
Nov 09 11:00:12 laptop dhcpcd[1063540]: wlp2s0: rebinding lease of XXX.XX.XXX.XXX
Nov 09 11:00:12 laptop dhcpcd[1063540]: wlp2s0: leased XXX.XX.XXX.XXX for 300 seconds
Nov 09 11:00:12 laptop dhcpcd[1063540]: wlp2s0: adding route to XXX.XX.XXX.X/XX
Nov 09 11:00:12 laptop dhcpcd[1063540]: wlp2s0: adding default route via XXX.XX.XXX.X
Nov 09 11:00:12 laptop dhcpcd[1063540]: wlp2s0: soliciting an IPv6 router
Nov 09 11:00:14 laptop dhcpcd[1063540]: wlp2s0: Router Advertisement from fe80::1
Nov 09 11:00:14 laptop dhcpcd[1063540]: wlp2s0: adding address XXXX:XXXX:XXXX:X:XXXX:XXXX:XXXX:XXXX/XX
Nov 09 11:00:14 laptop dhcpcd[1063540]: wlp2s0: adding route to XXXX:XXXX:XXXX:X::/XX XXX XXXX::X
Nov 09 11:00:14 laptop dhcpcd[1063540]: wlp2s0: requesting DHCPv6 information
Nov 09 11:00:14 laptop dhcpcd[1063540]: wlp2s0: adding default route via fe80::1
Nov 09 11:04:18 laptop dhcpcd[1063540]: wlp2s0: fe80::1 is unreachable
Nov 09 11:04:18 laptop dhcpcd[1063540]: wlp2s0: carrier lost
Nov 09 11:04:19 laptop dhcpcd[1063540]: wlp2s0: deleting address XXXX:XXXX:XXXX:X:XXXX:XXXX:XXXX:XXXX/XX
Nov 09 11:04:19 laptop dhcpcd[1063540]: wlp2s0: deleting route to XXXX:XXXX:XXXX:X::/XX via fe80::1
Nov 09 11:04:19 laptop dhcpcd[1063540]: wlp2s0: deleting default route via fe80::1
Nov 09 11:04:19 laptop dhcpcd[1063540]: wlp2s0: deleting address XXXX::XXXX:XXXX:XXXX:XXXX
Nov 09 11:04:19 laptop dhcpcd[1063540]: wlp2s0: deleting route to XXX.XX.XXX.X/XX
Nov 09 11:04:19 laptop dhcpcd[1063540]: wlp2s0: deleting default route via XXX.XX.XXX.X
Nov 09 11:04:22 laptop dhcpcd[1063540]: wlp2s0: carrier acquired
Nov 09 11:04:22 laptop dhcpcd[1063540]: wlp2s0: IAID XX:XX:XX:XX
Nov 09 11:04:22 laptop dhcpcd[1063540]: wlp2s0: adding address XXXX::XXXX:XXXX:XXXX:XXXX
Nov 09 11:04:22 laptop dhcpcd[1063540]: wlp2s0: soliciting an IPv6 router
Nov 09 11:04:23 laptop dhcpcd[1063540]: wlp2s0: rebinding lease of XXX.XX.XXX.XXX
Nov 09 11:04:23 laptop dhcpcd[1063540]: wlp2s0: probing address XXX.XX.XXX.XXX/XX
Nov 09 11:04:24 laptop dhcpcd[1063540]: wlp2s0: Router Advertisement from fe80::1
Nov 09 11:04:24 laptop dhcpcd[1063540]: wlp2s0: adding address XXXX:XXXX:XXXX:X:XXXX:XXXX:XXXX:XXXX/XX
Nov 09 11:04:24 laptop dhcpcd[1063540]: wlp2s0: adding route to XXXX:XXXX:XXXX:X::/XX via fe80::1
Nov 09 11:04:24 laptop dhcpcd[1063540]: wlp2s0: requesting DHCPv6 information
Nov 09 11:04:24 laptop dhcpcd[1063540]: wlp2s0: adding default route via fe80::1
Nov 09 11:04:28 laptop dhcpcd[1063540]: wlp2s0: leased XXX.XX.XXX.XXX for 300 seconds
Nov 09 11:04:28 laptop dhcpcd[1063540]: wlp2s0: adding route to XXX.XX.XXX.X/XX
Nov 09 11:04:28 laptop dhcpcd[1063540]: wlp2s0: adding default route via XXX.XX.XXX.X
Nov 09 11:10:11 laptop dhcpcd[1063540]: wlp2s0: fe80::1 is unreachable
Nov 09 11:10:11 laptop dhcpcd[1063540]: wlp2s0: carrier lost
Nov 09 11:10:12 laptop dhcpcd[1063540]: wlp2s0: deleting address XXXX:XXXX:XXXX:X:XXXX:XXXX:XXXX:XXXX/XX
Nov 09 11:10:12 laptop dhcpcd[1063540]: wlp2s0: deleting route to XXXX:XXXX:XXXX:X::/XX via fe80::1
Nov 09 11:10:12 laptop dhcpcd[1063540]: wlp2s0: deleting default route via fe80::1
Nov 09 11:10:12 laptop dhcpcd[1063540]: wlp2s0: deleting address XXXX::XXXX:XXXX:XXXX:XXXX

dhcpcd log output completely stops after this. It does not recover.

Edit: clarity

Last edited by zxip (2019-11-09 10:36:35)

Offline

#10 2019-11-10 16:07:17

seth
Member
Registered: 2012-09-03
Posts: 12,905

Re: [SOLVED] No Internet after resume from sleep, maybe dhcpcd issue

Sorry for the delay.
What's the status of the NIC after loosing lease and network? Still up?
Is there log output from wpa_supplicant? What does the wpa_supplicant config look like (please highlight obfuscating edits, don't just delete private info)

One thing you might want to try (because of the apparent leas connection) is to replace DUID w/ the clientid in /etc/dhcpcd.conf

Offline

#11 2019-11-10 23:33:21

hexhu
Member
Registered: 2019-11-10
Posts: 3

Re: [SOLVED] No Internet after resume from sleep, maybe dhcpcd issue

I am also having the same issue when dhcpcd will "fail to exit" after my laptop resumes from S3 sleep (with a Intel 9260 using IWD). The network environment remained unchanged.

Currently I will lose all the ip addresses on wlan0 after resuming from sleep, and whenever I run `systemctl restart dhcpcd` the command will hang until the dhcpcd process is killed by systemd. While it hangs, `systemctl status dhcpcd` will report that it waits the dhcpcd process to exit and finally dhcpcd fails to exit. After the kill (either a timeout kill or my manual kill -9), if I restart dhcpcd it will operate normally.

Since simply force restarting dhcpcd it will deterministically recover, I think the NIC and IWD might not part of this issue.

Right after resuming from S3:

● dhcpcd.service - dhcpcd on all interfaces
   Loaded: loaded (/usr/lib/systemd/system/dhcpcd.service; enabled; vendor preset: disabled)
   Active: active (running) since Sun 2019-11-10 15:08:11 PST; 28min ago
 Main PID: 33572 (dhcpcd)
    Tasks: 1 (limit: 19013)
   Memory: 2.8M
   CGroup: /system.slice/dhcpcd.service
           └─33572 dhcpcd: [master] [ip4] [ip6]

Nov 10 15:08:12 Jill dhcpcd[33572]: wlan0: probing address 192.168.88.../24
Nov 10 15:08:16 Jill dhcpcd[33572]: wlan0: Router Advertisement from fe80::66d1:54ff:feb4:e99
Nov 10 15:08:16 Jill dhcpcd[33572]: wlan0: adding address 2602:feda:ae3:.../64
Nov 10 15:08:16 Jill dhcpcd[33572]: wlan0: adding address 2602:feda:ae3:..../64
Nov 10 15:08:16 Jill dhcpcd[33572]: wlan0: adding route to 2602:feda:ae3:...::/64
Nov 10 15:08:16 Jill dhcpcd[33572]: wlan0: adding route to 2602:feda:ae3:....::/64
Nov 10 15:08:16 Jill dhcpcd[33572]: wlan0: adding default route via fe80::66d1:54ff:feb4:e99
Nov 10 15:08:17 Jill dhcpcd[33572]: wlan0: leased 192.168.88... for 600 seconds
Nov 10 15:08:17 Jill dhcpcd[33572]: wlan0: adding route to 192.168.88.0/24
Nov 10 15:08:17 Jill dhcpcd[33572]: wlan0: adding default route via 192.168.88.1
Nov 10 15:37:05 Jill dhcpcd[33572]: wlan0: fe80::66d1:54ff:feb4:e99 is unreachable
Nov 10 15:37:05 Jill dhcpcd[33572]: wlan0: carrier lost
Nov 10 15:37:05 Jill dhcpcd[33572]: wlan0: deleting address 2602:feda:ae3:.../64
Nov 10 15:37:05 Jill dhcpcd[33572]: wlan0: deleting address 2602:feda:ae3:..../64
Nov 10 15:37:05 Jill dhcpcd[33572]: wlan0: deleting route to 2602:feda:ae3:...::/64
Nov 10 15:37:05 Jill dhcpcd[33572]: wlan0: deleting route to 2602:feda:ae3:....::/64
Nov 10 15:37:05 Jill dhcpcd[33572]: wlan0: deleting default route via fe80::66d1:54ff:feb4:e99
Nov 10 15:37:05 Jill dhcpcd[33572]: wlan0: deleting address fe80::76e5:f9ff:fe5e:87f1

After `sudo systemctl restart dhcpcd`:

● dhcpcd.service - dhcpcd on all interfaces
   Loaded: loaded (/usr/lib/systemd/system/dhcpcd.service; enabled; vendor preset: disabled)
   Active: deactivating (stop) since Sun 2019-11-10 15:40:48 PST; 4s ago
 Main PID: 33572 (dhcpcd); Control PID: 37790 (dhcpcd)
    Tasks: 2 (limit: 19013)
   Memory: 3.0M
   CGroup: /system.slice/dhcpcd.service
           ├─33572 dhcpcd: [master] [ip4] [ip6]
           └─37790 /usr/bin/dhcpcd -x

Nov 10 15:40:48 Jill systemd[1]: Stopping dhcpcd on all interfaces...
Nov 10 15:40:48 Jill dhcpcd[37790]: sending signal TERM to pid 33572
Nov 10 15:40:48 Jill dhcpcd[37790]: waiting for pid 33572 to exit
Nov 10 15:40:48 Jill dhcpcd[37790]: sending signal TERM to pid 33572
Nov 10 15:40:48 Jill dhcpcd[37790]: waiting for pid 33572 to exit
Nov 10 15:40:58 Jill dhcpcd[37790]: pid 33572 failed to exit
Nov 10 15:40:58 Jill dhcpcd[37790]: pid 33572 failed to exit
Nov 10 15:40:58 Jill systemd[1]: dhcpcd.service: Control process exited, code=exited, status=1/FAILURE

Still no ip address, until

Nov 10 15:41:18 Jill systemd[1]: dhcpcd.service: State 'stop-sigterm' timed out. Killing.
Nov 10 15:41:18 Jill systemd[1]: dhcpcd.service: Killing process 33572 (dhcpcd) with signal SIGKILL.
Nov 10 15:41:18 Jill systemd[1]: dhcpcd.service: Main process exited, code=killed, status=9/KILL
Nov 10 15:41:18 Jill systemd[1]: dhcpcd.service: Failed with result 'exit-code'.
Nov 10 15:41:18 Jill systemd[1]: Stopped dhcpcd on all interfaces.

Now if I run `systemctl restart dhcpcd` everything will resume as usual.

Last edited by hexhu (2019-11-10 23:49:00)

Offline

#12 2019-11-11 09:00:18

seth
Member
Registered: 2012-09-03
Posts: 12,905

Re: [SOLVED] No Internet after resume from sleep, maybe dhcpcd issue

Stupid question, is dhcpcd maybe consuming your CPU as well when this happens?
https://bbs.archlinux.org/viewtopic.php?id=250397

Offline

#13 2019-11-11 09:23:55

zxip
Member
Registered: 2019-11-08
Posts: 6

Re: [SOLVED] No Internet after resume from sleep, maybe dhcpcd issue

seth wrote:

Stupid question, is dhcpcd maybe consuming your CPU as well when this happens?
https://bbs.archlinux.org/viewtopic.php?id=250397

I just checked, that's it. Thank you.
Probably should have been suspicious when my laptop randomly slowed down sometimes.
The post is even the second result for 'arch linux dhcpcd issue' on duckduckgo. Maybe I'm blind.

Offline

#14 2019-11-12 00:56:04

hexhu
Member
Registered: 2019-11-10
Posts: 3

Re: [SOLVED] No Internet after resume from sleep, maybe dhcpcd issue

seth wrote:

Stupid question, is dhcpcd maybe consuming your CPU as well when this happens?
https://bbs.archlinux.org/viewtopic.php?id=250397

Exactly my issue. I didn't notice dhcpcd's 100% CPU usage. Can't believe I missed it! Thanks for pointing this out

Last edited by hexhu (2019-11-12 00:56:22)

Offline

Board footer

Powered by FluxBB