Call for testing: improved WiFi via iwd

I am not sure if i understood what you mean to say but looking at the documentation, i think you are referring to this --> https://iwd.wiki.kernel.org/networkconfigurationsettings

I think i will retry iwd later i am using a work computer and i cant afford to break it again and then redo everything

Yes, I meant to suggest to double check your configuration vs what’s in the latest documentation, in case there have been some changes. Not trying to be condescending, given I don’t know your level of expertise, just a suggestion.

Also, I’ve found that someone has created the following tool to help simplify ingesting certificates and configuration files from eduroam institutions to properly configure iwd.

https://github.com/Groctel/iwd-eduroam

Maybe that is helpful in your case, but perhaps not. Good luck!

What are the points to change in current Lunar to match wpa_supplicant’s features (autoreconnect, etc.) ?
I’m lost: Ubuntu’s iwd currently provides a roughly working setup without any action, so the documentation does not match what is achieved atm.

It seems that the main.conf that is installed in Lunar from the iwd 2.4-0ubuntu1 package erroneously states that IPv6 is still experimental in the comments, but it no longer is. As you can see in the manpages or in IWDs project website, recent versions of IWD now include full support of IPv6 address assignment, via static, router advertisement [SLAAC], and DHCPv6. Whereas, older versions only could support static and DHCPv6 assignment.

The main.conf also indicates that IPv6 support is disabled by default. Which, for this version it should not be. As such, if Ubuntu is compiling the package with IPv6 support defaulting to off, that should be changed.

The configuration comes from upstream and is still the same in their current vcs version
https://git.kernel.org/pub/scm/network/wireless/iwd.git/tree/doc/main.conf#n39

It should be reported to them on https://lore.kernel.org/iwd/

It’s just a misleading description since the default was indeed changed in
https://git.kernel.org/pub/scm/network/wireless/iwd.git/commit/?id=00baa75e

Is iwd planned for Mantic?

Not a this point no, there is more work needed if we wanted to switch (we noticed that geoclue is using wpa for example) and we don’t have the available resources / have other priorities for this cycle

1 Like

In this case, I suppose iwd will be implemented at least in Mantic+2, since Mantic+1 will be a LTS release and could be a very disruptive change for a LTS release.

Oops. Thanks for clarifying. I’ll report upstream.

Hi Seb,

Has Ubuntu let the IWD folks know about those concerns? From my experience, they are pretty responsive, and if the issues are important in a distribution agnostic or standards compliance sense, it seems likely they’d put addressing them into their roadmap.

It’s also probably worth noting for this discussion that I asked them for an enhancement recently for IWD to handle wifi_powersave, via their mailing list. Thus far, IWD hasn’t handled it and that’s a problem as there are so many janky wifi drivers out there, that don’t handle powersave well, and since IWD removes and re-adds the wifi device during the boot sequence it makes setting user desired powersave settings and getting them to stick a bit of a pain.

They dug in, and after about 3 weeks, this week they added a new feature to be added to IWD’s main.conf for users to be able to specify driver tweaks, like disabling powersave. Which is both great from a reliability perspective, and sticking to the intention of making WiFi easier to deal with, if IWD is handling it, rather than a disparate stack of daemons. It seems this enhancement will be in the 2.6 release.

When IWD works, it’s glorious, so thank you for your persistence in trying to get it to be the default in Ubuntu at an appropriate time, and let’s keep hitting them with bugs or enhancements to get it over the hump. Surely, a lot of these concerns are not Ubuntu specific, and rightly handled by the IWD team’s engineering resources.

on my atheros chip, after boot, I have to disconnect/reconnect exactly 4 times before it’s able to send/receive any packets through the interface

IWD 2.6 has been released by the IWD project, with driver quirks and powersave on/off support.

This powersave support will be available without any tweak in Mantic, when published?

1 Like

Good question, that’s probably best answered by @seb128. The powersave and driver tweaks configuration ability, seems like a big step towards making this a more fulsome wpa_supplicant replacement.

I was likewise going to ask him, if he thought it would be valid to request it as a Freeze Exception item for Lunar and Kinetic, given the nature of this enhancement, which is to address bugs inherent in many wifi drivers, the numerous additional IWD fixes, and iwd’s relatively self-contained nature, which actually eliminates other dependencies in the linux wifi stack. Especially, as it’s an optional replacement for that stack, not yet…but hopefully soon…a replacement for it. I get that Ubuntu is not a rolling release, but at a minimum, it’d be nice to keep pushing towards that day in in-development releases.

The new version is in mantic now

It’s not likely going to be a valid candidate for a SRU since it adds new feature, it would rather need to be handled as a backport of in a ppa build

2 Likes

Thanks for that, @seb128.

I installed iwd on my mantic with kernel 6.5.0-060500rc1-generic
iwd: Installed: 2.6-1ubuntu1
but i don’t find the file: /etc/NetworkManager/conf.d/iwd.conf
corrado@corrado-n14-mm-0521:~$ ls /etc/NetworkManager/conf.d/
default-wifi-powersave-on.conf
corrado@corrado-n14-mm-0521:~$
… edit:
ok, created iwd.conf and after reboot I don’t had wifi but after
sudo systemctl restart iwd
now my wifi is ok

corrado@corrado-n14-mm-0521:~$ iwctl
Rejected send message, 2 matched rules; type=“method_call”, sender=":1.131" (uid=1000 pid=7282 comm=“iwctl”) interface=“org.freedesktop.DBus.ObjectManager” member=“GetManagedObjects” error name="(unset)" requested_reply=“0” destination=“net.connman.iwd” (uid=0 pid=3638 comm="/usr/libexec/iwd")
Failed to retrieve IWD dbus objects, quitting…

Waiting for IWD to start…
corrado@corrado-n14-mm-0521:~$ sudo iwctl
[sudo] password for corrado:
NetworkConfigurationEnabled: disabled
StateDirectory: /var/lib/iwd
Version: 2.6
[iwd]#

On my Mantic I installed iwd and is working but i no longer have the file */etc/NetworkManager/conf.d/iwd.conf
I have created it at beginning but have renamed for some test.
so iwd seems working without iwd.conf
can you confirm please?

corrado@corrado-n14-mm-0521:~$ systemctl status wpa_supplicant
○ wpa_supplicant.service
     Loaded: masked (Reason: Unit wpa_supplicant.service is masked.)
     Active: inactive (dead)
corrado@corrado-n14-mm-0521:~$ systemctl status iwd
● iwd.service - Wireless service
     Loaded: loaded (/lib/systemd/system/iwd.service; enabled; preset: enabled)
     Active: active (running) since Sun 2023-07-16 14:35:21 CEST; 1h 56min ago
       Docs: man:iwd(8)
             man:iwd.config(5)
             man:iwd.network(5)
             man:iwd.ap(5)
   Main PID: 1149 (iwd)
      Tasks: 1 (limit: 18783)
     Memory: 2.2M
        CPU: 76ms
     CGroup: /system.slice/iwd.service
             └─1149 /usr/libexec/iwd

Jul 16 14:35:21 corrado-n14-mm-0521 iwd[1149]:                         12.0 Mbps
Jul 16 14:35:21 corrado-n14-mm-0521 iwd[1149]:                         18.0 Mbps
Jul 16 14:35:21 corrado-n14-mm-0521 iwd[1149]:                         24.0 Mbps
Jul 16 14:35:21 corrado-n14-mm-0521 iwd[1149]:                         36.0 Mbps
Jul 16 14:35:21 corrado-n14-mm-0521 iwd[1149]:                         48.0 Mbps
Jul 16 14:35:21 corrado-n14-mm-0521 iwd[1149]:                         54.0 Mbps
Jul 16 14:35:21 corrado-n14-mm-0521 iwd[1149]:         Ciphers: CCMP-256 GCMP-256 GCMP-128 CCMP-128
Jul 16 14:35:21 corrado-n14-mm-0521 iwd[1149]:                  TKIP
Jul 16 14:35:21 corrado-n14-mm-0521 iwd[1149]:         Supported iftypes: ad-hoc station ap

Try moving the file out of the NetworkManager/conf.d dir completely to be sure, rather than just rename. I don’t know for sure, but it may theoretically read it even if it not ends with .conf. On my system with both wpa_supplicant and iwd installed, NM defaults to wpa_supplicant, i.e. unless there’s a config that says it to use iwd instead.

Btw, is nmcli device wifi list output looks okay for you? Last time I tried it, the output when iwd is used has same “Chan” for all wifi networks around, which is wrong of course. I presume it was some bug in NM integration with iwd, but I didn’t report it due to lack of time.

I completely removed iwd.conf and after reboot iwd still works
corrado@corrado-n14-mm-0521:~$ systemctl status wpa_supplicant
○ wpa_supplicant.service
Loaded: masked (Reason: Unit wpa_supplicant.service is masked.)
Active: inactive (dead)
corrado@corrado-n14-mm-0521:~$ systemctl status iwd
● iwd.service - Wireless service
Loaded: loaded (/lib/systemd/system/iwd.service; enabled; preset: enabled)
Active: active (running) since Sun 2023-07-16 17:28:07 CEST; 1min 21s ago

also for me nmcli gives a wrong reply
corrado@corrado-n14-mm-0521:~$ nmcli device wifi list
IN-USE BSSID SSID MODE CHAN RATE SIGNAL BARS SECURI>
* 20:47:DA:25:4A:E9 corado Infra 6 65 Mbit/s 60 ▂▄▆_ WPA2 >
corrado@corrado-n14-mm-0521:~$

should i open a bug against NM or iwd?
thanks