Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] net.wlp1s0 would not start
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
sicr0
Apprentice
Apprentice


Joined: 23 Mar 2022
Posts: 179

PostPosted: Thu Mar 31, 2022 4:25 pm    Post subject: [SOLVED] net.wlp1s0 would not start Reply with quote

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:
Code:
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:
Code:
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:
Code:
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 networking


Last edited by sicr0 on Sun Apr 03, 2022 5:49 am; edited 1 time in total
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3875

PostPosted: Thu Mar 31, 2022 5:42 pm    Post subject: Reply with quote

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
Code:

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
Code:

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

_________________
:)
Back to top
View user's profile Send private message
sicr0
Apprentice
Apprentice


Joined: 23 Mar 2022
Posts: 179

PostPosted: Thu Mar 31, 2022 7:09 pm    Post subject: Reply with quote

I ran "rc-service wpa_supplicant stop", fine. Then "rc-service net.wlp1s0 start", everything good minus the last log:
Code:
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:
Code:
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
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54099
Location: 56N 3W

PostPosted: Thu Mar 31, 2022 7:29 pm    Post subject: Reply with quote

sicr0,

Code:
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.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
sicr0
Apprentice
Apprentice


Joined: 23 Mar 2022
Posts: 179

PostPosted: Thu Mar 31, 2022 7:39 pm    Post subject: Reply with quote

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. :'(
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54099
Location: 56N 3W

PostPosted: Thu Mar 31, 2022 8:01 pm    Post subject: Reply with quote

sicr0,

What does
Code:
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?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
sicr0
Apprentice
Apprentice


Joined: 23 Mar 2022
Posts: 179

PostPosted: Thu Mar 31, 2022 8:39 pm    Post subject: Reply with quote

The rc-update -v show output is:
Code:
               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:
Code:
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
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3875

PostPosted: Thu Mar 31, 2022 8:56 pm    Post subject: Reply with quote

Quote:

I ran "rc-service wpa_supplicant stop", fine. Then "rc-service net.wlp1s0 start", everything good minus the last log:
Code:
net.wlp1s0 | * WARNING: net.wlp1s0 has started, but is inactive

Try "restart"ing it.
_________________
:)
Back to top
View user's profile Send private message
sicr0
Apprentice
Apprentice


Joined: 23 Mar 2022
Posts: 179

PostPosted: Thu Mar 31, 2022 9:08 pm    Post subject: Reply with quote

Tried restarting it but it shows the same warning and ping says that the network is unreachable
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54099
Location: 56N 3W

PostPosted: Thu Mar 31, 2022 9:37 pm    Post subject: Reply with quote

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
Code:
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.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
sicr0
Apprentice
Apprentice


Joined: 23 Mar 2022
Posts: 179

PostPosted: Fri Apr 01, 2022 3:01 am    Post subject: Reply with quote

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


Joined: 23 Mar 2022
Posts: 179

PostPosted: Fri Apr 01, 2022 3:07 am    Post subject: Reply with quote

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


Joined: 05 Jul 2003
Posts: 54099
Location: 56N 3W

PostPosted: Fri Apr 01, 2022 10:48 am    Post subject: Reply with quote

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.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3875

PostPosted: Fri Apr 01, 2022 4:14 pm    Post subject: Reply with quote

Code:

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.
_________________
:)
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1588

PostPosted: Fri Apr 01, 2022 4:30 pm    Post subject: Reply with quote

Alternatively, consider replacing wpa_supplicant with iwd:

Code:
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:
Code:
# iwctl
[iwctl] station wlp1s0 connect "Fibertel WiFi608 2.4GHz"


iwd may need additional kernel bits turned on and will say at emerge time.
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3875

PostPosted: Fri Apr 01, 2022 7:51 pm    Post subject: Reply with quote

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
Code:

Authentication Type
WPA Encryption Algorithm
etc

Plz have a look at
Code:

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.
:)
_________________
:)
Back to top
View user's profile Send private message
sicr0
Apprentice
Apprentice


Joined: 23 Mar 2022
Posts: 179

PostPosted: Sat Apr 02, 2022 5:26 pm    Post subject: Reply with quote

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)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54099
Location: 56N 3W

PostPosted: Sat Apr 02, 2022 6:47 pm    Post subject: Reply with quote

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.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
sicr0
Apprentice
Apprentice


Joined: 23 Mar 2022
Posts: 179

PostPosted: Sat Apr 02, 2022 10:36 pm    Post subject: Reply with quote

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


Joined: 23 Mar 2022
Posts: 179

PostPosted: Sun Apr 03, 2022 1:59 am    Post subject: Reply with quote

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


Joined: 23 Mar 2022
Posts: 179

PostPosted: Sun Apr 03, 2022 5:35 am    Post subject: Reply with quote

Guys, where back at it. I didn't knew that after modifying the kernel I had to regenerate GRUB ;)
Back to top
View user's profile Send private message
sicr0
Apprentice
Apprentice


Joined: 23 Mar 2022
Posts: 179

PostPosted: Sun Apr 03, 2022 5:49 am    Post subject: Reply with quote

grknight, thanks, now with iwd it all works fine. Also thanks NeddySeagoon for the patience and help
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