Warning
While iwd is not really new, there will be reasons why it is still not the default.
Personally I had login issues with KDE Plasma and needed to switch back to
wpa_supplicant
.There seem to be issues in combination with NetworkManager.
Always have a backup!
iwd
is a more modern replacement for wpa_supplicant
.
Pros
- smaller codebase, less “spaghetti code”
- more modern
- linux only, using kernel features instead of large userspace libraries
- very fast
- not dependent on systemd (unlike NetworkManager, while it can also be used with NetworkManager)
- WPS support
- fast hotspot and multiple-AP-networks support
Cons
- Some years ago eduroam did not work, seems to work now, Archwiki
- maybe some enterprise networks may still not work
Installation
To install it, you can just add a package.
dnf Fedora
run0 dnf install iwd
# to keep wpa_supplicant and just disable it:
systemctl disable --now wpa_supplicant
# to remove it (only do so when you are sure!)
run0 dnf remove wpa_supplicant
Atomic Desktops
# pinning the current image, so you always have a rollback option
run0 ostree admin pin 0
# replacing the packages
rpm-ostree --reboot override remove wpa_supplicant --install iwd
# if you want to keep wpa_supplicant and only disable it
rpm-ostree install iwd && \
systemctl disable --now wpa_supplicant && \
reboot
Enabling iwd
On Atomic Desktops after a reboot, on dnf Fedora after the package change, you will have no wireless internet connectivity.
iwd
needs to be enabled with systemd.
Adding this override config makes NetworkManager use iwd instead:
run0
# creating the override file
mkdir -Z /etc/NetworkManager/conf.d
cat > /etc/NetworkManager/conf.d/iwd.conf <<EOF
[device]
wifi.backend=iwd
EOF
# fixing the SELinux labels
restorecon -R /etc/NetworkManager
# if this does not work
chcon -R system_u:object_r:NetworkManager_etc_t:s0 /etc/NetworkManager/conf.d
# enabling the iwd service
# this is recommended against on the Arch wiki, NetworkManager might start iwd on its own
# systemctl enable --now iwd
# reloading NetworkManager
systemctl restart NetworkManager
Experience
I noticed a good speed increase and no problems to connect with various networks.
Passwords need to be entered again, there will me a way to autimatically convert the entries.
Nieche enterprise networks may cause problems, keep that in mind. But overall, iwd
should even support more modern use cases.
Configuration tools
As iwd
relies on NetworkManager to work in the GUIs of KDE, GNOME and other desktops, there are some tools you may want to use, when using it standalone.
- the
iwctl
command line interface - impala, a iwd TUI, an interactive terminal user interface (Rust)
- iwgtk, a GTK app to configure iwd (C)
- iwmenu window manager menu integration for Rofi, Wofi, Fuzzel and dmenu (Rust)
Revert to wpa_supplicant
To revert back, you dont need to uninstall iwd but can. You need to reinstall wpa_supplicant, so it is best to not remove it.
On atomic desktops you can roll back to the deployment that you pinned
rpm-ostree status
# deployments are listed from 0 (latest) to 1,2,3... , example: one pinned, 2 normal
rpm-ostree rollback 2
Disable iwd and enable wpa_supplicant
systemctl disable iwd
systemctl enable --now wpa_supplicant
Change the config, you can just rename the override one
run0 mv /etc/NetworkManager/conf.d/iwd.conf /etc/NetworkManager/conf.d/iwd.conf.disabled
Reload Network Manager
systemctl restart NetworkManager