You are not logged in.

#1 2013-08-28 18:50:57

Registered: 2012-09-07
Posts: 33

netctl and connecting to university wireless on wakeup


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'
    'ssid="<University Wireless>"'
    'pairwise=TKIP CCMP'
    'identity="<my id>"'
    'password="<my password>"'

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[1309]: Interface 'wlp3s0' lost connection to network '<My University>'
Aug 28 10:13:17 arch wpa_actiond[1309]: 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

Description=sleep hook

ExecStart=-/usr/bin/systemctl stop netctl-auto@wlp3s0.service
ExecStop=-/usr/bin/systemctl start netctl-auto@wlp3s0.service


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.


Board footer

Powered by FluxBB