# [SOLVED]wicd connection troubles and ignoring config

## Havin_it

Hi all,

I recently did a few updates, none of which I'd have thought would affect it, but since rebooting afterwards I've had a lot of difficulty getting wicd to connect to my home wlan, which uses WPA2-PSK/CCMP. Wifi driver is ath5k and config backend nl80211 is used.

Firstly, it does not autoconnect on boot as it previously did. I can eventually get it to come up by repeatedly clicking my network's icon in the wicd-client-kde applet, though this can take many attempts.  Then when it does come up, it ignores (at least partially) my DHCP settings, which are to get IP by DHCP but use static DNS server definitions and search domain. What I actually get is one nameserver entry (my router's IP, which should be the 2nd of two nameservers) in /etc/resolv.conf and no search domain entry.

I was also seeing in the logs that a preconnect script I'd made for an ad-hoc network I sometimes (try to) use was being called for no apparent reason. I at least solved that by deleting the reference to it from that network's entry in /etc/wicd/wireless-settings.conf (and deleting the script itself for good measure; it never worked anyway).

I set wicd to debug mode, and this is some typical output. This actually shows a successful connection attempt, but the problem with DNS configuration happening as described above. I'd hoped debug mode would be more verbose, but maybe it can give some clues:

```
2012/02/28 19:42:30 :: scanning start

2012/02/28 19:42:30 :: ifconfig wlan0 up

2012/02/28 19:42:30 :: iwlist wlan0 scan

2012/02/28 19:42:31 :: ifconfig eth0

2012/02/28 19:42:31 :: ifconfig wlan0

2012/02/28 19:42:31 :: scanning done

2012/02/28 19:42:31 :: found 6 networks:

2012/02/28 19:42:31 :: found afterscript in configuration None

2012/02/28 19:42:31 :: found dhcphostname in configuration minime

2012/02/28 19:42:31 :: found ip in configuration None

2012/02/28 19:42:31 :: found use_dhcphostname in configuration 1

2012/02/28 19:42:31 :: found dns_domain in configuration None

2012/02/28 19:42:31 :: found gateway in configuration None

2012/02/28 19:42:31 :: found use_global_dns in configuration False

2012/02/28 19:42:31 :: found postdisconnectscript in configuration None

2012/02/28 19:42:31 :: found beforescript in configuration None

2012/02/28 19:42:31 :: found psk in configuration <blablabla>

2012/02/28 19:42:31 :: found netmask in configuration None

2012/02/28 19:42:31 :: found key in configuration *****

2012/02/28 19:42:31 :: found usedhcphostname in configuration False

2012/02/28 19:42:31 :: found predisconnectscript in configuration None

2012/02/28 19:42:31 :: found enctype in configuration wpa

2012/02/28 19:42:31 :: found dns3 in configuration None

2012/02/28 19:42:31 :: found dns2 in configuration 192.168.2.1

2012/02/28 19:42:31 :: found dns1 in configuration 192.168.2.7

2012/02/28 19:42:31 :: found use_settings_globally in configuration False

2012/02/28 19:42:31 :: found use_static_dns in configuration True

2012/02/28 19:42:31 :: found automatic in configuration True

2012/02/28 19:42:31 :: found search_domain in configuration <my.dyndns.domain>

2012/02/28 19:42:35 :: Connecting to wireless network reagent

2012/02/28 19:42:35 :: iwconfig wlan0

2012/02/28 19:42:35 :: /sbin/dhcpcd -k wlan0

2012/02/28 19:42:35 :: ifconfig wlan0 0.0.0.0 

2012/02/28 19:42:35 :: /sbin/ip route flush dev wlan0

2012/02/28 19:42:35 :: ifconfig wlan0 down

2012/02/28 19:42:35 :: ifconfig wlan0 up

2012/02/28 19:42:35 :: wpa_cli -i wlan0 terminate

2012/02/28 19:42:35 :: /sbin/dhcpcd -k eth0

2012/02/28 19:42:35 :: ifconfig eth0 0.0.0.0 

2012/02/28 19:42:35 :: /sbin/ip route flush dev eth0

2012/02/28 19:42:35 :: ifconfig eth0 down

2012/02/28 19:42:35 :: ifconfig eth0 up

2012/02/28 19:42:35 :: wpa_cli -i eth0 terminate

2012/02/28 19:42:35 :: ifconfig eth0

2012/02/28 19:42:35 :: Putting interface down

2012/02/28 19:42:35 :: ifconfig wlan0 down

2012/02/28 19:42:35 :: ifconfig wlan0

2012/02/28 19:42:35 :: Releasing DHCP leases...

2012/02/28 19:42:35 :: /sbin/dhcpcd -k wlan0

2012/02/28 19:42:35 :: Setting false IP...

2012/02/28 19:42:35 :: ifconfig wlan0 0.0.0.0 

2012/02/28 19:42:35 :: Stopping wpa_supplicant

2012/02/28 19:42:35 :: wpa_cli -i wlan0 terminate

2012/02/28 19:42:35 :: Flushing the routing table...

2012/02/28 19:42:35 :: /sbin/ip route flush dev wlan0

2012/02/28 19:42:35 :: iwconfig wlan0 mode managed

2012/02/28 19:42:35 :: Putting interface up...

2012/02/28 19:42:35 :: ifconfig wlan0 up

2012/02/28 19:42:37 :: enctype is wpa

2012/02/28 19:42:37 :: Generating psk...

2012/02/28 19:42:37 :: ['/usr/bin/wpa_passphrase', 'reagent', 'MY-PSK']

2012/02/28 19:42:37 :: Attempting to authenticate...

2012/02/28 19:42:37 :: ['wpa_supplicant', '-B', '-i', 'wlan0', '-c', '/var/lib/wicd/configurations/00184d0049a2', '-D', 'nl80211']

2012/02/28 19:42:37 :: ['iwconfig', 'wlan0', 'essid', '--', 'reagent']

2012/02/28 19:42:37 :: iwconfig wlan0 channel 6

2012/02/28 19:42:37 :: iwconfig wlan0 ap 00:18:4D:00:49:A2

2012/02/28 19:42:37 :: WPA_CLI RESULT IS DISCONNECTED

2012/02/28 19:42:38 :: WPA_CLI RESULT IS COMPLETED

2012/02/28 19:42:38 :: Running DHCP with hostname minime

2012/02/28 19:42:38 :: /sbin/dhcpcd -h minime --noipv4ll wlan0 

2012/02/28 19:42:38 :: dhcpcd[7116]: sending commands to master dhcpcd process

2012/02/28 19:42:38 :: 

2012/02/28 19:42:39 :: 

2012/02/28 19:42:39 :: DHCP connection successful

2012/02/28 19:42:39 :: Setting DNS : 192.168.2.7

2012/02/28 19:42:39 :: Setting DNS : 192.168.2.1

2012/02/28 19:42:39 :: not verifying

2012/02/28 19:42:39 :: Connecting thread exiting.

2012/02/28 19:42:39 :: ifconfig wlan0

2012/02/28 19:42:39 :: IP Address is: None

2012/02/28 19:42:41 :: Sending connection attempt result success

2012/02/28 19:42:41 :: ifconfig eth0

2012/02/28 19:42:41 :: ifconfig wlan0

```

I can't think what the cause of the change can be. The most likely thing in my update batch was sip, but I did a python-updater run and rebuilt PyQt4, pykde4, plasma-workspace and wicd and wicd-client-kde for good measure. revdep-rebuild finds nothing broken.

I did see a mention on b.g.o. that some people's configs got hosed by the upgrade to wicd-1.7.1beta, but that was a while ago now and my config appears okay and as I remember it. And it does work sometimes, which suggests it's okay and maybe an underlying component is to blame?

This is disappointing. After years of frustration with wifi, wicd has been a godsend: stable, works as intended (well OK maybe not with ad-hoc but you can't have everything) and nicely DE-integrated. It's a shame to see it lose the plot like this.

Any idea what could be up? Please ask if you'd like any other logs etc.Last edited by Havin_it on Wed Feb 29, 2012 4:07 pm; edited 1 time in total

----------

## wrc1944

What version of wicd are you using?  I recently had to mask >=net-misc/wicd-1.7.1_pre20120127 after it broke my wireless on three Gentoo installations.  

Last version that works for me is (running both ~x86 and ~amd64 Gentoos on different partitions ) wicd-1.7.1_pre20111210-r1 with wicd-client-kde-0.3.0.

Never changed any configs- just downgraded my wicd and it fixed everything.  Didn't matter what kernel I was using at the time.

----------

## Havin_it

I'm now on 1.7.1-r1, which I first merged on 12 Feb (preceded by 1.7.1_pre20120127-r1 on 04 Feb). My logs confirm that I've rebooted since then, and there were no problems until yesterday, so the version alone can't be the problem. I'll give downgrading a try though, just in case.

Out of interest, could you share any specifics about what went wrong with yours? Was it consistent across all installs?

----------

## wrc1944

Have you tried to using a static configuration, and see if that works?  Does "rc-update show" dhcpcd and/or wpa_supplicant at a runlevel (with wicd, it shouldn't- wicd needs to control everything)  

Maybe look at this: https://forums.gentoo.org/viewtopic-t-901364-start-0.html

IIRC, my problems seemed to be openrc and/or dhcpcd versions with the 1.7.1_pre20120127-r1 wicd update.  

Here's a link I ran across about something I had read about before.  Might be worth a look.  http://www.gossamer-threads.com/lists/gentoo/user/248776

Here's a comment:  *Quote:*   

> Yes, it gets curiouser and curiouser. I reported yesterday that
> 
> kernel-3.2.5 worked fine with openrc-0.9.9.*
> 
> Well actually it doesn't work fine, it's sorta flakey. Takes a while to
> ...

 

UPDATE:  Just found this- it might be the fix- not sure though, as I haven't done it myself.  https://bugs.gentoo.org/show_bug.cgi?id=405775

The new wicd-1.7.1-r2 init script provides net.

UPDATE-2:  I just unmasked wicd in /etc/portage and updated world, and got wicd-1.7.1-r2, along with today's ~Arch update to openrc-0.9.9.2, and I currently have dhcpcd-5.5.4.

Apparently, whatever problems I was having with 1.7.1_pre20120127-r1 are fixed with 1.7.1-r2, which fixes the "provide net" issue, because now wicd works normally with the newest version.

----------

## Havin_it

Nice one, that seems to have done the trick for me. Thanks!

EDIT: BTW that Gmane link you posted is incorrect I think - the post is about XFree86 circa 2003   :Embarassed: 

----------

## wrc1944

Great!  Glad it fixed it up.

You're right about the link- don't know how that happened.   :Embarassed:   I'll remove it or find the correct one.  However, the quote is correct, and from the page which discusses the recent problem with wicd.

OK- link corrected and pointing to the wicd problem.

----------

