Iwd

iwd (iNet Wireless Daemon) is Article description::an up-and-coming wireless daemon for Linux. It is written by Intel and aims to replace wpa_supplicant. The core goal of the project is to optimize resource utilization.

Potential benefits of iwd include:
 * simplification of network management
 * faster network discovery
 * fast and reliable roaming
 * using less system resources
 * using features offered by the Linux kernel
 * support for enterprise security methods like EAP
 * support for kernel asymmetric key rings and Trusted Platform Modules (TPM)
 * support for multiple clients

Installation
Start with the instructions for WiFi, including the required device drivers and IEEE 802.11 support. Specifics for iwd are described below.

Kernel
Iwd requires the Linux kernel to have quite some options to be enabled. For systems running on a AMD64 architecture, or CPUs that support SSSE3 or X86_AES instructions some hardware acceleration can be achieved. The CPU_FLAGS_X86 utility can be used to check for support.

USE flags
Some packages are aware of the USE flag.

Emerge
Install the package:

Interface management
Starting with version 0.18, iwd is [//iwd.wiki.kernel.org/interface_lifecycle actively managing network interfaces]. On startup it may destroy an existing network interface and create a new one. The newly created interface will be configured optimally for iwd's use. This means that an interface that was detected by udev, and renamed to say  will be destroyed and a new one named for example   might be created. When iwd terminates it destroys the wireless interface it created.

It is possible to suppress this behavior by:
 * passing commandline options (+the the name of the phy) and  (+ the name of the interface) to the iwd daemon, or
 * configuring setting  to   in

It may also be necessary to prevent udev from renaming the interface.

In the remainder of this article, it is assumed that the wireless interface is named.

Iwd daemon configuration
Iwd keeps its main configuration file in. It is documented in the official [//git.kernel.org/pub/scm/network/wireless/iwd.git/tree/src/iwd.config.rst manual page].

OpenRC
Please make sure that is stopped prior to starting iwd:

Then start iwd, and add it to the default runlevel:

Systemd
Any active services should be stopped prior to starting the iwd service:

The iwd service can be started as per:

Network management
Be sure to heed the warning in the network management article about mixing and matching the different methods for network management.

Netifrc
netifrc is Gentoo's default method of managing networks. It doesn't officially support iwd as a backend yet, but it works, barring minor issues, see.

Enable iwd by editing file:

The debug parameters help to resolve the minor issues. When strange behavior is observed then please comment on and upload the syslog.

Netifrc will start iwd as needed, so no need for the iwd deamon to be started by OpenRC, instead create a symlink from to, and start the   service:

iwd native
As of version 0.19 iwd contains a DHCP client and can manage routes and DNS resolving. It requires the  USE flag to be enabled.

Edit as follows:

Where:
 * is required to activate the native network management
 * is optional and sets the route metric
 * is optional and can be used to configure a DNS manager like 'resolvconf' from or 'systemd'.

dhcpcd
Add dhcpcd to the default runlevel and start it up, next to the iwd service:

NetworkManager
NetworkManager has been supporting iwd backend since version 1.12. Verify the  USE flag is set:

Enable the iwd backend for WiFi devices as per upstream's instructions :

Starting with NetworkManager 1.30 it is possible to enable iwd-driven autoconnect logic instead of NetworkManager's.

Restart the NetworkManager service:

For OpenRC:

For systemd:

ConnMan
ConnMan supports iwd somewhat. Make sure to set the  USE flag and (re-)emerge:

ConnMan still relies on for scanning, but connecting via iwd is possible.

Client software
Iwd comes with a commandline interface called -  requires the client USE flag.

There are also a few graphical user interface based applications. These frontends communicate with iwd over D-Bus, and will not work with iwd versions without D-Bus.

Iwctl
is iwd's tool to control iwd. It supports both a command line interface and an interactive mode. A complete command line would be to see what adapters you might be able to use:

An interactive session of commands can be used to connect to a WiFi network access point. First check the status of the WiFi network interface, set it in scanning mode if needed, and then obtain the list of WiFi access points. Finally connect to the access point.

That last step would auto-generate the file.

Note that it is not possible to assign a priority to a network, instead iwd will prioritize networks based on:
 * signal strength level
 * security features
 * maximum rate
 * channel utilization
 * time since the last connect.

NetworkManager frontends
When using NetworkManager then or other [//en.wikipedia.org/wiki/NetworkManager#Graphical_front-ends_and_command_line_interfaces NetworkManager frontends] can be used as per normal to make connections.

Dedicated iwd clients
Currently two such clients are available:
 * : offering similar functionality as iwctl, and
 * [//gitlab.com/hfernh/iwdguihttps://gitlab.com/hfernh/iwdgui net-wireless/iwdgui]: a lightweight client just for connecting to a WiFi network. Iwdgui is available on Project:GURU.

Configuration per connection
Connection settings can be edited manually if required. Iwd keeps its configuration file per connection in.

This directory contains files named like ''. '', where:
 * station is the name (SSID) of the network
 * networktype can be:
 * for pre-shared key, like WPA-PSK or WPA2-PSK
 * for WPA-Enterprise, like EAP-PWD or EAP-PEAP.

The configuration settings are described in iwd.network. A few examples are given below.

Security
For WPA authentication the contents of the file looks like this:

in case of WPA2-PSK needs to be the same as is set in the router and is known from wpa_supplicant's psk= entries. The  is the same as one that could have been calculated with, from package. Iwd does not provide a passphrase calculator yet.

Static network configuration
Iwd defaults to DHCP, either natively or using an external DHCP-client. For static IPv4 configuration add something like this to :

External resources

 * Getting Started with iwd - Official upstream introduction
 * [//wiki.archlinux.org/index.php/Iwd Iwd] - Archlinux wiki article
 * iwd without dbus - Unofficial hack. The last update was done in Jun 2020.