Using iwd to manage your wireless network on Ubuntu 20.04

Advertisement

Canonical recently posted a thread on their official forum looking for testers to see whether iwd can replace wpa_supplicant for wireless network management.

photo_2020-08-19_12-00-31.jpg

Advertisement

iwd is Intel’s kernel-based wireless network management. It comes with a bunch of advantages, mostly around performance and speed — which figures, since it lives at the kernel level. Per Canonical’s post, we can join the testing and see how it goes:

First, install iwd itself:

sudo apt install iwd

Then edit NetworkManager’s config file to swap in iwd as the new backend. The file is empty after you open it, so just add the new content:

sudo gedit /etc/NetworkManager/conf.d/iwd.conf

Add:

[device]
wifi.backend=iwd

Next, mask the original network manager, wpa_supplicant, and reboot.

sudo systemctl mask wpa_supplicant
sudo reboot

After the reboot you’re in the test. Your wireless management is now running on iwd as the backend. I figure the fancy Arch types have been doing this for ages, but us lowly Ubuntu + GNOME Shell users with no right to breathe can tag along too.


That said, you’ll generally run into a few problems. Let’s go through them:

After rebooting, the Wi-Fi network list is empty and no networks can be found

This is something Canonical explicitly mentions in the test docs. Except they say “there’s a chance the iwd service fails to start on each boot” — and it’s not “a chance” at all, it’s every single time. Canonical’s fix is to restart the iwd service, but…

I can’t fucking reboot every single time I turn on my machine!

Did some digging and found this is an old problem:

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/101

Roughly, NetworkManager doesn’t pull iwd up with it when it starts — the two aren’t tightly coupled. The thread ran for nearly a year with no result, and the final answer is to just let the iwd service run on its own.

sudo systemctl enable iwd.service

Works fine on my end. No idea whether it has any other side effects, though.


The iwd version is ancient — the latest is already 1.8

iwd’s dependencies seem pretty loose, so you can just pull the newer version from the Ubuntu 20.10 repos and install it.

https://launchpad.net/ubuntu/+source/iwd


After enabling iwd, my Wi-Fi reconnects and every network name has a “1” appended

That’s normal. Just delete the ones with the 1 and reconnect.


How do I disable iwd and go back to the original wpa_supplicant?

sudo rm /etc/NetworkManager/conf.d/iwd.conf
sudo apt remove iwd
sudo systemctl unmask wpa_supplicant
sudo reboot

If you’re an Ubuntu user with feedback, please reply in Canonical’s thread:

https://discourse.ubuntu.com/t/call-for-testing-improved-wifi-via-iwd/

Discuss this post on plumz.me

Comments are hosted on the Chinese main site. This mirror is read-only.

Table of Contents