# multiple instances of wpa_supplicant after boot [Solved]

## vespaman

For over a year (maybe two?), I have had this problem, where I need to kill one instance of wpa_supplicant after booting up, since something in my system is causing multiple starts. 

I do not use /etc/init.d/wpa_supplicant, so i guess it is kde or the network scripts that starts wpa_supplicant. 

after booting it looks like this;

```
thinkpad kernel # ps ax | grep wpa_supplicant

  680 ?        S      0:00 /usr/sbin/wpa_supplicant -u

  962 ?        Ss     0:00 /usr/sbin/wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -W -B -i wlan0 -P /var/run/wpa_supplicant-wlan0.pid

  969 ?        Ss     0:00 /usr/bin/wpa_cli -a /etc/wpa_supplicant/wpa_cli.sh -p /var/run/wpa_supplicant -i wlan0 -P /var/run/wpa_cli-wlan0.pid -B

 1692 ?        S      0:00 /bin/sh /etc/wpa_supplicant/wpa_cli.sh wlan0 CONNECTED

 2124 pts/0    S+     0:00 grep --colour=auto wpa_supplicant

```

In order to get wifi to connect, I simply do;

```
thinkpad kernel # killall wpa_supplicant
```

Then it connects. 

But I am getting more and more tired of doing this every boot, so, I thought I should ask if someone has any idea why this is happening...   :Embarassed: 

After after the killall, I have;

```

thinkpad kernel # ps ax | grep wpa_supplicant

  969 ?        Ss     0:00 /usr/bin/wpa_cli -a /etc/wpa_supplicant/wpa_cli.sh -p /var/run/wpa_supplicant -i wlan0 -P /var/run/wpa_cli-wlan0.pid -B

 1692 ?        S      0:00 /bin/sh /etc/wpa_supplicant/wpa_cli.sh wlan0 CONNECTED

 2127 ?        S      0:00 /usr/sbin/wpa_supplicant -u

 2130 pts/0    S+     0:00 grep --colour=auto wpa_supplicant

```

Maybe someone has had the same problem?Last edited by vespaman on Mon Jan 28, 2013 8:22 pm; edited 1 time in total

----------

## BillWho

vespaman,

What does  rc-update|grep "net\.\|wpa" look like and the contents of /etc/conf.d/net  :Question: 

----------

## vespaman

BillWho, 

this is the output;

```
thinkpad kernel # rc-update|grep "net\.\|wpa"

             net.eth0 |      default                 

               net.lo | boot                         

            net.wlan0 |      default                 

thinkpad kernel # cat /etc/conf.d/net

#Generated by NetworkManager

###### Global Configuration ######

###### Connection Configuration ######

#----------------------------------

config_nostromo="dhcp"

auto_nostromo="true"

enable_ipv6_nostromo="false"

#----------------------------------

auto_vespanet5GHz="true"                                                                                                                    

config_vespanet5GHz="dhcp"                                                                                                                  

enable_ipv6_vespanet5GHz="false"                                                                                                            

#----------------------------------                                                                                                         

enable_ipv6_vespanet="false"                                                                                                                

config_vespanet="dhcp"                                                                                                                      

auto_vespanet="true"                                                                                                                        

#----------------------------------                                                                                                         

auto_axpersonal="true"                                                                                                                      

config_axpersonal="dhcp"                                                                                                                    

enable_ipv6_axpersonal="false"                                                                                                              

thinkpad kernel #                                                                                                                           

 
```

----------

## BillWho

vespaman,

hmm, I have no clue what vespanet, axpersonal or nostromo is   :Confused: 

The wlan0 contents of my /etc/cong.f/net is:

```
modules="wpa_supplicant"

wpa_supplicant_wlan0="-Dnl80211 -c/etc/wpa_supplicant/wpa_supplicant.conf"

wpa_timeout_wlan0=60

config_wlan0="192.168.1.105/24 brd 192.168.1.255"

routes_wlan0="default via 192.168.1.1"

```

I don't see where multiple instances of wpa_supplicant is started unless it's related to vespanet, axpersonal or nostromo.

----------

## vespaman

Those are my networks. They are managed by networkmanager, by the looks of it, I guess.

----------

## BillWho

vespaman,

Are you starting networkmanager too   :Question: 

This process 680 ?        S      0:00 /usr/sbin/wpa_supplicant -u according to man wpa_supplicant might be started by dbus   :Question: 

-u     Enabled DBus control interface. If enabled, interface definitions may be omitted.

My processes are listed as;

```
laptop init.d # ps ax | grep wpa_supplicant

 2027 ?        Ss     0:00 /usr/sbin/wpa_supplicant -Dnl80211 -c/etc/wpa_supplicant/wpa_supplicant.conf -W -B -i wlan0 -P /var/run/wpa_supplicant-wlan0.pid

 2034 ?        Ss     0:00 /usr/bin/wpa_cli -a /etc/wpa_supplicant/wpa_cli.sh -p /var/run/wpa_supplicant -i wlan0 -P /var/run/wpa_cli-wlan0.pid -B

23055 pts/0    S+     0:00 grep --color=auto wpa_supplicant

```

----------

## vespaman

Yes, I'm starting NetworkManager in init. Forgot about that, sorry! In KDE, I use 'Network Management' to manage/connect to new networks.

So, I guess I want the dbus started wpa_supplicant to stay, and the other one to disappear?! 

That would be your process 2027. But how is that started?

----------

## BillWho

vespaman

Upon closer look at the start of your /etc/conf.d/net it's #Generated by NetworkManager.

So probably the thing to do would be rc-update  del wlan0 default and just let networkmanager handle the connections.

----------

## vespaman

YESSSsssss!!

The solution was just as simple as that! 

Cheers mate! 

 :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy: 

----------

