[iwd] Switching between saved Wi-Fi networks shows a false failure toast

Open
#4,432 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
1-2 days
Newbie friendliness
58/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
go, linux
Domain
networking

Research direction

Start with core/internal/server/network/backend_iwd_signals.go around the cited v2.1.2 lines 311–425, and trace how the iwd disconnect and connected events affect a pending network attempt. Reproduce the reported event ordering with the private D-Bus setup described in the issue. Done means switching between saved networks does not show a failure toast when the target connects, while genuine connection failures still do.

Written by the indexing model from the issue text.

Description

Compositor

Niri

Distribution

Arch Linux

Select your Installation Method

Distro Packaging (dux-shell 2.1.2-1)

dms doctor -vC
Click to expand
  System
    ● Operating System ····· Arch Linux
      └─ ID: arch, Version: rolling, Arch: amd64
    ● Architecture ········· amd64
    ● Display Server ······· Wayland
      └─ WAYLAND_DISPLAY=wayland-1

  Versions
    ● DMS CLI ·············· dms v2.1.2
      └─ /usr/bin/dms
    ● Quickshell ··········· Quickshell 0.3.2 (revision , distributed by Arch Linux)
      └─ /usr/bin/qs
    ● DMS Shell ············ v2.1.2
      └─ $XDG_RUNTIME_DIR/dms-shell/c1d9d6b0acd2e1e4

  Installation
    ● DMS Configuration ···· Found
      └─ $XDG_RUNTIME_DIR/dms-shell/c1d9d6b0acd2e1e4
    ● shell.qml ············ Present
      └─ $XDG_RUNTIME_DIR/dms-shell/c1d9d6b0acd2e1e4/shell.qml
    ○ Install Type ········· Unknown
      └─ $XDG_RUNTIME_DIR/dms-shell/c1d9d6b0acd2e1e4

  Compositor
    ● niri ················· 26.04
      └─ /usr/bin/niri
    ○ Active ··············· niri
    ● Background Blur ······ Supported
      └─ Compositor supports ext-background-effect-v1

  Quickshell Features
    ● Polkit ··············· Available
      └─ Authentication prompts
    ● IdleMonitor ·········· Available
      └─ Idle detection
    ● IdleInhibitor ········ Available
      └─ Prevent idle/sleep
    ● ShortcutInhibitor ···· Available
      └─ Allow shortcut management (niri)
    ● BackgroundBlur ······· Available
      └─ Background blur API support in Quickshell

  Optional Features
    ● accountsservice ······ Available
      └─ User accounts
    ● power-profiles-daemon  Available
      └─ Power profile management
    ● logind ··············· Available
      └─ Session management
    ● cups-pk-helper ······· Available
      └─ Printer management
    ○ I2C/DDC ·············· No monitors detected
      └─ External monitor brightness control
    ● qt6-imageformats ····· Installed (1 formats)
      └─ Formats: GIF (/usr/lib/qt6/plugins/imageformats:/usr/lib64/qt6/plugins/imageformats)
    ● kimageformats ········ Installed (4 formats)
      └─ Formats: AVIF, HEIF, JXL, EXR (/usr/lib/qt6/plugins/imageformats:/usr/lib64/qt6/plugins/imageformats)
    ● Terminal ············· ghostty, kitty, alacritty
    ● Network ·············· iwd + systemd-networkd
      └─ iwd + systemd-networkd detected. Using iwd for Wi-Fi association and networkd for IP/DHCP.
    ● matugen ·············· Installed
      └─ Dynamic theming
    ● cava ················· Installed
      └─ Audio visualizer
    ○ khal ················· Not installed
      └─ Calendar events
    ● dux-search ··········· Installed
      └─ File search
    ● dux-calendar ········· Installed
      └─ Calendar app
    ● dux-files ············ Installed
      └─ File manager
    ○ fprintd ·············· Not installed
      └─ Fingerprint auth
    ● adw-gtk3 ············· Installed
      └─ GTK3 dynamic theming (user copy)

  Config Files
    ● settings.json ········ Present
      └─ ~/.config/dms/settings.json
    ● clsettings.json ······ Present
      └─ ~/.config/dms/clsettings.json
    ● plugin_settings.json · Present
      └─ ~/.config/dms/plugin_settings.json
    ● session.json ········· Present
      └─ ~/.local/state/dms/session.json
    ● dms-colors.json ······ Present
      └─ ~/.cache/dms/dms-colors.json

  Services
    ● dms.service ·········· enabled, active
      └─ Wanted by niri.service
    ● greetd ··············· enabled
    ● xdg-desktop-portal ··· Settings portal reachable

  Environment
    ○ QT_QPA_PLATFORMTHEME · gtk3
    ● gtk3 plugin (Qt6) ···· Installed
      └─ /usr/lib/qt6/plugins/platformthemes/libqgtk3.so
    ○ QT_QPA_PLATFORMTHEME…  gtk3
    ○ QS_ICON_THEME ········ Not set
    ○ XDG_MENU_PREFIX ······ Not set

  Fonts
    ● Normal Font ·········· Google Sans Flex
      └─ $XDG_RUNTIME_DIR/dms-shell/c1d9d6b0acd2e1e4/DCommon/assets/fonts/google-sans-flex/GoogleSansFlex.ttf
    ● Monospace Font ······· Fira Code
      └─ $XDG_RUNTIME_DIR/dms-shell/c1d9d6b0acd2e1e4/DCommon/assets/fonts/nerd-fonts/FiraCodeNerdFont-Regular.ttf
    ● Display Font ········· DM Serif Display
      └─ $XDG_RUNTIME_DIR/dms-shell/c1d9d6b0acd2e1e4/DCommon/assets/fonts/dm-serif-display/DMSerifDisplay-Regular.ttf

  ──────────────────────────────────────
  ✓ All checks passed!

Description

On DMS 2.1.2 with iwd 3.12 and systemd-networkd 262.2, switching between two saved Wi-Fi networks from Control Center can show a “Failed to connect” toast even though the target network connects and gets an IP address.

In a live reproduction, DMS reported assoc-timeout while iwd was still connecting to the target network. DMS reported the target as connected and cleared the error about 220 ms later. The interface acquired an IPv4 address less than a second after the error.

Expected Behavior

Keep the new connection pending while iwd disconnects from the previous network and connects to the target. Show a failure toast only if the target connection attempt fails.

Steps to Reproduce
  1. Use DMS 2.1.2 with the iwd + systemd-networkd backend and two saved Wi-Fi networks in range.
  2. Connect to the first network.
  3. Open Control Center → Network and select the second saved network while the first is still connected.
  4. Watch for a failure toast, then check the active network and IP address. Repeat the switch if needed, since the result depends on event timing.
Error Messages/Logs

Excerpt combining iwd, DMS IPC, and systemd-networkd logs. The target SSID is anonymized.

11:22:05.115  iwd: old network disconnected; connecting to <target>
11:22:05.192  DMS: SSID=<target>, connected=false, lastError=assoc-timeout
11:22:05.337  iwd: <target> connected
11:22:05.410  DMS: SSID=<target>, connected=true, lastError=""
11:22:05.923  systemd-networkd: IPv4 address acquired

Likely cause: The iwd signal handler can process an earlier disconnected event and then query the live ConnectedNetwork property. If iwd has already advanced to the target network, DMS can attribute the old disconnect to the new attempt and finalize it as failed. Relevant code in v2.1.2

I replayed the same disconnect event against the unmodified v2.1.2 handler on a private D-Bus. When ConnectedNetwork still returned the old network, the new attempt stayed pending. When it returned the target network, the handler emitted assoc-timeout, then cleared it on the subsequent connected event. All three runs produced the same result.

Dominant language
QML
Stars
8.4k
Forks
549
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AvengeMedia/DankMaterialShell

All issues in AvengeMedia/DankMaterialShell

Similar issues

More Networking issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.