FS#32580 - [netcfg] 3.0 doesn't reconnect to Wi-Fi network after suspend

Attached to Project: Arch Linux
Opened by Claudio Kozický (C5OK5Y) - Saturday, 10 November 2012, 14:39 GMT
Last edited by Eric Belanger (Snowman) - Tuesday, 30 April 2013, 01:03 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To Jouke Witteveen (jouke)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 6
Private No

Details

Description:
I have a netcfg profile set up to connect to my Wi-Fi network on boot. After I suspend and resume my system, netcfg doesn't reconnect to my Wi-Fi network. This issue seems to have been introduced by switching to systemd. From what I've managed to find out, netcfg needs to be told to disconnect from the network before suspend and reconnect to the network after resume - that doesn't seem to be done right now. I think that the code for disconnecting and reconnecting should by added to a file in /usr/lib/systemd/system-sleep/. I've tried to fix the issue with a /usr/lib/systemd/system-sleep/netcfg.sh file with the following contents:

#!/bin/sh
case $1/$2 in
pre/*)
netcfg all-suspend
;;
post/*)
netcfg all-resume
;;
esac

The file makes netcfg disconnect from the network before suspend and reconnect to the network after resume. But after resume, dhcpcd gets killed for some reason (details in the the attached log).

There should be a file included in the netcfg package by default to handle reconnecting and connecting during suspend and resume. Another thing is that the file should make sure that there is enough time given for the POST_DOWN stuff to execute successfully (I don't know, if my file did this).


Additional info:
* package version(s)
* config and/or log files etc.
netcfg 3.0-1
systemd 195-2
I enabled my netcfg profile with systemctl enable netcfg@profilename.
https://bbs.archlinux.org/viewtopic.php?id=152161

Steps to reproduce:
Set up a netcfg Wi-Fi profile on a systemd system, suspend (it doesn't matter if suspend to disk or RAM) and finally resume, netcfg will no longer be connected to the Wi-Fi network.
This task depends upon

Closed by  Eric Belanger (Snowman)
Tuesday, 30 April 2013, 01:03 GMT
Reason for closing:  Won't fix
Additional comments about closing:  netcfg has been moved to AUR
Comment by hamelg (hamelg) - Sunday, 18 November 2012, 14:06 GMT
Hello, I have the same issue since switching to systemd. With pm utils, suspend and hibernate works always fine.
(ignore the attached log file, I can't remove it)
   err.lst (80.6 KiB)
Comment by hamelg (hamelg) - Sunday, 02 December 2012, 19:50 GMT
Here is the script /usr/lib/systemd/system-sleep/gha.sh :

#!/bin/sh
case $1/$2 in
pre/*)
/usr/bin/netcfg all-suspend
;;
post/*)
/usr/bin/netcfg all-resume
sleep 10
;;
esac


I set the systemd log level to debug. Here is the trace :

21:05:34 brightstar systemd-sleep[11316]: resuming interface wlan0 with profile gha
21:05:34 brightstar kernel: IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
21:05:35 brightstar kernel: wlan0: authenticate with 00:22:b0:68:31:6d
21:05:35 brightstar kernel: wlan0: send auth to 00:22:b0:68:31:6d (try 1/3)
21:05:35 brightstar kernel: wlan0: authenticated
21:05:35 brightstar kernel: ath5k 0000:07:00.0: wlan0: disabling HT as WMM/QoS is not supported
21:05:35 brightstar kernel: wlan0: associate with 00:22:b0:68:31:6d (try 1/3)
21:05:35 brightstar kernel: wlan0: RX AssocResp from 00:22:b0:68:31:6d (capab=0x411 status=0 aid=2)
21:05:35 brightstar kernel: wlan0: associated
21:05:35 brightstar kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
21:05:35 brightstar dhcpcd[11459]: version 5.6.3 starting
21:05:35 brightstar dhcpcd[11459]: wlan0: sending IPv6 Router Solicitation
21:05:35 brightstar dhcpcd[11459]: ESC[1;31mwlan0: sendmsg: Cannot assign requested addressESC[0m
21:05:35 brightstar dhcpcd[11459]: wlan0: broadcasting for a lease
21:05:38 brightstar dhcpcd[11459]: wlan0: offered 10.0.1.13 from 10.0.1.1
21:05:38 brightstar dhcpcd[11459]: wlan0: acknowledged 10.0.1.13 from 10.0.1.1
21:05:38 brightstar dhcpcd[11459]: wlan0: checking for 10.0.1.13
21:05:39 brightstar dhcpcd[11459]: wlan0: sending IPv6 Router Solicitation
21:05:43 brightstar dhcpcd[11459]: wlan0: leased 10.0.1.13 for 43200 seconds
21:05:43 brightstar dhcpcd[11459]: forked to background, child pid 11490
21:05:43 brightstar systemd-sleep[11316]: :: gha up [done] <<<<<<<<< ##sleep 10 begin HERE##
21:05:43 brightstar dhcpcd[11490]: wlan0: sending IPv6 Router Solicitation
21:05:47 brightstar dhcpcd[11490]: wlan0: sending IPv6 Router Solicitation
21:05:47 brightstar dhcpcd[11490]: wlan0: no IPv6 Routers available
21:05:53 brightstar systemd[1]: Received SIGCHLD from PID 11316 (systemd-sleep).
21:05:53 brightstar systemd[1]: Got SIGCHLD for process 11316 (systemd-sleep)
21:05:53 brightstar systemd[1]: Child 11316 died (code=exited, status=0/SUCCESS)
21:05:53 brightstar systemd[1]: Child 11316 belongs to systemd-suspend.service
21:05:53 brightstar systemd[1]: systemd-suspend.service: main process exited, code=exited, status=0/SUCCESS
21:05:53 brightstar systemd[1]: systemd-suspend.service changed start -> stop-sigterm
21:05:53 brightstar systemd[1]: Trying to enqueue job suspend.target/stop/replace
21:05:53 brightstar systemd[1]: Job suspend.target/start finished, result=canceled
21:05:53 brightstar systemd[1]: Installed new job suspend.target/stop as 519
21:05:53 brightstar systemd[1]: Enqueued job suspend.target/stop as 519
21:05:53 brightstar systemd[1]: Stopping Suspend.
21:05:53 brightstar systemd[1]: suspend.target changed active -> dead
21:05:53 brightstar dhcpcd[11490]: received SIGTERM, stopping
21:05:53 brightstar dhcpcd[11490]: wlan0: removing interface
21:05:53 brightstar systemd[1]: Job suspend.target/stop finished, result=done
21:05:53 brightstar systemd[1]: Running GC...
21:05:53 brightstar systemd[1]: Collecting suspend.target
21:05:53 brightstar kernel: wlan0: deauthenticating from 00:22:b0:68:31:6d by local choice (reason=3)
21:05:53 brightstar kernel: cfg80211: Calling CRDA to update world regulatory domain
21:05:53 brightstar systemd[1]: Received SIGCHLD from PID 11432 (wpa_supplicant).
21:05:53 brightstar systemd[1]: Got SIGCHLD for process 11432 (wpa_supplicant)
21:05:53 brightstar systemd[1]: Child 11432 died (code=exited, status=0/SUCCESS)
21:05:53 brightstar systemd[1]: Received SIGCHLD from PID 11490 (dhcpcd).
21:05:53 brightstar systemd[1]: Got SIGCHLD for process 11490 (dhcpcd)
21:05:53 brightstar systemd[1]: Child 11490 died (code=exited, status=1/FAILURE)
21:05:53 brightstar systemd[1]: Accepted connection on private bus.
21:05:53 brightstar systemd[1]: Got D-Bus request: org.freedesktop.systemd1.Agent.Released() on /org/freedesktop/systemd1/agent
21:05:53 brightstar systemd[1]: systemd-suspend.service: cgroup is empty
21:05:53 brightstar systemd[1]: systemd-suspend.service changed stop-sigterm -> dead
21:05:53 brightstar systemd[1]: Job systemd-suspend.service/start finished, result=done
21:05:53 brightstar systemd[1]: Started Suspend.
21:05:53 brightstar systemd[1]: Got D-Bus request: org.freedesktop.DBus.Local.Disconnected() on /org/freedesktop/DBus/Local
Comment by Claudio Kozický (C5OK5Y) - Wednesday, 13 February 2013, 20:39 GMT
Possible temporarily fix described here: https://bbs.archlinux.org/viewtopic.php?pid=1231717#p1231717

Loading...