# [SOLVED] net.wlp1s0 would not start

## sicr0

I finished my installation and I went on to setting up WiFi on a HP Elitebook 855 G7 (iwlwifi - rev 1a). After following both the Networking/Wireless Handbook and the iwlwifi page I couldn't get it to run.

After booting openrc logs that wpa_supplicant initialized but net.wlp1s0 had problems:

```
wpa_supplicant  |Successfully initialized wpa_supplicant

dhcpcd          | * Starting DHCP Client Daemon ...

net.wlp1s0      | * Bringing up interface wlp1s0

net.wlp1s0      | *   Caching network module dependencies

net.wlp1s0      | *   Starting wpa_supplicant on wlp1s0 ...

net.wlp1s0      |Successfully initialized wpa_supplicant

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |ctrl_iface exists and seems to be in use - cannot override it

net.wlp1s0      |Delete `/run/wpa_suppplicant/wlp1s0` manually if it is not used anymore

net.wlp1s0      |Failed to initialize control interface `/run/wpa_supplicant`.

net.wlp1s0      |You may have another wpa_supplicant process already running or the file was

net.wlp1s0      |left by an unclear termination of wpa_supplicant in which case you will need

net.wlp1s0      |to manually remove this file before starting wpa_supplicant again.

net.wlp1s0      |

net.wlp1s0      |wlp1s0: CTRL-EVENT-DSCP-POLICY clear_all

net.wlp1s0      |wlp1s0: CTRL-EVENT-DSCP-POLICY clear_all

net.wlp1s0      |nl80211: deinit ifname=wlp1s0 disabled_11b_rates=0

net.wlp1s0      | *   start-stop-daemon: failed to start `/usr/sbin/wpa_supplicant`

net.wlp1s0      | ERROR: net.wlp1s0 failed to start

netmount        | ERROR: cannot start netmount as net.wlp1s0 would not start

```

My /etc/wpa_supplicant/wpa_supplicant.conf is:

```
ctrl_interface=/run/wpa_supplicant

ctrl_interface_group=0

ap_scan=1

network={

  ssid="Fibertel WiFi608 2.4GHz"

  psk="********"

  priority=5

}

```

My /etc/conf.d/net is:

```
modules="wpa_supplicant"

config_wlp1s0="dhcp"

routes_wlp1s0="default via 192.168.0.1"

```

Could somebody help me get this going please? I'm not really knowledgeble on networkingLast edited by sicr0 on Sun Apr 03, 2022 5:49 am; edited 1 time in total

----------

## alamahant

It seems as a race condition.

Try disabling wpa_supplicant and enabling net.wlp1s0

Not a promise but maybe it will work.

Also if you have other network managers plz disable them all and just use netifrc.

Also 

if you are using dhcp this line

```

routes_wlp1s0="default via 192.168.0.1"

```

is redundant

unless you are trying to override the dhcp assigned default gateway.

Also follow dmesg advice

```

Delete `/run/wpa_suppplicant/wlp1s0` manually if it is not used anymore

```

----------

## sicr0

I ran "rc-service wpa_supplicant stop", fine. Then "rc-service net.wlp1s0 start", everything good minus the last log:

```
net.wlp1s0       | * WARNING: net.wlp1s0 has started, but is inactive

```

After pinging failed, I tried (blindly, because I don't really know what I'm supposed to do) "wpa_supplicant -i wlp1s0 -c /etc/wpa_supplicant/wpa_supplicant.conf" and I got the same message from the booting:

```
net.wlp1s0      |Successfully initialized wpa_supplicant

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |nl80211 kernel reports: Match already configured

net.wlp1s0      |ctrl_iface exists and seems to be in use - cannot override it

net.wlp1s0      |Delete `/run/wpa_suppplicant/wlp1s0` manually if it is not used anymore

net.wlp1s0      |Failed to initialize control interface `/run/wpa_supplicant`.

net.wlp1s0      |You may have another wpa_supplicant process already running or the file was

net.wlp1s0      |left by an unclear termination of wpa_supplicant in which case you will need

net.wlp1s0      |to manually remove this file before starting wpa_supplicant again.

net.wlp1s0      |

net.wlp1s0      |wlp1s0: CTRL-EVENT-DSCP-POLICY clear_all

net.wlp1s0      |wlp1s0: CTRL-EVENT-DSCP-POLICY clear_all

net.wlp1s0      |nl80211: deinit ifname=wlp1s0 disabled_11b_rates=0 

```

Removing the /run/wpa_supplicant/wlp1s0 file doesn't help

----------

## NeddySeagoon

sicr0,

```
wpa_supplicant  |Successfully initialized wpa_supplicant

dhcpcd          | * Starting DHCP Client Daemon ...

net.wlp1s0      | * Bringing up interface wlp1s0

net.wlp1s0      | *   Caching network module dependencies

net.wlp1s0      | *   Starting wpa_supplicant on wlp1s0 ...

net.wlp1s0      |Successfully initialized wpa_supplicant 
```

That reads as if you are starting wpa_supplicant twice, or maybe more times.

That doesn't work.

How many different network managers do you have installed?

You can install as many as you want but must only start at most one.

----------

## sicr0

I installed "wpa_supplicant", "wireless-tools", "netifrc" and "dhcpcd". I don't know really well what each one does, I just followed the Handbook and when it didn't worked I searched around for another solution. :'(

----------

## NeddySeagoon

sicr0,

What does 

```
rc-update -v show
```

output?

wpa_supplicant takes care of starting the encrypted part of the wireless session.

Once wpa_supplicant has done its thing, dhcpcd can configure the interface as if it were a wired interface.

netifrc is one of the interface management tools that can start both wpa_supplicant and dhcpcd if its configured to do so.

wireless-tools is mostly obsolete. It has some diagnostics tools, an can replace wpa_supplicant but only for open and wep encrypted networks.

What do you have in /etc/conf.d/net?

----------

## sicr0

The rc-update -v show output is:

```
               agetty |

               binfmt | boot

             bootlogd |

             bootmisc | boot

              cgroups |                                sysinit

          consolefont |

                 dcron|      default

                devfs |                                sysinit

               dhcpcd |      default

                dmesg |                                sysinit

                 fsck | boot

             hostname | boot

              hwclock | boot

            ip6tables |

             iptables |

              keymaps | boot

            killprocs |                        shutdown

    kmod-static-nodes |                                 sysinit

                local |      default nonetwork

           localmount | boot

             loopback | boot

              modules | boot

             mount-ro |                        shutdown

                 mtab | boot

           net-online |

               net.lo |

           net.wlp1s0 |      default

             netmount |      default

              numlock |

              osclock |

              pciparm |

               procfs | boot

           pydoc-3.10 |

            pydoc-3.9 |

                 root | boot

               rsyncd |

             runsvdir |

            s6-svscan |

         save-keymaps | boot

    save-termencoding | boot

            savecache |                        shutdown

                 sshd |

        stmpfiles-dev  |                                 sysinit

      stmpfiles-setup  | boot

                 swap | boot

              swclock |

               sysctl | boot

                sysfs |                                 sysinit

         termencoding | boot

                 udev |                                 sysinit

          udev-settle |

         udev-trigger |                                 sysinit

              urandom | boot

       wpa_supplicant |      default

```

My /etc/conf.d/net is:

```
modules="wpa_supplicant"

config_wlp1s0="dhcp"

routes_wlp1s0="default via 192.168.0.1"

```

Last edited by sicr0 on Fri Apr 01, 2022 2:54 am; edited 1 time in total

----------

## alamahant

 *Quote:*   

> 
> 
> I ran "rc-service wpa_supplicant stop", fine. Then "rc-service net.wlp1s0 start", everything good minus the last log:
> 
> Code:
> ...

 

Try "restart"ing it.

----------

## sicr0

Tried restarting it but it shows the same warning and ping says that the network is unreachable

----------

## NeddySeagoon

sicr0,

Stop the services dhcpcd, net.wlp1s0 and wpa_supplicant.

Now remove dhcpcd, and wpa_supplicant from the default runlevel.

wpa_supplicant is being started twice. Once by being in the default runlevel and once from your net file.

dhcpcd is started twice too but it can cope with that.

The net file entry 

```
routes_wlp1s0="default via 192.168.0.1" 
```

should not be required as dhcpcd will provide your default route.

However, if its the same as dhcpcd provides, its harmless.

If you have two different defaut routs, that's a problem.

Now start net.wlp1s0 to test.

Both wpa_supplicant and dhcpcd will be started as required by your net file. It might work too. 

binfmt is a security risk. It needs kernel support to actually make it do anything so it should be harmless but if you don't need it don't run it.

----------

## sicr0

I stopped the three services, the only one that wasn't running was net.wlp1s0. Then I removed dhcpcd and wpa_supplicant from the default runlevel. Finally I started net.wlp1s0.

I pinged but it didn't work.

After that I tried stopping again all the three services, and the only one that was running was net.wlp1s0.

Is that a clue maybe?

----------

## sicr0

I followed this post and deleted /etc/init.d/net.wlp1s0 and now rc-service doesn't find the service. What I should do? I f- up?

----------

## NeddySeagoon

sicr0,

Put it back :)

There are several network managers in Gentoo. You may only use one at a time or they fight and none of them will work.

You are using net-misc/netifrc. That needs the symbolic link to net.wlp1s0 to know to start the interface and a correct net file to know how to start it.

----------

## alamahant

```

ln -s  /etc/init.d/net.lo /etc/init.d/net.wlp1s0 

rc-service wpa_supplicant stop

rc-update delete wpa_supplicant default

rc-update add  net.wlp1s0  default

rc-service  net.wlp1s0 start ### or restart

```

If it still doesnt start its your kernel.

You might also need

linux-firmware 

emerged.

----------

## grknight

Alternatively, consider replacing wpa_supplicant with iwd:

```
emerge net-wireless/iwd

rc-service net.wlp1s0 stop

rc-service wpa_supplicant stop

rc-update del net.wlp1s0 default

rc-update del wpa_supplicant default

rc-update add iwd default

rc-update add dhcpcd default

rc-service iwd start

rc-service dhcpcd start
```

Then set the PSK and connect with:

```
# iwctl

[iwctl] station wlp1s0 connect "Fibertel WiFi608 2.4GHz"
```

iwd may need additional kernel bits turned on and will say at emerge time.

----------

## alamahant

Ok you are right.

I have been trying for the last two hours to get my net.wlan0 to start with wpa_supplicant.

Totally unsuccessfully.

I get exactly the same error as you.

I tried with myriads configs in wpa_supplicant.conf and none works.

I tend to think that wpa_supplicant is stupid.

Mean.

Exasperating.

I suppose you should look at your router page and try to reproduce the settings in the above file.

Things like

```

Authentication Type

WPA Encryption Algorithm

etc

```

Plz have a look at

```

man wpa_supplicant.conf

```

for config examples.

I feel so relieved I am only using ethernet.

If I needed wifi @boot i would use NM applet or nmcli.I know I know NM uses wpa_supplicant under the hood but somehow it gets the work done.

Mind you I have a full kernel and linux-firmware installed.

 :Smile: 

----------

## sicr0

Update: after trying to install iwd following the guide, now when I run ifconfig wlp1s0 dissapeared. I'm on the Kernel & Hadware section trying to fix that eheh (I hate life)

----------

## NeddySeagoon

sicr0,

You are gaining experience.

That's what you get just after you needed it. :)

It you want some help, tell us ...

What you did

What happened

What you expected to happen

Quote (vebatim) any error messages.

----------

## sicr0

Thanks man, I really lost a lot of motivation there ahah

I booted the Live USB and chroot-ed to emerge the iwd package (using net-setup is the only way I have to connect to internet). Then I followed this Handbook page and activated all the necessary kernel modules. After installing and rebooting I saw that running ifconfig would only show the "lo" interface. Basically I have no other interface for some unknown reason

This is the .config, I guess it has to be something related to the kernel since it was the thing I had to change but I don't really know what I did wrong: https://pastebin.com/4NfyEuX9

----------

## sicr0

I'm considering maybe reinstalling it all and trying from zero with utmost caution and with the Forum support to avoid screwing it up this bad again. Maybe it's more feasible

----------

## sicr0

Guys, where back at it. I didn't knew that after modifying the kernel I had to regenerate GRUB  :Wink: 

----------

## sicr0

grknight, thanks, now with iwd it all works fine. Also thanks NeddySeagoon for the patience and help

----------

