# Wifi

## FrankRizz0

Good morning all!  I'm having a lot of difficulty getting my wireless up and running.  I have wpa_supplicant, linux-firmware and just about everything else I can imagine installed on this box relating to a wireless connection.  The wpa_gui has the adapter listed (wlo1) and the network sees my router along with everyone else's in my neighborhood.  I entered my password and I get as far as associating (after authentication) and it just won't connect.  I am assuming that this should be something simple but I can't seem to find the error.  Please help.....

Thanks in advance for any assistance!

----------

## FrankRizz0

OK so found an issue, but I do not know how to fix the issue.  I tried to restart networkmanager and it won't restart.  Not sure where to go from here, or where I can see the error.

----------

## NeddySeagoon

FrankRizz0,

Put the output of dmesg onto a pastebin please.

----------

## FrankRizz0

https://paste.pound-python.org/show/XTxRcXksnl8B0fEF6bok/

----------

## NeddySeagoon

FrankRizz0,

Thin may not be important, as wileless worked later

```
[    7.730463] iwlwifi 0000:43:00.0: Direct firmware load for iwlwifi-6000-6.ucode failed with error -2

[    7.730498] iwlwifi 0000:43:00.0: Direct firmware load for iwlwifi-6000-5.ucode failed with error -2
```

iwlwifi did find some firmware. 

The interesting bit starts here

```
[   17.675223] wlo1: authenticate with c8:d7:19:46:4a:23

[   17.705334] wlo1: send auth to c8:d7:19:46:4a:23 (try 1/3)

[   17.766614] wlo1: authenticated

[   17.767707] wlo1: associate with c8:d7:19:46:4a:23 (try 1/3)

[   17.768595] wlo1: RX AssocResp from c8:d7:19:46:4a:23 (capab=0x1011 status=0 aid=2)

[   17.771142] wlo1: associated

[   17.771196] IPv6: ADDRCONF(NETDEV_CHANGE): wlo1: link becomes ready

[   17.771351] wlo1: deauthenticating from c8:d7:19:46:4a:23 by local choice (Reason: 3=DEAUTH_LEAVING)
```

then it repeats. Reason 3 means that the user told wifi to deauthenticate.

This is usually a sign that several different network managers are active and wpa-supplicant is receiving conflicting commands as they don't know about one another.  

You mentioned NetworkManager.  How do you start it?

What do you have in 

```
/sbin/rc-update show
```

What is in your 

```
/etc/conf.d/net
```

The idea is to only have a single network manager starting.  The only way you can be sure of that is to get down to none, then add one to the default runlevel.

----------

## FrankRizz0

Hi Neddy, thanks for the reply.  Here is the output of /sbin/rc-update show:

```
# /sbin/rc-update show

       NetworkManager |      default

               binfmt | boot

             bootmisc | boot

               cronie |      default

                 dbus |      default

                devfs |                                 sysinit

                dmesg |                                 sysinit

                 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

           net.enp5s0 |                                 sysinit

             netmount |      default

               procfs | boot

                 root | boot

            savecache |                        shutdown

                 sshd |      default

                 swap | boot

               sysctl | boot

                sysfs |                                 sysinit

            syslog-ng |      default

         termencoding | boot

                 udev |                                 sysinit

         udev-trigger |                                 sysinit

              urandom | boot

       wpa_supplicant |      default

                  xdm |      default
```

I've turned dhcp off, so this is what my /etc/conf.d/net looks like:

```
config_eth0="dhcpcd"

config_enp68s0="dhcpcd"

config_wlan1="dhcpcd"
```

code tags added by NeddySeagoon

----------

## NeddySeagoon

FrankRizz0,

```
             netmount |      default
```

will force the network service to start as its going to try to mount all the network filesystems in /etc/fstab.

If you don't have any network filesystems remove this from the default runlevel.

```
       wpa_supplicant |      default
```

wpa_supplicant is called as needed, It sould not be in the default runlevel.

```
config_wlan1="dhcpcd"
```

You don't have a wlan1.

```
[    7.841848] iwlwifi 0000:43:00.0 wlo1: renamed from wlan0
```

 but you did have a wlan0 until udev renamed it to wlo1.

What do you have in /etc/rc.conf for the 

```
rc_depend_strict

rc_hotplug
```

options?

The comments explain what they do.

----------

## FrankRizz0

Removed netmount from runlevel and also removed wpa_supplicant.  In /etc/rc.conf rc_depend_strict was commented out.  it is now rc_depend_strict="YES" and there is no rc_hotplug

----------

## NeddySeagoon

FrankRizz0,

You probably want 	

rc_depend_strict="NO" on a laptop so that the network service is up when either wired or wireless is up.

="YES" means you need both.

Anyway, what happens with wlo1 now?

The right answer is it stays down until you start it.

----------

## FrankRizz0

No idea how I read that wrong, I wanted it to be NO, but I still put YES, oh well.  It's still wlo1, and it's still not working.  I had to start dhcpcd to get wired internet, I'm assuming because I had it at yes?Last edited by FrankRizz0 on Fri Apr 21, 2017 7:34 pm; edited 1 time in total

----------

## FrankRizz0

Well, dhcp seems to be handling my wireless just fine.  Working now, thanks for all your help Neddy!

----------

## FrankRizz0

Hi Neddy

Not sure if you're still watching this thread (or if anyone else is available for help) but I completely broke my Gentoo and had to reinstall.  Unfortunately I'm having issues again with my wireless.  I have gone through this thread multiple times and I can't figure out what the issue is.  Below is my dmesg:

[url] https://paste.pound-python.org/show/5trVBv74tGTYTd83UVhi/

Here is my /etc/conf.d/net:

```
config_enp68s0="dhcpcd"

config_wlo1="dhcpcd"

```

Here is the output of /sbin/rc-update show:

```
# /sbin/rc-update show

               binfmt | boot

             bootmisc | boot

               cronie |      default

                 dbus |      default

                devfs |                                 sysinit

               dhcpcd |      default

                dmesg |                                 sysinit

                 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

          net.enp68s0 |      default

             netmount |      default

               procfs | boot

                 root | boot

            savecache |                        shutdown

                 sshd |      default

                 swap | boot

               sysctl | boot

                sysfs |                                 sysinit

            syslog-ng |      default

         termencoding | boot

                 udev |                                 sysinit

         udev-trigger |                                 sysinit

              urandom | boot

                  xdm |      default

```

In /etc/rc.conf I have rc_depend_strict="NO"

Finally, here is my wpa_supplicant.conf:

[url] https://paste.pound-python.org/show/DWHxddY0d5IskyQ3xSg4/

----------

## FrankRizz0

So I was finally able to connect, but unfortunately I could not use wpa_gui for this.  I had to use wpa_cli.  I did this by commenting everything out of my wpa_supplicant.conf except for ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel & update_config=1.  I also added this below, which was directly from the wiki:

```
network={

        ssid="SSID"

        psk="your-secret-key"

        scan_ssid=1

        proto=RSN

        key_mgmt=WPA-PSK

        group=CCMP TKIP

        pairwise=CCMP TKIP

        priority=5

}

```

Not working the way I wanted it to, but it's working none the less.

----------

## charles17

 *FrankRizz0 wrote:*   

> Here is my /etc/conf.d/net:
> 
> ```
> config_enp68s0="dhcpcd"
> 
> ...

 

You might want to compare these settings with those in  https://wiki.gentoo.org/wiki/Handbook:AMD64/Networking/Introduction

 https://wiki.gentoo.org/wiki/Netifrc#Basic_examples And ask yourself if you really want to set a value which is the default if none is set.

----------

## charles17

 *FrankRizz0 wrote:*   

> So I was finally able to connect, but unfortunately I could not use wpa_gui for this.  I had to use wpa_cli.  I did this by commenting everything out of my wpa_supplicant.conf except for ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel & update_config=1.  I also added this below, which was directly from the wiki:

 

You'd better start from minimal configuration file as shown in the #Global section.  wpa_gui and/or wpa_cli will add the »network« sections for you.

----------

## FrankRizz0

Yes, previously wpa_gui was setting that for me but unfortunately it's not doing it after I reinstalled Gentoo.  I do not have an answer for this unfortunately  :Sad: 

----------

## FrankRizz0

So I've continued to work on this issue because of my apparent OCD.  My wpa_gui is scanning fine, I can add other routers to it (wpa_gui), I can connect and I am connected, but when I do /etc/init.d/net.wlo1 I still get this error:

```
/etc/init.d/net.wlo1 restart

 * Bringing down interface wlo1

 *   Stopping dhcpcd on wlo1 ...

control_open: Connection refused

sending signal TERM to pid 5658

waiting for pid 5658 to exit                                                                 [ ok ]

 *   Stopping wpa_cli on wlo1 ...                                                            [ ok ]

 *   Stopping wpa_supplicant on wlo1 ...                                                     [ ok ]

RTNETLINK answers: No such file or directory

Error talking to the kernel

 * Bringing up interface wlo1

 *   Starting wpa_supplicant on wlo1 ...

Successfully initialized wpa_supplicant                                                      [ ok ]

 *   Starting wpa_cli on wlo1 ...                                                            [ ok ]

 *   Backgrounding ... ...

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

```

Please help, I have no idea where to go from here.

Thanks in advance for any assistance!

----------

## charles17

See my posting on the other thread post 8110872

Be aware it is a different approach ...

----------

