You are not logged in.

#1 2013-04-21 15:46:01

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Netctl often (not always) won't connect to home network

Hey folks,

Recently I switched to Netctl but it often won't connect to my home network (wireless, wpa2). When I try to connect, it will fail (see logs below) and I have two workarounds:

1. Connect to my neighbour's open network, disconnect and then connecting to my home network will work;
2. The above solution does not always work, in which case I can only reboot and try again.

My configuration file for my home network is fine (it was automatically generated through wifi-menu and I double checked it) so I'm really not sure what is causing this. The logs speak of a DHCP lease fail, so I tried disabling IPv6. This didn't work and I have no clue what else to look for or what setting to tweak.

Here's the output of journalctl (before I disabled IPv6, though):

┌─(jente @ aggicommunicator ~) 13:16:24
└─■ netctl start wlp5s0-Maas_WIFI
Job for netctl@wlp5s0\x2dMaas_WIFI.service failed. See 'systemctl status netctl@wlp5s0\x2dMaas_WIFI.service' and 'journalctl -xn' for details.
┌─(jente @ aggicommunicator ~) 13:16:49
└─■ systemctl status netctl@wlp5s0\x2dMaas_WIFI.service
netctl@wlp5s0x2dMaas_WIFI.service - Networking for netctl profile wlp5s0x2dMaas_WIFI
   Loaded: loaded (/usr/lib/systemd/system/netctl@.service; static)
   Active: inactive (dead)
     Docs: man:netctl.profile(5)

┌─(jente @ aggicommunicator ~) 13:16:57
└─■ journalctl -xn
-- Logs begin at zo 2013-04-14 16:09:04 CEST, end at zo 2013-04-21 13:16:49 CEST. --
apr 21 13:16:47 aggicommunicator dhcpcd[1167]: wlp5s0: sending IPv6 Router Solicitation
apr 21 13:16:49 aggicommunicator dhcpcd[1167]: timed out
apr 21 13:16:49 aggicommunicator network[1108]: DHCP IP lease attempt failed on interface 'wlp5s0'
apr 21 13:16:49 aggicommunicator kernel: wlp5s0: deauthenticating from 00:16:b6:12:4b:b8 by local choice (reason=3)
apr 21 13:16:49 aggicommunicator kernel: cfg80211: Calling CRDA to update world regulatory domain
apr 21 13:16:49 aggicommunicator network[1108]: Failed to bring the network up for profile 'wlp5s0-Maas_WIFI'
apr 21 13:16:49 aggicommunicator systemd[1]: netctl@wlp5s0\x2dMaas_WIFI.service: main process exited, code=exited, status=1/FAILURE
apr 21 13:16:49 aggicommunicator systemd[1]: Failed to start Networking for netctl profile wlp5s0-Maas_WIFI.
-- Subject: Unit netctl@wlp5s0\x2dMaas_WIFI.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/be02cf6855d2428ba40df7e9d022f03d
--
-- Unit netctl@wlp5s0\x2dMaas_WIFI.service has failed.
--
-- The result is failed.
apr 21 13:16:49 aggicommunicator systemd[1]: Unit netctl@wlp5s0\x2dMaas_WIFI.service entered failed state
apr 21 13:16:49 aggicommunicator sudo[1101]: pam_unix(sudo:session): session closed for user root

If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#2 2013-04-21 19:05:42

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: Netctl often (not always) won't connect to home network

Have you tried increasing dhcp timeout in your profile?

man netctl.profile wrote:

TimeoutDHCP=
     Maximum time, in seconds, to wait for DHCP to be successful. Defaults to ‘10’.

I remember I had to do this on one machine when I was still using netcfg (I guess I set it to 20 or so).


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#3 2013-04-21 19:10:44

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: Netctl often (not always) won't connect to home network

That could be worth a try. I think there's also a clue in the fact that once I have connected to another network first, connecting to mine suddenly works?


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#4 2013-04-21 20:04:14

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: Netctl often (not always) won't connect to home network

I guess so, but I have no idea what exactly may be causing this. I stopped using dhcp clients at home: I switched to static IPs and everything has been working smoother ever since. An additional bonus is no timeouts whatsoever.


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#5 2013-04-21 20:15:11

cris9288
Member
Registered: 2013-01-07
Posts: 348

Re: Netctl often (not always) won't connect to home network

I was having this problem. I can confirm that incresing the dhcp timeout value to 30 has seemed to solve it.

Offline

#6 2013-04-21 20:27:03

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: Netctl often (not always) won't connect to home network

Thanks both! Tomorrow I'm leaving on a trip for at least one month, so I don't have more time to test this out. I am now aware of one trick that might work, and for emergencies I have nm-applet installed wink

You will hear from me when I'm back


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#7 2013-04-21 22:59:25

opt1mus
Member
From: UK
Registered: 2011-12-31
Posts: 212
Website

Re: Netctl often (not always) won't connect to home network

DHCP lease timeout appears to be a fairly regular bugbear with wireless connections, using 5 different machines (two of which were for the most part identical in hardware and OS) with connections to three different routers.

Offline

Board footer

Powered by FluxBB