Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
wpa_supplicant trying to start wrong interface on boot
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
Splink
Apprentice
Apprentice


Joined: 09 Feb 2005
Posts: 295

PostPosted: Thu Apr 10, 2014 12:40 pm    Post subject: wpa_supplicant trying to start wrong interface on boot Reply with quote

Hello,

I recently did a new install and migrated to Systemd. Everything is fine, apart from one small glitch on boot.

When booting I get:

Code:
Apr 10 08:26:16 Asus wpa_supplicant[150]: Successfully initialized wpa_supplicant
Apr 10 08:26:16 Asus wpa_supplicant[150]: Could not read interface wlan0 flags: No such device
Apr 10 08:26:16 Asus wpa_supplicant[150]: WEXT: Could not set interface 'wlan0' UP
Apr 10 08:26:16 Asus wpa_supplicant[150]: wlan0: Failed to initialize driver interface
Apr 10 08:26:16 Asus systemd[1]: wpa_supplicant@wlan0.service: main process exited, code=exited, status=255/n/a
Apr 10 08:26:16 Asus systemd[1]: Unit wpa_supplicant@wlan0.service entered failed state.
Apr 10 08:26:17 Asus systemd[1]: Started WPA supplicant.


Although my interface config in conf.d/net is:

Code:

dns_domain_lo="homenetwork"
nis_domain_lo="home"
config_eth0="dhcp"
modules_wlp3s0=("wpa_supplicant dhclient")
iwconfig_wlp3s0+mode="Managed"
wpa_supplicant_wlp3s0="-Dnl80211 -c /etc/wpa_supplicant/wpa_supplicant.conf"
wpa_timeout_wlp3s0=30
config_wlp3s0="dhcp"


I am using Network Manager to start and my NetworkManager conf is:

Code:

[main]
plugins=keyfile

+dhcp=dhclient

[ifnet]
managed=true
auto_refresh=false





When the system boots, I run:

Code:

systemctl start wpa_supplicant@wlp3s0.service && dhclient -4 wlp3s0


And following this, everything works fine until the next reboot.

Am i right in guessing that Network Mangager initiating wpa_supplicant on boot is looking at the wrong interface? I need to change that to look at wlp3s0 instead of wlan0.
_________________
It said "Requires Windows XP or better"
So I installed gentoo.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7051
Location: almost Mile High in the USA

PostPosted: Thu Apr 10, 2014 2:39 pm    Post subject: Reply with quote

I'm a bit confused here, it looks like you have both openrc and networkmanager configs...
Unfortunately I don't know enough of NM to help but the easiest way is to use the NetworkManager applet/GUI config and set your wireless interface to be auto-connect and available to all users, this would be the "networkmanager" way...

NetworkManager will call wpa supplicant automatically for you too, so you don't need to explicitly start it.

If someone could detail how to do this on the CLI I'd be interested...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Splink
Apprentice
Apprentice


Joined: 09 Feb 2005
Posts: 295

PostPosted: Thu Apr 10, 2014 5:43 pm    Post subject: Reply with quote

Ahh I think you have pointed me to the problem here.

It looks like NetworkManager is not calling WPA correctly, although it says it starts ok.

Basically it runs through boot and Network Manager, WPA_Supplicant are enabled in the startup. Network Manager starts, but in iwconfig there is no SSID connecting.

Starting with commands brings the SSID up and connects with DHCP with no problems. This is a manual process though to failback on as Network Manager isnt doing anything.

Anyway, when I run nm-applet I now get

Code:
(nm-applet:30984): nm-applet-WARNING **: Failed to initialize D-Bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

(nm-applet:30984): GLib-GObject-CRITICAL **: Custom constructor for class NMApplet returned NULL (which is invalid).  Unable to remove object from construction_objects list, so memory was probably just leaked.  Please use GInitable instead.


So I think I will do some digging around about this as it looks like Network Manager cannot call dbus, although dbus is started in systemctl
Code:
dbus.service                 loaded active running   D-Bus System Message Bus


however in the journal its showing:

Code:
Apr 10 17:27:25 Asus dbus[157]: [system] Activating via systemd: service name='org.freedesktop.NetworkManager' unit='dbus-org.freedesktop.NetworkManager.service'
Apr 10 17:27:25 Asus dbus[157]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.NetworkManager.service': Unit dbus-org.freedesktop.NetworkManager.
Apr 10 17:27:25 Asus dbus-daemon[157]: dbus[157]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.NetworkManager.service': Unit dbus-org.freedeskt


So it looks like network cannot contact dbus because something is potentially missing.
_________________
It said "Requires Windows XP or better"
So I installed gentoo.
Back to top
View user's profile Send private message
Splink
Apprentice
Apprentice


Joined: 09 Feb 2005
Posts: 295

PostPosted: Thu Apr 10, 2014 6:47 pm    Post subject: Reply with quote

Right, I managed to get NetworkManager working however it is not allowing me to connect to any SSID at all. Anyway after a little bit of reseach, I am going to re-emerge a few things and then see if this fixes the problem.
_________________
It said "Requires Windows XP or better"
So I installed gentoo.
Back to top
View user's profile Send private message
Splink
Apprentice
Apprentice


Joined: 09 Feb 2005
Posts: 295

PostPosted: Thu Apr 10, 2014 8:29 pm    Post subject: Reply with quote

Nope its still broke.

NetworkManager is sending deauth beacons on wifi, so it keeps trying to rejoin, then disconnect then rejoin, then disconnect etc.

So ive checked if there is anything starting any networking interfaces and there is not, so disabling network manager and then going with my script on boot which works a treat.
_________________
It said "Requires Windows XP or better"
So I installed gentoo.
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