I've been having issues connecting to my university's wireless network after waking up from sleep. Here is the relevant config:
Description='University Wireless Connection' Interface=wlp3s0 Connection=wireless Security=wpa-configsection IP=dhcp WPAConfigSection=( 'ssid="<University Wireless>"' 'key_mgmt=WPA-EAP' 'eap=TTLS' 'group=TKIP' 'pairwise=TKIP CCMP' 'anonymous_identity="anonymous"' 'identity="<my id>"' 'password="<my password>"' 'priority=1' 'phase2="auth=PAP"' )
I use netctl-auto and this works just fine almost all of the time. The only time it breaks is when I put my laptop to sleep while connected to my university wireless and then wake it up and re-connect to the university. For example, putting my laptop away after class and then taking it out again in my dorm room. In this case, I cannot connect to anything and I need to restart netctl-auto, which always fixes the problem.
I've noticed that if I try to ping a website after wakeup, I don't get any response and the command doesn't return. From this I gather that the packets are going out but no packets are making it back. The netctl-auto log file doesn't say much. The only relevant lines seem to be
Aug 28 10:13:11 arch wpa_actiond: Interface 'wlp3s0' lost connection to network '<My University>' Aug 28 10:13:17 arch wpa_actiond: Interface 'wlp3s0' reestablished connection to network '<My University>'
So it seems that wpa_actiond (or wpa_supplicant) thinks that I am still connected to the same wifi network even though I am now in another building and it tries to just reuse everything it had before I put my computer to sleep. Interestingly, this only happens for my university. I don't have this problem on my home or friends' networks so I think this is a WPA-Enterprise vs WPA-Personal thing.
For a while, I just worked around this issue with a service file that would stop netctl-auto before going to sleep and then restart it on wakeup
[Unit] Description=sleep hook Before=sleep.target StopWhenUnneeded=yes [Service] Type=oneshot RemainAfterExit=yes ExecStart=-/usr/bin/systemctl stop email@example.com ExecStop=-/usr/bin/systemctl start firstname.lastname@example.org [Install] WantedBy=sleep.target
And this has worked out fine, although it is quite an inconvenience because a few different programs try to access the network right on wakeup (like my email) and then they sort of freeze up until the network comes online. So I would like to figure out what the proper solution for this is. I'm sure there is simply some config option that I have missed.
Going through the source for netctl makes me think that this is actually a problem with wpa_supplicant but I just don't know enough about network programming to be sure about what the issue is. Help and/or suggestions would be most welcome.