3
I have a NixOS system (nixos https://nixos.org/channels/nixos-18.03). Using wpa_supplicant
, I can't get my wireless card to connect to my home network (WPA2).
It's using the new Systemd Predictable Network Interface Names scheme (wlp2s0
replaces wlan0
).
A) Following NixOS Manual / 11.6 Wireless Networks, I set a WPA sid and passphrase.
$ wpa_passphrase ESSID PSK > /etc/wpa_supplicant.conf
$ systemctl restart wpa_supplicant.service
The wpa_supplicant
module can be either active
$ systemctl status wpa_supplicant
● wpa_supplicant.service - WPA Supplicant
Loaded: loaded (/nix/store/fw6xw11p5nprhbchdgapj54js84zk97l-unit-wpa_supplicant.service/wpa_supplicant.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2019-03-09 14:40:43 EST; 1min 11s ago
Main PID: 800 (wpa_supplicant)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/wpa_supplicant.service
└─800 wpa_supplicant -s -u -Dnl80211,wext -c /etc/wpa_supplicant.conf -iwlp2s0
Mar 09 14:40:43 nixos systemd[1]: Started WPA Supplicant.
Mar 09 14:40:48 nixos wpa_supplicant[800]: Successfully initialized wpa_supplicant
Or loaded, but inactive.
$ systemctl status wpa_supplicant
● wpa_supplicant.service - WPA Supplicant
Loaded: loaded (/nix/store/fw6xw11p5nprhbchdgapj54js84zk97l-unit-wpa_supplicant.service/wpa_supplicant.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Sat 2019-03-09 12:04:11 EST; 2h 30min ago
Process: 2017 ExecStart=/nix/store/77cvdnjyb1djvirr61591ipgnm6nx9mx-unit-script/bin/wpa_supplicant-start (code=exited, status=0/SUCCESS)
Main PID: 2017 (code=exited, status=0/SUCCESS)
Mar 09 11:59:03 nixos systemd[1]: Started WPA Supplicant.
Mar 09 11:59:03 nixos wpa_supplicant[2017]: Successfully initialized wpa_supplicant
Mar 09 12:04:11 nixos wpa_supplicant[2017]: nl80211: Failed to open /proc/sys/net/ipv4/conf/p2p-dev-wlp2s0/drop_unicast_in_l2_multicast: No such file or directo>
Mar 09 12:04:11 nixos wpa_supplicant[2017]: nl80211: Failed to set IPv4 unicast in multicast filter
Mar 09 12:04:11 nixos wpa_supplicant[2017]: nl80211: Failed to open /proc/sys/net/ipv4/conf/p2p-dev-wlp2s0/drop_unicast_in_l2_multicast: No such file or directo>
Mar 09 12:04:11 nixos wpa_supplicant[2017]: nl80211: Failed to set IPv4 unicast in multicast filter
Mar 09 12:04:11 nixos wpa_supplicant[2017]: nl80211: deinit ifname=p2p-dev-wlp2s0 disabled_11b_rates=0
Mar 09 12:04:11 nixos wpa_supplicant[2017]: p2p-dev-wlp2s0: CTRL-EVENT-TERMINATING
Mar 09 12:04:11 nixos wpa_supplicant[2017]: nl80211: deinit ifname=wlp2s0 disabled_11b_rates=0
Mar 09 12:04:11 nixos wpa_supplicant[2017]: wlp2s0: CTRL-EVENT-TERMINATING
Either way, I still can't ping a web address.
$ iwconfig
lo no wireless extensions.
wlp2s0 IEEE 802.11 ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=0 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:on
enp0s20f0u2 no wireless extensions.
enp0s31f6 no wireless extensions.
B) I also played around with manually setting the SSID and passphrase. But no dice.
$ iwlist wlp2s0 scan
$ iwconfig wlp2s0 essid <mysid> key s:<mypassphrase>
C) I dug around the internets, and found people with similar issues. But those solutions don't work for me (bring down, flush, up wlp2s0, rebind with wpa_supplicant).
$ ip link set dev wlp2s0 down
$ ip addr flush dev wlp2s0
$ ip link set dev wlp2s0 up
$ wpa_supplicant -B -i wlp2s0 -c /etc/wpa_supplicant.conf
Successfully initialized wpa_supplicant
nl80211: Could not set interface 'p2p-dev-wlp2s0' UP
nl80211: deinit ifname=p2p-dev-wlp2s0 disabled_11b_rates=0
p2p-dev-wlp2s0: Failed to initialize driver interface
P2P: Failed to enable P2P Device interface
Did you ever get this resolved @Nutritioustim? – tcelferact – 2019-10-20T15:29:41.410
1@tcelferact In this particular case, I had to buy a different router (unrelated issue). Turns out that the new router works fine with my NixOS box. I'm sure there was an underlying issue there. But I never pursued it after that. – Nutritioustim – 2019-10-23T14:12:50.130