You are not logged in.

#1 2016-06-28 18:19:03

linux_dream
Member
Registered: 2015-05-17
Posts: 45

Unable to set up wifi via systemd-networkd

Hello people,
I used to have nm-applet to manage my internet connection and both ethernet and wifi were working. Today I decided to remove it and use systemd-networkd instead.
So far I haven't been able to make Wifi work, although ethernet works fine.
I've followed https://wiki.archlinux.org/index.php/Wi … figuration, namely I have activated both systemd-networkd.service and systemd-resolved.service. I also created the symlink ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf.
I've also created the file /etc/systemd/network/wired.network with

[Match]
Name=enp1s0

[Network]
DHCP=ipv4

[DHCP]
RouteMetric=10

and /etc/systemd/network/wireless.network with

[Match]
Name=wlp2s0f0

[Network]
DHCP=ipv4

[DHCP]
RouteMetric=20

which should make ethernet working by default unless I unplug the cable from which Wifi should take over. However if I unplug the ethernet cable, Wifi is not started.
In fact,

sudo ip link set wlp2s0f0 up

yields

RTNETLINK answers: Input/output

error.

I did create the wpa_supplicant service with the SSID and passphrase.
Also, now dmesg is continuously spammed with errors related to wifi:

[  101.472404] ieee80211 phy0: rt2800_wait_wpdma_ready: Error - WPDMA TX/RX busy [0x00000068]
[  102.807887] ieee80211 phy0: rt2800_wait_wpdma_ready: Error - WPDMA TX/RX busy [0x00000068]
[  102.807916] ieee80211 phy0: rt2800pci_set_device_state: Error - Device failed to enter state 4 (-5)
[  344.036219] ieee80211 phy0: rt2800_wait_wpdma_ready: Error - WPDMA TX/RX busy [0x00000068]
[  345.371691] ieee80211 phy0: rt2800_wait_wpdma_ready: Error - WPDMA TX/RX busy [0x00000068]
[  345.371720] ieee80211 phy0: rt2800pci_set_device_state: Error - Device failed to enter state 4 (-5)
[ 1213.191216] ieee80211 phy0: rt2800_wait_wpdma_ready: Error - WPDMA TX/RX busy [0x00000068]
[ 1214.526637] ieee80211 phy0: rt2800_wait_wpdma_ready: Error - WPDMA TX/RX busy [0x00000068]
[ 1214.526666] ieee80211 phy0: rt2800pci_set_device_state: Error - Device failed to enter state 4 (-5)
[ 1354.115058] ieee80211 phy0: rt2800_wait_wpdma_ready: Error - WPDMA TX/RX busy [0x00000068]
[ 1355.450526] ieee80211 phy0: rt2800_wait_wpdma_ready: Error - WPDMA TX/RX busy [0x00000068]
[ 1355.450555] ieee80211 phy0: rt2800pci_set_device_state: Error - Device failed to enter state 4 (-5)
[ 1392.228956] ieee80211 phy0: rt2800_wait_wpdma_ready: Error - WPDMA TX/RX busy [0x00000068]
[ 1393.564337] ieee80211 phy0: rt2800_wait_wpdma_ready: Error - WPDMA TX/RX busy [0x00000068]
[ 1393.564365] ieee80211 phy0: rt2800pci_set_device_state: Error - Device failed to enter state 4 (-5)
[ 1719.612032] ieee80211 phy0: rt2800_wait_wpdma_ready: Error - WPDMA TX/RX busy [0x00000068]
[ 1720.957472] ieee80211 phy0: rt2800_wait_wpdma_ready: Error - WPDMA TX/RX busy [0x00000068]
[ 1720.957501] ieee80211 phy0: rt2800pci_set_device_state: Error - Device failed to enter state 4 (-5)
[ 2337.619933] ieee80211 phy0: rt2800_wait_wpdma_ready: Error - WPDMA TX/RX busy [0x00000068]
[ 2338.955183] ieee80211 phy0: rt2800_wait_wpdma_ready: Error - WPDMA TX/RX busy [0x00000068]
[ 2338.955211] ieee80211 phy0: rt2800pci_set_device_state: Error - Device failed to enter state 4 (-5)
[ 2685.605478] hrtimer: interrupt took 23460 ns

Any help is greatly appreciated.

Last edited by linux_dream (2016-06-28 18:20:04)

Offline

#2 2016-06-28 19:20:14

\hbar
Member
Registered: 2014-03-15
Posts: 165

Re: Unable to set up wifi via systemd-networkd

Offline

#3 2016-06-28 19:26:35

linux_dream
Member
Registered: 2015-05-17
Posts: 45

Re: Unable to set up wifi via systemd-networkd

Yes. As I said above

I did create the wpa_supplicant service with the SSID and passphrase.

.
Here's the command I used:

sudo wpa_passphrase connection_name pass_phrase

where of course connection_name and pass_phrase are the correct ones.

Maybe I should also mention that I tried the command (as stated in the wiki):

wpa_supplicant -B -i wlp2s0f0 -c <(wpa_passphrase connection_name pass_phrase)
Successfully initialized wpa_supplicant
Could not set interface wlp2s0f0 flags (UP): Input/output error
nl80211: Could not set interface 'wlp2s0f0' UP
nl80211: deinit ifname=wlp2s0f0 disabled_11b_rates=0
wlp2s0f0: Failed to initialize driver interface

Offline

#4 2016-06-28 21:31:12

\hbar
Member
Registered: 2014-03-15
Posts: 165

Re: Unable to set up wifi via systemd-networkd

linux_dream wrote:
Could not set interface wlp2s0f0 flags (UP): Input/output error

That looks like a driver issue. You said everything worked fine using network manager?

Is there an alternate driver you could try?

Offline

#5 2016-06-28 21:48:48

fmscott1
Member
Registered: 2012-03-10
Posts: 6

Re: Unable to set up wifi via systemd-networkd

linux_dream wrote:

Yes. As I said above

I did create the wpa_supplicant service with the SSID and passphrase.

.
Here's the command I used:

sudo wpa_passphrase connection_name pass_phrase

where of course connection_name and pass_phrase are the correct ones.

Did  you enable  and  start  the service?

 sudo wpa_passphrase <ESSID> <passphrase>  >> /etc/wpa_supplicant/wpa_supplicant-wlp2s0f0.conf
 sudo systemctl enable wpa_supplicant@wlp2s0f0.service
 sudo systemctl start wpa_supplicant@wlp2s0f0.service 

It  may  also  be  a  driver  issue.

Last edited by fmscott1 (2016-06-28 22:32:42)

Offline

#6 2016-06-28 22:40:38

linux_dream
Member
Registered: 2015-05-17
Posts: 45

Re: Unable to set up wifi via systemd-networkd

@fmscott1 yes I did start the service. I'm not sure about driver issue because according to the wiki, a driver issue would have yielded something like

SIOCSIFFLAGS: No such file or directory

for the command

sudo ip link set wlp2s0f0 up

which is not what I got. I googled my error message and apparently many people had it though I didn't see any solution to the problem. I really don't know what nm-applet does that I can't seem to do by hand.

\hbar wrote:
linux_dream wrote:
Could not set interface wlp2s0f0 flags (UP): Input/output error

That looks like a driver issue. You said everything worked fine using network manager?

Is there an alternate driver you could try?

Last edited by linux_dream (2016-06-28 22:41:24)

Offline

#7 2016-06-28 23:36:44

\hbar
Member
Registered: 2014-03-15
Posts: 165

Re: Unable to set up wifi via systemd-networkd

You could try to run networkmanager in debug mode, and go through the logs to see if you find a hint about what it's doing differently.

Offline

#8 2016-06-29 12:58:07

linux_dream
Member
Registered: 2015-05-17
Posts: 45

Re: Unable to set up wifi via systemd-networkd

\hbar wrote:

You could try to run networkmanager in debug mode, and go through the logs to see if you find a hint about what it's doing differently.

I'm only a "beginner", this seems rather complicated if I don't have a documentation to follow.
Also, I think I'd have to delete all the files I created for systemd-networkd as well as removing the symlink and disable the systemd services involved, due to compatibility issues with NetworkManager.

Offline

#9 2016-06-29 17:10:58

\hbar
Member
Registered: 2014-03-15
Posts: 165

Re: Unable to set up wifi via systemd-networkd

You just need to stop (and disable, if you want the change to be persistent over reboots) the systemd services. No need to delete anything. It should be as simple as

systemctl stop wpa_supplicant@wlp2s0f0.service
systemctl stop systemd-networkd.service
networkmanager --log-level=DEBUG --no-daemon
nmcli dev wifi connect <name> password <password>

and see if you see anything interesting.

Offline

#10 2016-06-29 17:13:36

linux_dream
Member
Registered: 2015-05-17
Posts: 45

Re: Unable to set up wifi via systemd-networkd

\hbar wrote:

You just need to stop (and disable, if you want the change to be persistent over reboots) the systemd services. No need to delete anything. It should be as simple as

systemctl stop wpa_supplicant@wlp2s0f0.service
systemctl stop systemd-networkd.service
networkmanager --log-level=DEBUG --no-daemon
nmcli dev wifi connect <name> password <password>

and see if you see anything interesting.

I see, thanks a lot. I do need to reinstall NetworkManager though, as well as nm-applet? Or just NetworkManager?

Edit: I also need to disable systemd-resolved.service, right?

Last edited by linux_dream (2016-06-29 17:16:16)

Offline

#11 2016-06-29 20:30:34

\hbar
Member
Registered: 2014-03-15
Posts: 165

Re: Unable to set up wifi via systemd-networkd

linux_dream wrote:

I also need to disable systemd-resolved.service, right?

Right.

You don't need nm-applet, but you can install it if you want (e.g. if you want to use it instead of nmcli).

Offline

#12 2016-06-30 01:19:36

linux_dream
Member
Registered: 2015-05-17
Posts: 45

Re: Unable to set up wifi via systemd-networkd

\hbar wrote:
linux_dream wrote:

I also need to disable systemd-resolved.service, right?

Right.

You don't need nm-applet, but you can install it if you want (e.g. if you want to use it instead of nmcli).

The debug thing doesn't return anything.
However running the command

nmcli dev wifi connect 'abc def' password xxxxxx
Error: No network with SSID 'abc def' found.

But I've checked with my cell phone and 'abc def' seems to be the correct name...

Offline

#13 2016-06-30 01:26:14

linux_dream
Member
Registered: 2015-05-17
Posts: 45

Re: Unable to set up wifi via systemd-networkd

Hold on. I removed NetworkManager once again and restarted the whole services. I noticed that I had made a mistake in the "connection name" part. I had didn't see the 'abc' in 'abc def'.
I'm still unable to make wifi work, but at least now the command

sudo ip link set wlp2s0f0 up

does not return any error!
I'm wondering what's left to make wifi work.

Offline

#14 2016-06-30 13:43:37

linux_dream
Member
Registered: 2015-05-17
Posts: 45

Re: Unable to set up wifi via systemd-networkd

I've finally solved the mystery and the problem (thanks to the help I received on IRC). Apparently I had a faulty wpa_supplicant.conf file, I used the default one instead of creating it myself. So I followed the wiki to set up a connection with wpa_cli, and this worked!
Great, thanks for all!!! Problem solved.

Offline

Board footer

Powered by FluxBB