# wicd almost connects

## danboston

I've installed wicd. As per the wiki I stopped dhcpcd. I rebooted. I saw a wicd icon in the tool tray. Good. I clicked on it. It showed the ether net ("wired") network but clicking "connect" resulted in a long wait followed by ... nothing. "Obtaining IP address" is what was displayed during the long wait. Going to a shell and pinging various sites indicates that wicd never actually connected.

I tried again, this time, picking from the various wifi networks available. I clicked on one. Entered the password. After a long wait ... nothing. Same as with wired. "validating authentication" is what is displayed during the long wait.

Now what is interesting is that wicd must be *almost* working, because the nearby wifi networks are shown. The question is, how do I nudge wicd past that "almost" and to an actual successful connection?

----------

## The Doctor

The unix way is to design one thing to do one job well. The problem isn't wicd but one of the tools it is tying to use. Wicd is just a thing to look nice and manage the low level tools for you.

Lets start by looking at the entire picture. Please post the output of rc-update (Assuming you are running openRC and not systemd) and rc-service dhcpcd status. The most likely cause is dhcpcd already running and blocking itself.

Another good troubleshooting step would be to try a static ip address. This requires a little understanding of the network you are trying to connect to. In general, your router (or gateway) will be 192.168.{0,1}.{1,254}. The netmask should atuocomplete to 255.255.225.0. and your ip will be the same as the gateway except the last number. Choose between 1-254 so long as it is unique. The DNS domain can be either the same as the gateway or 8.8.8.8 to use google. Either should be satisfactory.

----------

## danboston

Thank you, doctor.   :Smile: 

An "rc-update" run resulted in this output:

```

               binfmt | boot                                   

             bootmisc | boot                                   

           consolekit |      default                           

                 dbus |      default                           

                devfs |                                 sysinit

                dmesg |                                 sysinit

           fbcondecor | boot                                   

                 fsck | boot                                   

             hostname | boot                                   

              hwclock | boot                                   

              keymaps | boot                                   

            killprocs |                        shutdown        

    kmod-static-nodes |                                 sysinit

                local |      default nonetwork                 

           localmount | boot                                   

             loopback | boot                                   

              modules | boot                                   

             mount-ro |                        shutdown        

                 mtab | boot                                   

             netmount |      default                           

               procfs | boot                                   

                 root | boot                                   

            savecache |                        shutdown        

                 swap | boot                                   

               sysctl | boot                                   

                sysfs |                                 sysinit

         termencoding | boot                                   

         tmpfiles.dev |                                 sysinit

       tmpfiles.setup | boot                                   

                 udev |                                 sysinit

              urandom | boot                                   

                 wicd |      default                           

```

so it looks like dhcp is (correctly?) out of the way.

A "rc-service dhcpcd status" run resulted in this output:

```

 * status: stopped

```

trying static IP addresses did not work and I did not expect it to work: I would have to set something on the router end, and also I am almost sure that a static IP can't be used for wifi.

p.s. I know the hardware is good because three other OS's on the same machine can see the net. :p

----------

## Jaglover

SOHO routers do not care, they will connect you if you grab a static IP, wired or wireless.

----------

## The Doctor

Yep, the run levels look good. So much for that hypothesis. The static IP should work fine. Generally, I actually prefer them since it makes ssh and ntfs work reliably.

Wicd has several options under preferences. I would make sure it is tying to use dhcpcd and the rest on automatic. For advanced settings the driver wext and the external backend. You can play with the driver as that is a bit card dependent, but I wouldn't expect much. Wext is pretty much standard.

The next suspect is firmware. You should make sure you have sys-kernel/linux-firmware installed and your wireless card driver built as a module. You also need to ensure that the two cfg80211 options are set in the kernel.

----------

## danboston

 *Quote:*   

> Wicd has several options under preferences. I would make sure it is tying to use dhcpcd and the rest on automatic.

 

I thought the dhcp process had to be removed so that wicd could be used ... so I am confused at this point. does dhcpcd assist or conflict with wicd?

Turns out I did not have the firmware package installed. Installed it. Booted. Made no difference.

It's a wonder how network-manager worked before. I'd rather use wicd though ... if only it would work.

----------

## The Doctor

The service which automatically seeks out and connects needs to be disabled. However both wicd and networkmanager use dhcpcd to aquire an ip. Wicd and networkmanager are both just GUI shells that doen't do anything network related. They just run the tools that do the networking.

If networkmanager works and wicd doesn't the culprit is likely the driver under advanced settings in the preferences.

----------

## danboston

Before reading your post I had the realization that I had uninstalled dhcpcd in order to keep it out of wicd's way.

Woops.

I reinstalled it. Dhcp is in but is not started by the init script(s). Now the situation is as follows.

One: if the computer reboots, wired access works.

Two: if an attempt is made to switch to wifi, the nearby networks will be shown, but connecting will always fail.

Three: after two, attempting to return to wired connection will 

always fail. (reboot time).

I've got wicd working on another distro on this same computer so I had the idea of looking at the various configuration files. At this time, the files for dhcp and wicd match, aside from the different interface names.

The only conclusion is that wicd and dhcp are working correctly... yet it's not working right.

Here is the wicd log from the most recent attempt:

```

2016/12/03 22:41:01 :: ---------------------------

2016/12/03 22:41:01 :: wicd initializing...

2016/12/03 22:41:01 :: ---------------------------

2016/12/03 22:41:01 :: wicd is version 1.7.4 961

2016/12/03 22:41:01 :: setting backend to external

2016/12/03 22:41:01 :: trying to load backend external

2016/12/03 22:41:01 :: successfully loaded backend external

2016/12/03 22:41:01 :: trying to load backend external

2016/12/03 22:41:01 :: successfully loaded backend external

2016/12/03 22:41:01 :: Automatically detected wireless interface wlp13s0

2016/12/03 22:41:01 :: setting wireless interface wlp13s0

2016/12/03 22:41:01 :: automatically detected wired interface enp14s0

2016/12/03 22:41:01 :: setting wired interface enp14s0

2016/12/03 22:41:01 :: setting wpa driver wext

2016/12/03 22:41:01 :: setting use global dns to False

2016/12/03 22:41:01 :: setting global dns

2016/12/03 22:41:01 :: global dns servers are None None None

2016/12/03 22:41:01 :: domain is None

2016/12/03 22:41:01 :: search domain is None

2016/12/03 22:41:01 :: setting automatically reconnect when connection drops True

2016/12/03 22:41:01 :: Setting dhcp client to 2

2016/12/03 22:41:01 :: Wireless configuration file found...

2016/12/03 22:41:01 :: Wired configuration file found...

2016/12/03 22:41:01 :: chmoding configuration files 0600...

2016/12/03 22:41:01 :: chowning configuration files root:root...

2016/12/03 22:41:01 :: Using wireless interface...wlp13s0

2016/12/03 22:41:01 :: Using wired interface...enp14s0

2016/12/03 22:41:02 :: hidden

2016/12/03 22:41:02 :: hidden

2016/12/03 22:41:06 :: Autoconnecting...

2016/12/03 22:41:09 :: Attempting to autoconnect with wired interface...

2016/12/03 22:41:09 :: Putting interface down

2016/12/03 22:41:09 :: Releasing DHCP leases...

2016/12/03 22:41:09 :: Setting false IP...

2016/12/03 22:41:09 :: Stopping wpa_supplicant

2016/12/03 22:41:09 :: Flushing the routing table...

2016/12/03 22:41:09 :: Putting interface up...

2016/12/03 22:41:11 :: Running DHCP with NO hostname

2016/12/03 22:41:16 :: 

2016/12/03 22:41:16 :: DHCP connection successful

2016/12/03 22:41:16 :: Connecting thread exiting.

2016/12/03 22:41:20 :: Sending connection attempt result success

2016/12/03 22:43:44 :: hidden

2016/12/03 22:43:44 :: hidden

2016/12/03 22:43:44 :: hidden

2016/12/03 22:43:50 :: Connecting to wireless network HOME-0DE5

2016/12/03 22:43:50 :: Putting interface down

2016/12/03 22:43:50 :: Releasing DHCP leases...

2016/12/03 22:43:50 :: Setting false IP...

2016/12/03 22:43:50 :: Stopping wpa_supplicant

2016/12/03 22:43:50 :: Flushing the routing table...

2016/12/03 22:43:50 :: Putting interface up...

2016/12/03 22:43:52 :: Generating psk...

2016/12/03 22:43:52 :: Attempting to authenticate...

2016/12/03 22:43:53 :: Running DHCP with NO hostname

2016/12/03 22:43:55 :: 

2016/12/03 22:43:55 :: DHCP connection successful

2016/12/03 22:43:55 :: not verifying

2016/12/03 22:43:55 :: Connecting thread exiting.

2016/12/03 22:43:56 :: Sending connection attempt result success

2016/12/03 22:44:08 :: Putting interface down

2016/12/03 22:44:08 :: Releasing DHCP leases...

2016/12/03 22:44:08 :: Setting false IP...

2016/12/03 22:44:08 :: Stopping wpa_supplicant

2016/12/03 22:44:08 :: Flushing the routing table...

2016/12/03 22:44:08 :: Putting interface up...

2016/12/03 22:44:10 :: Running DHCP with NO hostname

2016/12/03 22:44:13 :: 

2016/12/03 22:44:13 :: DHCP connection successful

2016/12/03 22:44:13 :: Connecting thread exiting.

2016/12/03 22:44:14 :: Sending connection attempt result success

2016/12/03 22:44:25 :: Autoconnecting...

2016/12/03 22:44:26 :: Attempting to autoconnect with wired interface...Putting interface down

2016/12/03 22:44:26 :: 

2016/12/03 22:44:26 :: Releasing DHCP leases...

2016/12/03 22:44:26 :: Setting false IP...

2016/12/03 22:44:26 :: Stopping wpa_supplicant

2016/12/03 22:44:26 :: Flushing the routing table...

2016/12/03 22:44:26 :: Putting interface up...

2016/12/03 22:44:28 :: Running DHCP with NO hostname

2016/12/03 22:44:31 :: 

2016/12/03 22:44:31 :: DHCP connection successful

2016/12/03 22:44:31 :: Connecting thread exiting.

2016/12/03 22:44:32 :: Sending connection attempt result success

2016/12/03 22:44:33 :: No wired connection present, attempting to autoconnect to wireless network

2016/12/03 22:44:34 :: hidden

2016/12/03 22:44:34 :: Unable to autoconnect, you'll have to manually connect

```

Got me clueless. I'd hate to have to use network manager, because (a) wicd always seems to work a little better for wifi and (b) network-manager spams the console during log-in.

----------

## charles17

 *danboston wrote:*   

> Got me clueless. I'd hate to have to use network manager, because (a) wicd always seems to work a little better for wifi and (b) network-manager spams the console during log-in.

 

What about using dhcpcd-ui instead?

----------

## NeddySeagoon

danboston,

As The Doctor hints at, there is no point in trying to use a pretty GUI until it works manually.

The GUI will just hide the error messages we need for debugging.

You may have exactly one tool managing your network connections.  If you have more, they fight and nothing works.

You will need dhcpcd and wpa_supplicant installed, all the tools use them.  

wpa_supplicant is a one of a kind tool but there are various implementations of dhcpcd.

Step one is to get your system into a state where none of the following are started by default

Any Wireless GUI

dhcpcd

wpa_supplicant

When you boot this way, none of your interfaces will get an IP address, not even a 169.x.x.x link local address, except lo.  

Until you get to this state, something is trying to manage networking.  You need to locate it and stop it.

Once you get here, 

```
dhcpcd enp14s0
```

should bring up your wired interface by hand.

With that working, mostly to prove that you have control of your networking, adding in wifi will be easier.

We will be building on what we know works.

----------

## danboston

In the end, i realized I was using the wrong approach.  It was time to conceptually zoom out or step back and view the situation.

1. If I install wicd, it does not work.

2. If I install network manager, it does work.

Right. Use the program that works.  Problem solved.

----------

