# wpa_supplicant - problem

## oscarandrea

Hello, I just installed gentoo, I can not configure the wifi, I installed wpa_supplicant, WPA-tool and DHCP. In/etc/conf.d/net:

```
modules_wlp2s0="wpa_supplicant"

config_wlp2s0="dhcp"
```

I first tried to set up by hand, then I heard with wpa_cli, this is the final configuration:

```
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel

update_config=1

network={

        ssid="-Vodafone"

        psk="my_password_wifi"

        proto=RSN

        key_mgmt=WPA-EAP

        pairwise=CCMP

        auth_alg=OPEN

        eap=MD5

}
```

I put the daemon startup, when I try to reboot I get this error:

```
gentoo@GentOscar ~ $ sudo /etc/init.d/net.wlp2s0 restart

Password:

 * Bringing up interface wlp2s0

 *   Starting wpa_supplicant on wlp2s0 ...

Successfully initialized wpa_supplicant

ctrl_iface exists and seems to be in use - cannot override it

Delete '/var/run/wpa_supplicant/wlp2s0' manually if it is not used anymore

Failed to initialize control interface 'DIR=/var/run/wpa_supplicant GROUP=wheel'.

You may have another wpa_supplicant process already running or the file was

left by an unclean termination of wpa_supplicant in which case you will need

to manually remove this file before starting wpa_supplicant again.

nl80211: deinit ifname=wlp2s0 disabled_11b_rates=0

 *   start-stop-daemon: failed to start `/usr/sbin/wpa_supplicant'                                                                                                       $

[ !! ]

 * ERROR: net.wlp2s0 failed to start
```

iwconfig:

```

gentoo@GentOscar ~ $ sudo iwconfig

enp3s0    no wireless extensions.

wlp2s0    no wireless extensions.

sit0      no wireless extensions.

lo        no wireless extensions.

gentoo@GentOscar ~ $

```

----------

## DONAHUE

```
rc-update show 
```

 do dhcpcd or wpa_supplicant or wicd or NetworkManager appear in a run level?

----------

## oscarandrea

 *DONAHUE wrote:*   

> 
> 
> ```
> rc-update show 
> ```
> ...

 

first of all thank you for responding, here you go:

```
               binfmt | boot

             bootmisc | boot

                devfs |                       sysinit

                dmesg |                       sysinit

                 fsck | boot

             hostname | boot

              hwclock | boot

              keymaps | boot

            killprocs |              shutdown

    kmod-static-nodes |                       sysinit

                local |      default

           localmount | boot

             loopback | boot

              modules | boot

             mount-ro |              shutdown

                 mtab | boot

           net.wlp2s0 |      default

             netmount |      default

               procfs | boot

                 root | boot

            savecache |              shutdown

                 swap | boot

            swapfiles | boot

               sysctl | boot

                sysfs |                       sysinit

         termencoding | boot

         tmpfiles.dev |                       sysinit

       tmpfiles.setup | boot

                 udev |                       sysinit

              urandom | boot

       wpa_supplicant |      default
```

if you can serve the output of iwconfig is that of arch  (dualboot):

```
wlp2s0    IEEE 802.11bgn  ESSID:"Vodafone-"  

          Mode:Managed  Frequency:2.437 GHz  Access Point: 00:24:89:7F:91:D8   

          Bit Rate=65 Mb/s   Tx-Power=15 dBm   

          Retry short limit:7   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          Link Quality=60/70  Signal level=-50 dBm  

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:16   Missed beacon:0

sit0      no wireless extensions.

lo        no wireless extensions.
```

----------

## khayyam

oscarandrea ...

you have both net.wlp2s0 and wpa_supplicant in the default runlevel ... hence the "you may have another wpa_supplicant process already running" error.

As you are using netifrc you can remove 'wpa_supplicant' as netifrc is configured to start it ...

```
# rc-update del wpa_supplicant default
```

... that should be all that is required to resolve the issue.

best ... khay

----------

## oscarandrea

 *khayyam wrote:*   

> oscarandrea ...
> 
> you have both net.wlp2s0 and wpa_supplicant in the default runlevel ... hence the "you may have another wpa_supplicant process already running" error.
> 
> As you are using netifrc you can remove 'wpa_supplicant' as netifrc is configured to start it ...
> ...

 

hello, thanks for your help, of course I had not paid attention to the error message, I am not English and I did not understand what you said  :Sad: 

ok, I removed the daemon startup, now what do I do?

thanks of patience

----------

## DONAHUE

reboot

----------

## oscarandrea

 *DONAHUE wrote:*   

> reboot

 lol, still I can not login the same, you place net.wlp2s0 chroot?

----------

## DONAHUE

in the installed gentoo system or in the chroot, run: 

```
rc-update add net.wlp2s0 default

rc-update del wpa_supplicant

reboot
```

I do not understand 

```
still I can not login the same
```

 Do you have a separate login problem from the wireless problem?

----------

## oscarandrea

 *DONAHUE wrote:*   

> in the installed gentoo system or in the chroot, run: 
> 
> ```
> rc-update add net.wlp2s0 default
> 
> ...

 

excuse me google translator is making trouble! I just wanted to say that I was not solved. I tried as you say, it does not work  :Sad: 

----------

## oscarandrea

I try to do a summary of the situation:

```
OscArch / # rc-update show

               binfmt | boot                         

             bootmisc | boot                         

                devfs |                       sysinit

                dmesg |                       sysinit

                 fsck | boot                         

             hostname | boot                         

              hwclock | boot                         

              keymaps | boot                         

            killprocs |              shutdown        

    kmod-static-nodes |                       sysinit

                local |      default                 

           localmount | boot                         

             loopback | boot                         

              modules | boot                         

             mount-ro |              shutdown        

                 mtab | boot                         

           net.wlp2s0 |      default                 

             netmount |      default                 

               procfs | boot                         

                 root | boot                         

            savecache |              shutdown        

                 swap | boot                         

            swapfiles | boot                         

               sysctl | boot                         

                sysfs |                       sysinit

         termencoding | boot                         

         tmpfiles.dev |                       sysinit

       tmpfiles.setup | boot                         

                 udev |                       sysinit

              urandom | boot                         

```

please could you an example of wlp2s0? thank you

----------

## DONAHUE

try key_mgmt=WPA-PSK instead of key_mgmt=WPA-EAP in wpa_supplicant.conf or if you know based on access point scan or administrator information that WPA-PSK is correct specify the eap= that is appropriate

```
iwlist scan
```

 does the desired access point appear?

----------

## oscarandrea

 *DONAHUE wrote:*   

> try key_mgmt=WPA-PSK instead of key_mgmt=WPA-EAP in wpa_supplicant.conf or if you know based on access point scan or administrator information that WPA-PSK is correct specify the eap= that is appropriate
> 
> ```
> iwlist scan
> ```
> ...

 

does not work: / being new gentoo I would not have missed something that you give for sure I created symlinks with:

```
ln -s /etc/init.d/net.lo /etc/init.d/net.wlp2s0
```

more info on the network and on current demon:

```
 * Unmounting network filesystems ...                                                                                                                                    $

[ ok ]

 * Bringing down interface wlp2s0

 *   Stopping udhcpc on wlp2s0 ...                                                                                                                                       $

[ ok ]

 *   Stopping wpa_cli on wlp2s0 ...                                                                                                                                      $

[ ok ]

 *   Stopping wpa_supplicant on wlp2s0 ...                                                                                                                               $

[ ok ]

 * Bringing up interface wlp2s0

 *   Starting wpa_supplicant on wlp2s0 ...

Successfully initialized wpa_supplicant                                                                                                                                  $

[ ok ]

 *   Starting wpa_cli on wlp2s0 ...                                                                                                                                      $

[ ok ]

 *   Backgrounding ... ...

 * WARNING: net.wlp2s0 has started, but is inactive

 * WARNING: netmount will start when net.wlp2s0 has started

gentoo@GentOscar ~ $

---------------------------

[WPA2-PSK-CCMP][ESS]

----------------------
```

----------

## DONAHUE

Please provide some data in pastebins: 

```
emerge wgetpaste

lspci -k | wgetpaste -t 

dmesg | wgetpaste -t

zcat /proc/config.gz | wgetpaste -t
```

/etc/conf.d/net example:  *Quote:*   

> dns_servers="192.168.2.1 8.8.8.8"
> 
> modules_wlan0="wpa_supplicant"
> 
> #wpa_supplicant_wlan0="-Dnl80211"
> ...

  Try one then the other /etc/wpa_supplicant/wpa_supplicant.conf example:  *Quote:*   

> ctrl_interface=/var/run/wpa_supplicant
> 
> ctrl_interface_group=0
> 
> update_config=1
> ...

 

----------

## oscarandrea

solved    :Smile:  , after changing the parameter wpa_supplicant.config I started with startx and then did ping to google and was not connect, but apparently it takes a fifteen seconds to connect , I noticed leaving the PC on   :Very Happy: 

----------

