wpa_supplicant's control socket disappears after suspend (regression?)
Andrew Shadura
andrew at shadura.me
Wed Nov 16 12:55:41 PST 2016
Hello,
Shortly after wpa_supplicant 2.6 was released, I uploaded it to Debian
experimental and started using it on my work machine (which runs
Ubuntu). I soon noticed I often have no wireless connection upon resume
from suspend, much more often than what I had with either 2.4 or 2.5.
Also, previously wpa_cli scan would reconnect to the network, now it
fails to talk to wpa_supplicant:
Could not connect to wpa_supplicant: (nil) - re-trying
Restarting both wpa_supplicant and network manager often helps, but
drives nm-applet crazy for some reason, and I have to restart it. Until
I restart NM, the interface shows as unmanaged in the applet's menu.
I attempted to run wpa_supplicant manually using the command line from
its .service file and use wpa_cli, and found out it stopped creating the
control socket.
In Debian, we use the following patch by Kel Modderman:
https://sources.debian.net/src/wpa/2.6-1/debian/patches/07_dbus_service_syslog.patch/
Unfortunately, when I prepared 2.6-1 upload, I dropped the description
by mistake, here is it:
Description: Tweak D-Bus/systemd service activation configuration files:
* log wpa_supplicant messages to syslog
* activate control socket interface so that wpa_cli can be used by
D-Bus activated wpa_supplicant daemon
I ran wpa_supplicant with this command line and a couple of -d appended,
attempted wpa_cli again, and again it failed, as there was nothing at
/run/wpa_supplicant.
Then I restarted network-manager and saw this in the logs:
Nov 16 10:16:46 nuevo NetworkManager[20514]: <debug> [1479287806.1988]
supplicant: (wlan0): creating new supplicant interface
Nov 16 10:16:46 nuevo kernel: IPv6: ADDRCONF(NETDEV_UP): wlan0: link is
not ready
Nov 16 10:16:46 nuevo wpa_supplicant[20507]: dbus:
org.freedesktop.DBus.Properties.GetAll (/fi/w1/wpa_supplicant1) [s]
Nov 16 10:16:46 nuevo NetworkManager[20514]: <info> [1479287806.2739]
supplicant: wpa_supplicant running
Nov 16 10:16:46 nuevo NetworkManager[20514]: <debug> [1479287806.2740]
sup-iface[0x18b18c0,wlan0]: adding interface to supplicant
Nov 16 10:16:46 nuevo NetworkManager[20514]: <info> [1479287806.2740]
device (wlan0): supplicant interface state: init -> starting
Nov 16 10:16:46 nuevo NetworkManager[20514]: <debug> [1479287806.2740]
supplicant: AP mode is supported
Nov 16 10:16:46 nuevo NetworkManager[20514]: <debug> [1479287806.2741]
supplicant: EAP-FAST is not supported
Nov 16 10:16:46 nuevo wpa_supplicant[20507]: dbus:
fi.w1.wpa_supplicant1.CreateInterface (/fi/w1/wpa_supplicant1) [a{sv}]
Nov 16 10:16:46 nuevo wpa_supplicant[20507]: wpa_dbus_dict_open_read:
start reading a dict entry
Nov 16 10:16:46 nuevo wpa_supplicant[20507]: wpa_dbus_dict_get_entry:
dict entry key: Driver
Nov 16 10:16:46 nuevo wpa_supplicant[20507]: wpa_dbus_dict_get_entry:
dict entry variant content type: s
Nov 16 10:16:46 nuevo wpa_supplicant[20507]:
_wpa_dbus_dict_fill_value_from_variant: string value: [omitted]
Nov 16 10:16:46 nuevo wpa_supplicant[20507]: wpa_dbus_dict_get_entry:
dict entry key: Ifname
Nov 16 10:16:46 nuevo wpa_supplicant[20507]: wpa_dbus_dict_get_entry:
dict entry variant content type: s
Nov 16 10:16:46 nuevo wpa_supplicant[20507]:
_wpa_dbus_dict_fill_value_from_variant: string value: [omitted]
Nov 16 10:16:46 nuevo wpa_supplicant[20507]: Override interface
parameter: ctrl_interface ('(null)' -> '/run/wpa_supplicant')
Nov 16 10:16:46 nuevo wpa_supplicant[20507]: Initializing interface
'wlan0' conf 'N/A' driver 'nl80211,wext' ctrl_interface
'/run/wpa_supplicant' bridge 'N/A'
(the full unwrapped log is in the attachment)
So somehow NM enables the control socket, but until NM prods
wpa_supplicant in some magic way, wpa_supplicant doesn't think it's
necessary to create it.
Are we doing something wrong in Debian, am I doing something wrong when
investigating, or is it a regression?
Thanks in advance.
--
Cheers,
Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wpa.log
Type: text/x-log
Size: 22462 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/hostap/attachments/20161116/c0cc3d2e/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/hostap/attachments/20161116/c0cc3d2e/attachment-0001.sig>
More information about the Hostap
mailing list