Skip to content

Network bar icon shows disconnected while Wi-Fi is up (kind uses scan-derived connectedWifiNetwork, stale while panel closed) #10619

Description

@kosovim-dev

System details

  • Omarchy: 4.0.0.r2037.g97a86af-1
  • Quickshell: 0.3.1
  • NetworkManager: 1.58.1
  • Kernel: 7.2.3-arch1-2
  • CPU: Intel Core i7-4770HQ, GPU: Intel Crystal Well integrated

What happened

With the network panel closed, the bar's network widget shows the
"disconnected" glyph (and kind-derived state) while Wi-Fi is associated,
has the default route, and internet works. It stays wrong until the panel is
opened, which restarts scanning and repopulates the network list.

What I expected

The Wi-Fi signal icon whenever the radio is connected, whether or not the
panel has been opened since the shell started.

Root cause

shell/plugins/panels/network/Panel.qml derives the bar icon's kind from
the scan-derived access-point list:

readonly property string kind: {
  if (wiredDevice && wiredDevice.connected) return "ethernet"
  if (connectedWifiNetwork) return "wifi"
  return "disconnected"
}

connectedWifiNetwork comes from wifiDevice.networks, which is populated
by scans. Scanning is deliberately paused while the panel is closed
(setScannerEnabled() only holds scannerEnabled on the device while
opened), so connectedWifiNetwork can be null while the radio is up —
for example after the dock's ethernet is unplugged, or after anything that
rebuilds the NM device list with the panel closed (a VPN integration
adding/removing dummy devices, such as ProtonVPN's pvpn-killswitch /
ipv6leakintrf0). The comment in the existing code already acknowledges the
wired equivalent of this class of problem ("the first-enumerated one may be
carrierless" in findDevice()), and the wired branch of kind correctly
uses live device state (wiredDevice.connected) — but the Wi-Fi branch
depends on scan-derived state that is stale by design while the panel is
closed.

Steps to reproduce

  1. Connect to Wi-Fi, keep the network panel closed.
  2. While it is closed, trigger a rebuild of the scan-derived network list —
    e.g. unplug the dock ethernet, or connect/disconnect a VPN whose NM
    integration adds and removes dummy devices.
  3. The bar icon flips to the disconnected glyph even though ping and
    browsing still work over Wi-Fi. Opening the network panel clears it.

Fix

Use the Wi-Fi device's own connected flag, mirroring the wired branch.
wifiDevice already comes from findDevice(), which prefers a connected
device:

   readonly property string kind: {
     if (wiredDevice && wiredDevice.connected) return "ethernet"
-    if (connectedWifiNetwork) return "wifi"
+    if (wifiDevice && wifiDevice.connected) return "wifi"
     return "disconnected"
   }

I have been running a cloned network panel with exactly this one-line change
since 2026-09-06: the icon tracks Wi-Fi state correctly with the panel
closed, including through VPN connect/disconnect cycles and dock
plug/unplug. Happy to turn this into a PR if that's preferred.

Related staleness with the same root cause: signalStrength also reads
connectedWifiNetwork and reports -1 in this state, which degrades the
signal-glyph choice too — worth addressing if the fix is extended.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions