iwd fails to create device
1148d778-20a8-4ab0-96b7-24572ddab965 at simplelogin.co
Hi,
A few times I've already seen a strange behaviour right after rebooting. All of the sudden the wifi card is no longer available. To me it looks like iwd fails to detect and rename the device. Hopefully it happens very seldom.
$ journalctl -b -1 | grep -i wifi may 27 12:02:52 kernel: Intel(R) Wireless WiFi driver for Linux may 27 12:02:52 kernel: iwlwifi 0000:03:00.0: enabling device (0000 -> 0002) may 27 12:02:52 kernel: iwlwifi 0000:03:00.0: Direct firmware load for iwlwifi-cc-a0-69.ucode failed with error -2 may 27 12:02:52 kernel: iwlwifi 0000:03:00.0: api flags index 2 larger than supported by driver may 27 12:02:52 kernel: iwlwifi 0000:03:00.0: TLV_FW_FSEQ_VERSION: FSEQ Version: 89.3.35.37 may 27 12:02:52 kernel: iwlwifi 0000:03:00.0: loaded firmware version 68.01d30b0c.0 cc-a0-68.ucode op_mode iwlmvm may 27 12:02:52 kernel: iwlwifi 0000:03:00.0: Detected Intel(R) Wi-Fi 6 AX200 160MHz, REV=0x340 may 27 12:02:53 kernel: iwlwifi 0000:03:00.0: Detected RF HR B3, rfid=0x10a100 may 27 12:02:53 kernel: iwlwifi 0000:03:00.0: base HW address: xx:xx:xx:xx:xx:xx
$ journalctl -b -1 | grep -i iwd may 27 12:02:53 iwd[863]: Wireless daemon version 1.27 may 27 12:02:53 iwd[863]: Loaded configuration from /etc/iwd/main.conf may 27 12:02:53 audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=iwd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' may 27 12:02:53 iwd[863]: Wiphy: 0, Name: phy0 may 27 12:02:53 iwd[863]: Permanent Address: xx:xx:xx:xx:xx:xx may 27 12:02:53 iwd[863]: 2.4Ghz Band: may 27 12:02:53 iwd[863]: Bitrates (non-HT): may 27 12:02:53 iwd[863]: 1.0 Mbps may 27 12:02:53 iwd[863]: 2.0 Mbps may 27 12:02:53 iwd[863]: 5.5 Mbps may 27 12:02:53 iwd[863]: 11.0 Mbps may 27 12:02:53 iwd[863]: 6.0 Mbps may 27 12:02:53 iwd[863]: 9.0 Mbps may 27 12:02:53 iwd[863]: 12.0 Mbps may 27 12:02:53 iwd[863]: 18.0 Mbps may 27 12:02:53 iwd[863]: 24.0 Mbps may 27 12:02:53 iwd[863]: 36.0 Mbps may 27 12:02:53 iwd[863]: 48.0 Mbps may 27 12:02:53 iwd[863]: 54.0 Mbps may 27 12:02:53 iwd[863]: HT Capabilities: may 27 12:02:53 iwd[863]: HT40 may 27 12:02:53 iwd[863]: Short GI for 20Mhz may 27 12:02:53 iwd[863]: Short GI for 40Mhz may 27 12:02:53 iwd[863]: HT RX MCS indexes: may 27 12:02:53 iwd[863]: 0-15 may 27 12:02:53 iwd[863]: 5Ghz Band: may 27 12:02:53 iwd[863]: Bitrates (non-HT): may 27 12:02:53 iwd[863]: 6.0 Mbps may 27 12:02:53 iwd[863]: 9.0 Mbps may 27 12:02:53 iwd[863]: 12.0 Mbps may 27 12:02:53 iwd[863]: 18.0 Mbps may 27 12:02:53 iwd[863]: 24.0 Mbps may 27 12:02:53 iwd[863]: 36.0 Mbps may 27 12:02:53 iwd[863]: 48.0 Mbps may 27 12:02:53 iwd[863]: 54.0 Mbps may 27 12:02:53 iwd[863]: HT Capabilities: may 27 12:02:53 iwd[863]: HT40 may 27 12:02:53 iwd[863]: Short GI for 20Mhz may 27 12:02:53 iwd[863]: Short GI for 40Mhz may 27 12:02:53 iwd[863]: HT RX MCS indexes: may 27 12:02:53 iwd[863]: 0-15 may 27 12:02:53 iwd[863]: VHT Capabilities: may 27 12:02:53 iwd[863]: 160 Mhz operation may 27 12:02:53 iwd[863]: Short GI for 80Mhz may 27 12:02:53 iwd[863]: Short GI for 160 and 80 + 80 Mhz may 27 12:02:53 iwd[863]: Max RX MCS: 0-9 for NSS: 2 may 27 12:02:53 iwd[863]: Max TX MCS: 0-9 for NSS: 2 may 27 12:02:53 iwd[863]: Ciphers: CCMP TKIP BIP may 27 12:02:53 iwd[863]: Supported iftypes: ad-hoc station ap p2p-client p2p-go p2p-device may 27 12:02:53 iwd[863]: Unable to add the net.connman.iwd.Adapter interface to /net/connman/iwd/0 may 27 12:02:53 iwd[863]: Unable to add the org.freedesktop.DBus.Properties interface to /net/connman/iwd/0 may 27 12:02:53 iwd[863]: Wiphy: 0, Name: phy0 may 27 12:02:53 iwd[863]: Permanent Address: xx:xx:xx:xx:xx:xx may 27 12:02:53 iwd[863]: 2.4Ghz Band: may 27 12:02:53 iwd[863]: Bitrates (non-HT): may 27 12:02:53 iwd[863]: 1.0 Mbps may 27 12:02:53 iwd[863]: 2.0 Mbps may 27 12:02:53 iwd[863]: 5.5 Mbps may 27 12:02:53 iwd[863]: 11.0 Mbps may 27 12:02:53 iwd[863]: 6.0 Mbps may 27 12:02:53 iwd[863]: 9.0 Mbps may 27 12:02:53 iwd[863]: 12.0 Mbps may 27 12:02:53 iwd[863]: 18.0 Mbps may 27 12:02:53 iwd[863]: 24.0 Mbps may 27 12:02:53 iwd[863]: 36.0 Mbps may 27 12:02:53 iwd[863]: 48.0 Mbps may 27 12:02:53 iwd[863]: 54.0 Mbps may 27 12:02:53 iwd[863]: HT Capabilities: may 27 12:02:53 iwd[863]: HT40 may 27 12:02:53 iwd[863]: Short GI for 20Mhz may 27 12:02:53 iwd[863]: Short GI for 40Mhz may 27 12:02:53 iwd[863]: HT RX MCS indexes: may 27 12:02:53 iwd[863]: 0-15 may 27 12:02:53 iwd[863]: 5Ghz Band: may 27 12:02:53 iwd[863]: Bitrates (non-HT): may 27 12:02:53 iwd[863]: 6.0 Mbps may 27 12:02:53 iwd[863]: 9.0 Mbps may 27 12:02:53 iwd[863]: 12.0 Mbps may 27 12:02:53 iwd[863]: 18.0 Mbps may 27 12:02:53 iwd[863]: 24.0 Mbps may 27 12:02:53 iwd[863]: 36.0 Mbps may 27 12:02:53 iwd[863]: 48.0 Mbps may 27 12:02:53 iwd[863]: 54.0 Mbps may 27 12:02:53 iwd[863]: HT Capabilities: may 27 12:02:53 iwd[863]: HT40 may 27 12:02:53 iwd[863]: Short GI for 20Mhz may 27 12:02:53 iwd[863]: Short GI for 40Mhz may 27 12:02:53 iwd[863]: HT RX MCS indexes: may 27 12:02:53 iwd[863]: 0-15 may 27 12:02:53 iwd[863]: VHT Capabilities: may 27 12:02:53 iwd[863]: 160 Mhz operation may 27 12:02:53 iwd[863]: Short GI for 80Mhz may 27 12:02:53 iwd[863]: Short GI for 160 and 80 + 80 Mhz may 27 12:02:53 iwd[863]: Max RX MCS: 0-9 for NSS: 2 may 27 12:02:53 iwd[863]: Max TX MCS: 0-9 for NSS: 2 may 27 12:02:53 iwd[863]: Ciphers: CCMP TKIP BIP may 27 12:02:53 iwd[863]: Supported iftypes: ad-hoc station ap p2p-client p2p-go p2p-device may 27 12:02:53 iwd[863]: DEL_INTERFACE failed: No such device may 27 12:02:53 iwd[863]: Could not register frame watch type 00d0: -19 may 27 12:02:53 iwd[863]: RTM_GETLINK error -19: No such device may 27 12:02:53 iwd[863]: Could not register frame watch type 00d0: -19 may 27 12:02:53 iwd[863]: Could not register frame watch type 00d0: -19 may 27 12:02:53 iwd[863]: Could not register frame watch type 00d0: -19 may 27 12:02:53 iwd[863]: Could not register frame watch type 00d0: -19 may 27 12:03:31 iwd[863]: D-Bus disconnected, quitting... may 27 12:03:32 iwd[863]: Terminate may 27 12:03:32 iwd[863]: Removing scan context for wdev 2 may 27 12:03:33 systemd[1]: iwd.service: Deactivated successfully.
Arch Linux wiki on iwd troubleshooting mentions two issues that look possible causes to me:
- Low entropy pool
- Wireless device not renamed by udev
You can check it here: https://wiki.archlinux.org/title/Iwd#Troubleshooting
Any help to fix this issue would be appreciated.
Thanks!
James Prestwood
Hi,
Quoted 141 lines · On Sat, 2022-05-28 at 19:24 +0000, 1148d778-20a8-4ab0-96b7-24572ddab965(a)simpl…
Hi,
A few times I've already seen a strange behaviour right after rebooting. All of the sudden the wifi card is no longer available. To me it looks like iwd fails to detect and rename the device. Hopefully it happens very seldom.
$ journalctl -b -1 | grep -i wifi may 27 12:02:52 kernel: Intel(R) Wireless WiFi driver for Linux may 27 12:02:52 kernel: iwlwifi 0000:03:00.0: enabling device (0000 -> 0002) may 27 12:02:52 kernel: iwlwifi 0000:03:00.0: Direct firmware load for iwlwifi-cc-a0-69.ucode failed with error -2 may 27 12:02:52 kernel: iwlwifi 0000:03:00.0: api flags index 2 larger than supported by driver may 27 12:02:52 kernel: iwlwifi 0000:03:00.0: TLV_FW_FSEQ_VERSION: FSEQ Version: 89.3.35.37 may 27 12:02:52 kernel: iwlwifi 0000:03:00.0: loaded firmware version 68.01d30b0c.0 cc-a0-68.ucode op_mode iwlmvm may 27 12:02:52 kernel: iwlwifi 0000:03:00.0: Detected Intel(R) Wi-Fi 6 AX200 160MHz, REV=0x340 may 27 12:02:53 kernel: iwlwifi 0000:03:00.0: Detected RF HR B3, rfid=0x10a100 may 27 12:02:53 kernel: iwlwifi 0000:03:00.0: base HW address: xx:xx:xx:xx:xx:xx$ journalctl -b -1 | grep -i iwd may 27 12:02:53 iwd[863]: Wireless daemon version 1.27 may 27 12:02:53 iwd[863]: Loaded configuration from /etc/iwd/main.conf may 27 12:02:53 audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=iwd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' may 27 12:02:53 iwd[863]: Wiphy: 0, Name: phy0 may 27 12:02:53 iwd[863]: Permanent Address: xx:xx:xx:xx:xx:xx may 27 12:02:53 iwd[863]: 2.4Ghz Band: may 27 12:02:53 iwd[863]: Bitrates (non-HT): may 27 12:02:53 iwd[863]: 1.0 Mbps may 27 12:02:53 iwd[863]: 2.0 Mbps may 27 12:02:53 iwd[863]: 5.5 Mbps may 27 12:02:53 iwd[863]: 11.0 Mbps may 27 12:02:53 iwd[863]: 6.0 Mbps may 27 12:02:53 iwd[863]: 9.0 Mbps may 27 12:02:53 iwd[863]: 12.0 Mbps may 27 12:02:53 iwd[863]: 18.0 Mbps may 27 12:02:53 iwd[863]: 24.0 Mbps may 27 12:02:53 iwd[863]: 36.0 Mbps may 27 12:02:53 iwd[863]: 48.0 Mbps may 27 12:02:53 iwd[863]: 54.0 Mbps may 27 12:02:53 iwd[863]: HT Capabilities: may 27 12:02:53 iwd[863]: HT40 may 27 12:02:53 iwd[863]: Short GI for 20Mhz may 27 12:02:53 iwd[863]: Short GI for 40Mhz may 27 12:02:53 iwd[863]: HT RX MCS indexes: may 27 12:02:53 iwd[863]: 0-15 may 27 12:02:53 iwd[863]: 5Ghz Band: may 27 12:02:53 iwd[863]: Bitrates (non-HT): may 27 12:02:53 iwd[863]: 6.0 Mbps may 27 12:02:53 iwd[863]: 9.0 Mbps may 27 12:02:53 iwd[863]: 12.0 Mbps may 27 12:02:53 iwd[863]: 18.0 Mbps may 27 12:02:53 iwd[863]: 24.0 Mbps may 27 12:02:53 iwd[863]: 36.0 Mbps may 27 12:02:53 iwd[863]: 48.0 Mbps may 27 12:02:53 iwd[863]: 54.0 Mbps may 27 12:02:53 iwd[863]: HT Capabilities: may 27 12:02:53 iwd[863]: HT40 may 27 12:02:53 iwd[863]: Short GI for 20Mhz may 27 12:02:53 iwd[863]: Short GI for 40Mhz may 27 12:02:53 iwd[863]: HT RX MCS indexes: may 27 12:02:53 iwd[863]: 0-15 may 27 12:02:53 iwd[863]: VHT Capabilities: may 27 12:02:53 iwd[863]: 160 Mhz operation may 27 12:02:53 iwd[863]: Short GI for 80Mhz may 27 12:02:53 iwd[863]: Short GI for 160 and 80 + 80 Mhz may 27 12:02:53 iwd[863]: Max RX MCS: 0-9 for NSS: 2 may 27 12:02:53 iwd[863]: Max TX MCS: 0-9 for NSS: 2 may 27 12:02:53 iwd[863]: Ciphers: CCMP TKIP BIP may 27 12:02:53 iwd[863]: Supported iftypes: ad-hoc station ap p2p-client p2p-go p2p-device may 27 12:02:53 iwd[863]: Unable to add the net.connman.iwd.Adapter interface to /net/connman/iwd/0 may 27 12:02:53 iwd[863]: Unable to add the org.freedesktop.DBus.Properties interface to /net/connman/iwd/0 may 27 12:02:53 iwd[863]: Wiphy: 0, Name: phy0 may 27 12:02:53 iwd[863]: Permanent Address: xx:xx:xx:xx:xx:xx may 27 12:02:53 iwd[863]: 2.4Ghz Band: may 27 12:02:53 iwd[863]: Bitrates (non-HT): may 27 12:02:53 iwd[863]: 1.0 Mbps may 27 12:02:53 iwd[863]: 2.0 Mbps may 27 12:02:53 iwd[863]: 5.5 Mbps may 27 12:02:53 iwd[863]: 11.0 Mbps may 27 12:02:53 iwd[863]: 6.0 Mbps may 27 12:02:53 iwd[863]: 9.0 Mbps may 27 12:02:53 iwd[863]: 12.0 Mbps may 27 12:02:53 iwd[863]: 18.0 Mbps may 27 12:02:53 iwd[863]: 24.0 Mbps may 27 12:02:53 iwd[863]: 36.0 Mbps may 27 12:02:53 iwd[863]: 48.0 Mbps may 27 12:02:53 iwd[863]: 54.0 Mbps may 27 12:02:53 iwd[863]: HT Capabilities: may 27 12:02:53 iwd[863]: HT40 may 27 12:02:53 iwd[863]: Short GI for 20Mhz may 27 12:02:53 iwd[863]: Short GI for 40Mhz may 27 12:02:53 iwd[863]: HT RX MCS indexes: may 27 12:02:53 iwd[863]: 0-15 may 27 12:02:53 iwd[863]: 5Ghz Band: may 27 12:02:53 iwd[863]: Bitrates (non-HT): may 27 12:02:53 iwd[863]: 6.0 Mbps may 27 12:02:53 iwd[863]: 9.0 Mbps may 27 12:02:53 iwd[863]: 12.0 Mbps may 27 12:02:53 iwd[863]: 18.0 Mbps may 27 12:02:53 iwd[863]: 24.0 Mbps may 27 12:02:53 iwd[863]: 36.0 Mbps may 27 12:02:53 iwd[863]: 48.0 Mbps may 27 12:02:53 iwd[863]: 54.0 Mbps may 27 12:02:53 iwd[863]: HT Capabilities: may 27 12:02:53 iwd[863]: HT40 may 27 12:02:53 iwd[863]: Short GI for 20Mhz may 27 12:02:53 iwd[863]: Short GI for 40Mhz may 27 12:02:53 iwd[863]: HT RX MCS indexes: may 27 12:02:53 iwd[863]: 0-15 may 27 12:02:53 iwd[863]: VHT Capabilities: may 27 12:02:53 iwd[863]: 160 Mhz operation may 27 12:02:53 iwd[863]: Short GI for 80Mhz may 27 12:02:53 iwd[863]: Short GI for 160 and 80 + 80 Mhz may 27 12:02:53 iwd[863]: Max RX MCS: 0-9 for NSS: 2 may 27 12:02:53 iwd[863]: Max TX MCS: 0-9 for NSS: 2 may 27 12:02:53 iwd[863]: Ciphers: CCMP TKIP BIP may 27 12:02:53 iwd[863]: Supported iftypes: ad-hoc station ap p2p-client p2p-go p2p-device may 27 12:02:53 iwd[863]: DEL_INTERFACE failed: No such device may 27 12:02:53 iwd[863]: Could not register frame watch type 00d0: -19 may 27 12:02:53 iwd[863]: RTM_GETLINK error -19: No such device
Quoted 8 lines
may 27 12:02:53 iwd[863]: Could not register frame watch type 00d0: -19 may 27 12:02:53 iwd[863]: Could not register frame watch type 00d0: -19 may 27 12:02:53 iwd[863]: Could not register frame watch type 00d0: -19 may 27 12:02:53 iwd[863]: Could not register frame watch type 00d0: -19 may 27 12:03:31 iwd[863]: D-Bus disconnected, quitting... may 27 12:03:32 iwd[863]: Terminate may 27 12:03:32 iwd[863]: Removing scan context for wdev 2 may 27 12:03:33 systemd[1]: iwd.service: Deactivated successfully.
This looks very familiar to an issue we fixed with dual-phy cards, but this isn't the case for you. Its as if your phy is being detected twice.
It would be great if you could get some iwmon logs when this happens. Hopefully it happens frequent enough you can get a capture. More info about how to do that can be found here:
https://iwd.wiki.kernel.org/debugging
Quoted 15 lines
Arch Linux wiki on iwd troubleshooting mentions two issues that look possible causes to me:
- Low entropy pool
- Wireless device not renamed by udevYou can check it here:
https://wiki.archlinux.org/title/Iwd#TroubleshootingAny help to fix this issue would be appreciated.
Thanks!
_______________________________________________
iwd mailing list -- iwd(a)lists.01.org
To unsubscribe send an email to iwd-leave(a)lists.01.org
1148d778-20a8-4ab0-96b7-24572ddab965 at simplelogin.co
Quoted 5 lines
It would be great if you could get some iwmon logs when this happens. Hopefully it happens frequent enough you can get a capture. More info about how to do that can be found here:
Sure, but it doesn't happen very frequently. I'm not sure about how to approach debugging for this, should I try to restart iwd when it happens? Maybe doing this the issue is not triggered. Having iwmon logging all time seems a bit too much, no?
I could try to reproduce it somehow because it's mostly after a reboot when it happens.
James Prestwood
Quoted 6 lines · On Tue, 2022-05-31 at 18:39 +0000, 1148d778-20a8-4ab0-96b7-24572ddab965(a)simpl…
Quoted 6 lines
It would be great if you could get some iwmon logs when this happens.
Hopefully it happens frequent enough you can get a capture. More info
about how to do that can be found here:
Quoted 6 lines
Quoted 1 line
Sure, but it doesn't happen very frequently. I'm not sure about how to approach debugging for this, should I try to restart iwd when it happens? Maybe doing this the issue is not triggered. Having iwmon logging all time seems a bit too much, no?
It sounds like some kind of race condition in the kernel, which is why its infrequent. And yes, running iwmon all the time is going to produce a huge log...
Maybe someone else has a better solution, but you could create a bash script (e.g. /usr/libexec/start-iwd.sh):
#!/bin/bash
timeout 60s iwmon --nortnl --noscan > /your/log/file & iwd -d
And have your systemd unit file run this:
ExecStart=/usr/libexec/start-iwd.sh
Since this happens at startup running iwmon for 60 seconds should be plenty to capture the wiphy dump. This of course assumes you're using systemd.
Note: DO NOT use the --nowiphy. This disables the messages we need to look at.
Thanks,
James
Quoted 6 lines
I could try to reproduce it somehow because it's mostly after a reboot when it happens.
_______________________________________________
iwd mailing list -- iwd(a)lists.01.org
To unsubscribe send an email to iwd-leave(a)lists.01.org
Quoted 3 lines
This looks very familiar to an issue we fixed with dual-phy cards, but this isn't the case for you. Its as if your phy is being detected twice.
It doesn't look like the OP has followed up on this but it seems I have a very similar issue. It appears that when iwd (2.0) starts and the kernel (6.1.3) reports Bluetooth/iwlwifi stuff right after it, iwd will see the same interface twice and my wlan0 interface won't come up. Restarting iwd fixes the issue.
Quoted 5 lines
More info about how to do that can be found here:
https://iwd.wiki.kernel.org/debuggingMaybe someone else has a better solution, but you could create a bash script (e.g.
/usr/libexec/start-iwd.sh):
I'm not sure it will help because iwmon's capture appears to start a bit too late (but that's the first time I try to debug something like this).
Journal entries are from the first to last iwd log and I anonymized all the logs as described in the wiki but I can resend the complete files in private.
Logs manifesting the issue:
journalctl https://pastebin.com/z7iCvYAP
iwmon https://pastebin.com/Va4XEEDs
And for comparison, when everything goes fine:
journalctl https://pastebin.com/DJAHgZYE
iwmon https://pastebin.com/iRHF9Wd8
I'm happy to try with the latest iwd commit or another kernel version if it would help. It only takes a few reboots for the issue to happen.
Hi Kevin,
Quoted 10 lines · Kevin Boulain
Quoted 4 lines
This looks very familiar to an issue we fixed with dual-phy cards, but
this isn't the case for you. Its as if your phy is being detected twice.It doesn't look like the OP has followed up on this but it seems I have a very similar issue. It appears that when iwd (2.0) starts and the kernel (6.1.3) reports Bluetooth/iwlwifi stuff right after it, iwd will see the same interface twice and my wlan0 interface won't come up. Restarting iwd fixes the issue.
Would you be able to try the last two patches on the list? The archive link is:
https://lore.kernel.org/iwd/[email protected]/T/#t
Hopefully this fixes the problem.
Thanks,
James
Hey James,
Quoted 4 lines · James Prestwood
Would you be able to try the last two patches on the list? The archive link is:
I'd say the results are pretty conclusive:
- without the patches the issue appeared in 3 boots of 5,
- with the patches I didn't encounter the issue after 10 boots.
Thanks!