iwd: wireless daemon for Linux

Tolkem

Well-Known Member
Credits
6,389
Hi everyone! Hope you're all having a nice life! :)

I recently learned about this new tool to control, configure, manage and use wireless networks.
iNet Wireless Daemon (iwd) project aims to provide a comprehensive Wi-Fi connectivity solution for Linux based devices. The core goal of the project is to optimize resource utilization: storage, runtime memory and link-time costs. This is accomplished by not depending on any external libraries and utilizes features provided by the Linux Kernel to the maximum extent possible. The result is a self-contained environment that only depends on the Linux Kernel and the runtime C library.
I installed it and must say it's working really great; my Wi-Fi seems to be more stable, keeping a constant down/up speed. To install in Debian/Ubuntu and derivatives, just launch a terminal and run
Code:
sudo apt-get install iwd
then follow instructions from Debian's wiki https://wiki.debian.org/NetworkManager/iwd It's also available in most distros too
https://pkgs.org/search/?q=iwd
https://repology.org/project/iwd/versions
so you should be able to install it using your distro's pkg manager, i.e. pacman, dnf, zypper, etc. For Gentoo users read here https://wiki.gentoo.org/wiki/Iwd
You might want to read here too:

https://packages.debian.org/buster/iwd
https://iwd.wiki.kernel.org/start
https://wiki.archlinux.org/title/Iwd
https://bbs.archlinux.org/viewtopic.php?id=237074
 


f33dm3bits

Gold Member
Gold Supporter
Credits
18,443
It would be interesting to hear from your experience what you think of iwd vs networkmanager vs systemd-networkd? I've been using networkmanager for a while and it works just fine for me so I see no reason to change. As they say in the IT world: "Don't fix what ain't broke".
 

Tolkem

Well-Known Member
Credits
6,389
Well, for starters, iwd is a "possible replacement" for wpa_supplicant in the future, serves as a backend for network manager. As for systemd-networkd, its man page states:
systemd-networkd is a system service that manages networks. It detects and configures network devices as they appear, as well as creating virtual network devices.
And Arch's wiki states:
In order to connect to a wireless network with systemd-networkd, a wireless adapter configured with another application such as wpa_supplicant or iwd is required.
So, there's currently no "vs" here, as they can work all together; iwd, network manager and systemd-networkd. You do need to disable wpa_supplicant, and yes, IMHO, iwd works better(so far) than wpa_supplicant. Check this video from iwd's devp
 

f33dm3bits

Gold Member
Gold Supporter
Credits
18,443
I did read that about systemd-networkd, maybe "vs" was not such a good wording, can you just share experiences of what you find of each since you have used all three now?
 

Tolkem

Well-Known Member
Credits
6,389
I did read that about systemd-networkd, maybe "vs" was not such a good wording, can you just share experiences of what you find of each since you have used all three now?
That "I used all three now" isn't actually very accurate ;) I've only used wpa_supplicant, that is, I've edited its config files to connect to a wireless. I'm using IWD via network manager, so nothing has changed there. I just checked(in Bullseye)and systemd-networkd isn't even active, so I can say much about it. One thing I can say, is that I think the mayor advantages of iwd might be seen and appreciated better in a command-line only context, as you can start it with iwctl and connect to a wireless network without having to manually edit config files like you'd have to with wpa_supplicant. For a desktop user, the mayor advantage is probably the fact that wpa_supplicant.service won't start at boot, thus reducing system's startup time. Also, I've noticed down/up speed are more stable; keeping a constant speed rate.
 

Lord Boltar

Well-Known Member
Credits
3,300
In Ubuntu based OS's 20.04 it's
Code:
sudo apt install iwd
NOTE: when I installed IWD it started on it's own I just typed in my WiFi password and it connected
Now you need to tell NetworkManager to use iwd for its backend. Open up /etc/NetworkManager/NetworkManager.conf in your favorite editor and add wifi.backend=iwd to the [device] section, giving you something like:
In my case I use mousepad
Code:
sudo mousepad /etc/NetworkManager/conf.d/iwd.conf
[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

[device]
wifi.scan-rand-mac-address=no
wifi.backend=iwd
Save and close

Now we need to disable wpa_supplicant and reboot:
Code:
sudo systemctl mask wpa_supplicant
Code:
sudo reboot
There maybe a timing issue where NetworkManager sometimes does not show any wireless networks after a reboot, you can restart iwd to make them re-appear: sudo systemctl restart iwd

NOTE: The above did not happen to me

NetworkManager will ask to resupply your WiFi credentials on first connection, in order to transfer them into iwd’s secret storage at /var/lib/iwd/, but after that you can just use NetworkManager as usual. Advanced settings can be configured via /etc/iwd/main.conf, but it should not be needed.
 
Last edited:

Tolkem

Well-Known Member
Credits
6,389
Before masking wpa_supplicant, just stop the service.
Code:
sudo systemctl stop wpa_supplicant.service
and stop NetworkManager.service too
Code:
sudo systemctl stop NetworkManager.service
make network manager use iwd as a backend, then restart NetworkManager.service
Code:
sudo systemctl restart NetworkManager.service
once you've made sure your wireless is working fine with iwd, then you may mask wpa_supplicant.service
Code:
sudo systemctl mask wpa_supplicant.service
If by any chance, your wireless doesn't work fine with iwd, revert everything; stop iwd.service and NetworkManager.service, then restart wpa_supplicant.service and NetworkManager.service. Finally, disable and mask iwd. There's no need to reboot, well I didn't have to. :)
 

Lord Boltar

Well-Known Member
Credits
3,300
Before masking wpa_supplicant, just stop the service.
Code:
sudo systemctl stop wpa_supplicant.service
and stop NetworkManager.service too
Code:
sudo systemctl stop NetworkManager.service
make network manager use iwd as a backend, then restart NetworkManager.service
Code:
sudo systemctl restart NetworkManager.service
once you've made sure your wireless is working fine with iwd, then you may mask wpa_supplicant.service
Code:
sudo systemctl mask wpa_supplicant.service
If by any chance, your wireless doesn't work fine with iwd, revert everything; stop iwd.service and NetworkManager.service, then restart wpa_supplicant.service and NetworkManager.service. Finally, disable and mask iwd. There's no need to reboot, well I didn't have to. :)
When I installed IWD i did not have to stop the service it automatically stopped upon IWD Install
 

Tolkem

Well-Known Member
Credits
6,389
When I installed IWD i did not have to stop the service it automatically stopped upon IWD Install
Since I followed Debian's wiki instructions, I don't know whether it did stop, so you might be right and there's no need to stop it, however, I installed iwd in openSUSE too, and I did have to stop it there, otherwise I could not use the wireless connection.
 

Tolkem

Well-Known Member
Credits
6,389
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Members online


Latest posts

Top