Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
multiple instances of wpa_supplicant after boot [Solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
vespaman
Guru
Guru


Joined: 28 Aug 2002
Posts: 346
Location: Stockholm, Sweden

PostPosted: Mon Jan 28, 2013 9:40 am    Post subject: multiple instances of wpa_supplicant after boot [Solved] Reply with quote

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;
Code:
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;
Code:
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... :oops:

After after the killall, I have;
Code:

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
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Mon Jan 28, 2013 5:01 pm    Post subject: Reply with quote

vespaman,

What does rc-update|grep "net\.\|wpa" look like and the contents of /etc/conf.d/net :?:
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
vespaman
Guru
Guru


Joined: 28 Aug 2002
Posts: 346
Location: Stockholm, Sweden

PostPosted: Mon Jan 28, 2013 5:16 pm    Post subject: Reply with quote

BillWho,

this is the output;

Code:
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 #                                                                                                                           
 
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Mon Jan 28, 2013 5:45 pm    Post subject: Reply with quote

vespaman,

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

The wlan0 contents of my /etc/cong.f/net is:
Code:
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.
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
vespaman
Guru
Guru


Joined: 28 Aug 2002
Posts: 346
Location: Stockholm, Sweden

PostPosted: Mon Jan 28, 2013 6:36 pm    Post subject: Reply with quote

Those are my networks. They are managed by networkmanager, by the looks of it, I guess.
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Mon Jan 28, 2013 7:08 pm    Post subject: Reply with quote

vespaman,

Are you starting networkmanager too :?:

This process 680 ? S 0:00 /usr/sbin/wpa_supplicant -u according to man wpa_supplicant might be started by dbus :?:
-u Enabled DBus control interface. If enabled, interface definitions may be omitted.
My processes are listed as;
Code:
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

_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
vespaman
Guru
Guru


Joined: 28 Aug 2002
Posts: 346
Location: Stockholm, Sweden

PostPosted: Mon Jan 28, 2013 7:36 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Mon Jan 28, 2013 8:15 pm    Post subject: Reply with quote

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.
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
vespaman
Guru
Guru


Joined: 28 Aug 2002
Posts: 346
Location: Stockholm, Sweden

PostPosted: Mon Jan 28, 2013 8:21 pm    Post subject: Reply with quote

YESSSsssss!!

The solution was just as simple as that!

Cheers mate!

:D :D :D :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum