All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Sven-Hendrik Haase" <mailinglists@svenstaro.org>
To: iwd@lists.linux.dev
Subject: iwd picking worse network despite better one available
Date: Wed, 27 Mar 2024 19:36:02 +0100	[thread overview]
Message-ID: <699c79ff-0082-4602-9bb8-475722563c46@app.fastmail.com> (raw)

Hello,

I've spent a good chunk of my evening looking into why iwd doesn't select the network I want it to select. I have a network "Home" with two APs. iwd seems to strongly prefer the AP that is further away and that has worse strength as measured by iwd.

From some testing, I believe it has to do with the AP rather than the wifi adapter. I tested a wifi adapter using mt7921e and one using iwlwifi and the result is the same in both cases. The APs are both pretty modern: The one iwd doesn't like is a FRITZ!Box 7590 AX while the one it likes is a FRITZ!Repeater 6000. From the log it seems that iwd is unable to perform a proper data rate estimation and then falls back to some default. At any rate, the rank would indicate that the estimated data rate plays an important role. If I use the developer mode to force roaming to the AP I want (named "better" in the log) then I'm able to use it perfectly well with a good data rate.

As such I think this is a bug _somewhere_ but I'm not exactly sure where. I searched the configuration options but it seems it's not possible to turn off the data rate estimations for the ranking. I'd be perfectly happy to just go by signal strength. However, I suppose it would be better to actually fix the core problem in iwd.

Log is here:

Mar 27 16:01:55 cypher systemd[1]: Starting Wireless service...
Mar 27 16:01:55 cypher iwd[30930]: Wireless daemon version 2.16
Mar 27 16:01:55 cypher iwd[30930]: src/main.c:main() Using configuration directory /etc/iwd
Mar 27 16:01:55 cypher iwd[30930]: src/storage.c:storage_create_dirs() Using state directory /var/lib/iwd
Mar 27 16:01:55 cypher systemd[1]: Started Wireless service.
Mar 27 16:01:55 cypher iwd[30930]: src/main.c:nl80211_appeared() Found nl80211 interface
Mar 27 16:01:55 cypher iwd[30930]: src/module.c:iwd_modules_init()
Mar 27 16:01:55 cypher iwd[30930]: station: Network configuration is disabled.
Mar 27 16:01:55 cypher iwd[30930]: src/wsc.c:wsc_init()
Mar 27 16:01:55 cypher iwd[30930]: src/eap.c:__eap_method_enable()
Mar 27 16:01:55 cypher iwd[30930]: src/eap-wsc.c:eap_wsc_init()
Mar 27 16:01:55 cypher iwd[30930]: src/eap-md5.c:eap_md5_init()
Mar 27 16:01:55 cypher iwd[30930]: src/eap-tls.c:eap_tls_init()
Mar 27 16:01:55 cypher iwd[30930]: src/eap-ttls.c:eap_ttls_init()
Mar 27 16:01:55 cypher iwd[30930]: src/eap-mschapv2.c:eap_mschapv2_init()
Mar 27 16:01:55 cypher iwd[30930]: src/eap-sim.c:eap_sim_init()
Mar 27 16:01:55 cypher iwd[30930]: src/eap-aka.c:eap_aka_prime_init()
Mar 27 16:01:55 cypher iwd[30930]: src/eap-aka.c:eap_aka_init()
Mar 27 16:01:55 cypher iwd[30930]: src/eap-peap.c:eap_peap_init()
Mar 27 16:01:55 cypher iwd[30930]: src/eap-gtc.c:eap_gtc_init()
Mar 27 16:01:55 cypher iwd[30930]: src/eap-pwd.c:eap_pwd_init()
Mar 27 16:01:55 cypher iwd[30930]: src/manager.c:manager_wiphy_dump_callback() New wiphy phy0 added (0)
Mar 27 16:01:55 cypher iwd[30930]: src/manager.c:manager_wiphy_dump_done()
Mar 27 16:01:55 cypher iwd[30930]: src/manager.c:manager_filtered_wiphy_dump_done()
Mar 27 16:01:55 cypher iwd[30930]: Wiphy: 0, Name: phy0
Mar 27 16:01:55 cypher iwd[30930]:         Permanent Address: redacted
Mar 27 16:01:55 cypher iwd[30930]:         2.4GHz Band:
Mar 27 16:01:55 cypher iwd[30930]:                 Bitrates (non-HT):
Mar 27 16:01:55 cypher iwd[30930]:                          1.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                          2.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                          5.5 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         11.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                          6.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                          9.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         12.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         18.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         24.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         36.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         48.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         54.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                 HT Capabilities:
Mar 27 16:01:55 cypher iwd[30930]:                         HT40
Mar 27 16:01:55 cypher iwd[30930]:                         Short GI for 20Mhz
Mar 27 16:01:55 cypher iwd[30930]:                         Short GI for 40Mhz
Mar 27 16:01:55 cypher iwd[30930]:                 HT RX MCS indexes:
Mar 27 16:01:55 cypher iwd[30930]:                         0-15
Mar 27 16:01:55 cypher iwd[30930]:                 HE Capabilities
Mar 27 16:01:55 cypher iwd[30930]:                         Interface Types: ap
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE RX <= 80MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE TX <= 80MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:                         Interface Types: station
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE RX <= 80MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE TX <= 80MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:         5GHz Band:
Mar 27 16:01:55 cypher iwd[30930]:                 Bitrates (non-HT):
Mar 27 16:01:55 cypher iwd[30930]:                          6.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                          9.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         12.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         18.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         24.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         36.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         48.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         54.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                 HT Capabilities:
Mar 27 16:01:55 cypher iwd[30930]:                         HT40
Mar 27 16:01:55 cypher iwd[30930]:                         Short GI for 20Mhz
Mar 27 16:01:55 cypher iwd[30930]:                         Short GI for 40Mhz
Mar 27 16:01:55 cypher iwd[30930]:                 HT RX MCS indexes:
Mar 27 16:01:55 cypher iwd[30930]:                         0-15
Mar 27 16:01:55 cypher iwd[30930]:                 VHT Capabilities:
Mar 27 16:01:55 cypher iwd[30930]:                         160 Mhz operation
Mar 27 16:01:55 cypher iwd[30930]:                         Short GI for 80Mhz
Mar 27 16:01:55 cypher iwd[30930]:                         Short GI for 160 and 80 + 80 Mhz
Mar 27 16:01:55 cypher iwd[30930]:                         Max RX MCS: 0-9 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:                         Max TX MCS: 0-9 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:                 HE Capabilities
Mar 27 16:01:55 cypher iwd[30930]:                         Interface Types: ap
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE RX <= 80MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE TX <= 80MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:                         Interface Types: station
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE RX <= 80MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE TX <= 80MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE RX <= 160MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE TX <= 160MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:         6GHz Band:
Mar 27 16:01:55 cypher iwd[30930]:                 Bitrates (non-HT):
Mar 27 16:01:55 cypher iwd[30930]:                          6.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                          9.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         12.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         18.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         24.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         36.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         48.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                         54.0 Mbps
Mar 27 16:01:55 cypher iwd[30930]:                 HE Capabilities
Mar 27 16:01:55 cypher iwd[30930]:                         Interface Types: ap
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE RX <= 80MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE TX <= 80MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:                         Interface Types: station
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE RX <= 80MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE TX <= 80MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE RX <= 160MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:                         Max HE TX <= 160MHz MCS: 0-11 for NSS: 2
Mar 27 16:01:55 cypher iwd[30930]:         Ciphers: BIP-CMAC-256 BIP-GMAC-256 BIP-GMAC-128 CCMP-256
Mar 27 16:01:55 cypher iwd[30930]:                  GCMP-256 GCMP-128 BIP-CMAC-128 CCMP-128
Mar 27 16:01:55 cypher iwd[30930]:                  TKIP
Mar 27 16:01:55 cypher iwd[30930]:         Supported iftypes: station ap p2p-client p2p-go
Mar 27 16:01:55 cypher iwd[30930]: src/manager.c:manager_interface_dump_done()
Mar 27 16:01:55 cypher iwd[30930]: src/manager.c:manager_create_interfaces() creating wlan0
Mar 27 16:01:55 cypher iwd[30930]: src/wiphy.c:wiphy_update_reg_domain() New reg domain country code for (global) is DE
Mar 27 16:01:55 cypher iwd[30930]: src/manager.c:manager_config_notify() Notification of command New Interface(7)
Mar 27 16:01:55 cypher iwd[30930]: src/netdev.c:netdev_link_notify() event 16 on ifindex 6
Mar 27 16:01:55 cypher iwd[30930]: src/manager.c:manager_new_station_interface_cb()
Mar 27 16:01:55 cypher iwd[30930]: src/netdev.c:netdev_create_from_genl() Created interface wlan0[6 5]
Mar 27 16:01:55 cypher iwd[30930]: src/netdev.c:netdev_link_notify() event 16 on ifindex 6
Mar 27 16:01:55 cypher iwd[30930]: src/netdev.c:netdev_set_4addr() netdev: 6 use_4addr: 0
Mar 27 16:01:55 cypher iwd[30930]: src/netdev.c:netdev_initial_up_cb() Interface 6 initialized
Mar 27 16:01:55 cypher iwd[30930]: event: state, old: disconnected, new: autoconnect_quick
Mar 27 16:01:55 cypher iwd[30930]: src/wiphy.c:wiphy_radio_work_insert() Inserting work item 1
Mar 27 16:01:55 cypher iwd[30930]: src/wiphy.c:wiphy_radio_work_next() Starting work item 1
Mar 27 16:01:55 cypher iwd[30930]: src/rrm.c:rrm_add_frame_watches()
Mar 27 16:01:55 cypher iwd[30930]: src/netdev.c:netdev_link_notify() event 16 on ifindex 6
Mar 27 16:01:55 cypher iwd[30930]: src/manager.c:manager_config_notify() Notification of command Set Interface(6)
Mar 27 16:01:55 cypher iwd[30930]: src/scan.c:scan_notify() Scan notification Trigger Scan(33)
Mar 27 16:01:55 cypher iwd[30930]: src/scan.c:scan_request_triggered() Active scan triggered for wdev 5
Mar 27 16:01:55 cypher iwd[30930]: src/station.c:station_quick_scan_triggered() Quick scan triggered for wlan0
Mar 27 16:01:55 cypher iwd[30930]: src/netdev.c:netdev_link_notify() event 16 on ifindex 6
Mar 27 16:01:55 cypher iwd[30930]: src/scan.c:scan_notify() Scan notification New Scan Results(34)
Mar 27 16:01:55 cypher iwd[30930]: src/netdev.c:netdev_link_notify() event 16 on ifindex 6
Mar 27 16:01:55 cypher iwd[30930]: wiphy_estimate_data_rate() failed
Mar 27 16:01:55 cypher iwd[30930]: wiphy_estimate_data_rate() failed
Mar 27 16:01:55 cypher iwd[30930]: src/station.c:station_add_seen_bss() Processing BSS 'worse:2d' with SSID: Home, freq: 2412, rank: 469, strength: -7100, data_rate: 68.8
Mar 27 16:01:55 cypher iwd[30930]: src/station.c:station_add_seen_bss() Added new Network "Home" security psk
Mar 27 16:01:55 cypher iwd[30930]: src/station.c:station_add_seen_bss() Processing BSS 'better:f1' with SSID: Home, freq: 2462, rank: 16, strength: -4700, data_rate: 2.0
Mar 27 16:01:55 cypher iwd[30930]: src/station.c:station_add_seen_bss() Processing BSS 'better:f0' with SSID: Home, freq: 5180, rank: 16, strength: -5500, data_rate: 2.0
Mar 27 16:01:55 cypher iwd[30930]: src/station.c:station_add_seen_bss() Processing BSS 'worse:2e' with SSID: Home, freq: 5180, rank: 13, strength: -9000, data_rate: 2.0
Mar 27 16:01:55 cypher iwd[30930]: src/station.c:station_autoconnect_start()
Mar 27 16:01:55 cypher iwd[30930]: src/wiphy.c:wiphy_select_akm() Network is WPA3-Personal...
Mar 27 16:01:55 cypher iwd[30930]: src/station.c:station_autoconnect_next() autoconnect: Trying SSID: Home
Mar 27 16:01:55 cypher iwd[30930]: src/station.c:station_autoconnect_next() autoconnect: 'worse:2d' freq: 2412, rank: 469, strength: -7100
Mar 27 16:01:55 cypher iwd[30930]: src/wiphy.c:wiphy_select_akm() Network is WPA3-Personal...
Mar 27 16:01:55 cypher iwd[30930]: src/netdev.c:netdev_cqm_rssi_update()
Mar 27 16:01:55 cypher iwd[30930]: src/wiphy.c:wiphy_radio_work_insert() Inserting work item 2
Mar 27 16:01:55 cypher iwd[30930]: event: connect-info, ssid: Home, bss: worse:2d, signal: -71, load: 127/255

             reply	other threads:[~2024-03-27 18:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-27 18:36 Sven-Hendrik Haase [this message]
2024-03-27 18:54 ` iwd picking worse network despite better one available James Prestwood
2024-03-27 19:21   ` Sven-Hendrik Haase
2024-03-28 13:48     ` James Prestwood
2024-03-28 16:21       ` Sven-Hendrik Haase
2024-03-28 16:45         ` James Prestwood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=699c79ff-0082-4602-9bb8-475722563c46@app.fastmail.com \
    --to=mailinglists@svenstaro.org \
    --cc=iwd@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.