omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Network icon incorrectly switches from Ethernet to Wi-Fi after NetworkManager restart

Open drissmoslih opened this issue 2 months ago • 6 comments

System details

  • Omarchy 4.0.4-1
  • Affected component: omarchy.network

Description

After restarting NetworkManager, the network icon in the omarchy.network widget incorrectly changes from the Ethernet icon to the Wi-Fi icon, while the actual network connection remains Ethernet.

NetworkManager and the routing table continue to correctly report enp34s0 as the connected and active interface.

Restarting the Omarchy shell immediately restores the correct Ethernet icon.

Steps to reproduce

  1. Start Omarchy with an active Ethernet connection.
  2. Confirm that omarchy.network displays the Ethernet icon.
  3. Restart NetworkManager: sudo systemctl restart NetworkManager
  4. Wait for the Ethernet connection to be restored.
  5. Observe the network icon.

Actual behavior

The icon changes from Ethernet to Wi-Fi, although the connected interface remains Ethernet.

Immediately after reproducing the issue:

$ nmcli device status

DEVICE      TYPE      STATE                   CONNECTION
enp34s0     ethernet  connected               Wired connection 1
tailscale0  tun       connected               tailscale0
docker0     bridge    connected (externally)  docker0
lo          loopback  connected (externally)  lo

The routing table also confirms that Ethernet remains the active interface:

$ ip route

default via 192.168.1.1 dev enp34s0 proto static metric 100
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
192.168.1.0/24 dev enp34s0 proto kernel scope link src 192.168.1.69 metric 100

There is no Wi-Fi interface involved in the active connection.

Workaround

Running: omarchy restart shell immediately restores the Ethernet icon.

This indicates that restarting the shell causes the network state used by the widget to be reinitialized correctly.

Expected behavior

After NetworkManager restarts and the Ethernet connection is restored, omarchy.network should automatically refresh its network state and continue displaying the Ethernet icon.

A shell restart should not be required.

Likely cause

This appears to be related to #7324.

That issue documents a NetworkManager/Quickshell networking state desynchronization after NetworkManager restarts.

The network widget relies on the Quickshell networking state to determine the connection type. If that state is not correctly re-bound after NetworkManager's D-Bus service restarts, the widget can display an incorrect connection icon even though NetworkManager itself reports the correct device state.

Proposed fix

Quickshell.Networking should detect when NetworkManager's D-Bus service is restarted and automatically re-bind/refresh its network state.

This should re-synchronize the wired and Wi-Fi device states with omarchy.network without requiring a shell restart.

drissmoslih avatar Sep 27 '26 23:09 drissmoslih

Thanks for the clear repro. This looks like the same NetworkManager-restart desync tracked in #7324 (the panel shows "not connected" after an NM restart). An older open PR, #8087, makes the network widget re-read its state after NetworkManager restarts. It currently has merge conflicts, so it needs a rebase before it can be tested.

One detail that would help: nmcli device status shows no Wi-Fi device at all, yet the icon flips to Wi-Fi. Does this machine have a Wi-Fi card that's disabled or rfkill'd? The output of rfkill list and nmcli radio, taken while the icon is wrong, would show where the widget gets its Wi-Fi state from.

jandrusk avatar Oct 07 '26 13:10 jandrusk

Thanks @jandrusk for the clarification and for pointing me to #8087.

There is no Wi-Fi card or adapter connected to this machine, so rfkill reports nothing and nmcli radio reports WIFI-HW as missing, as shown in the command outputs below. The machine is connected exclusively via Ethernet.

I ran both commands while the icon was in the incorrect state:

rfkill list
(no output)
nmcli radio
WIFI-HW  WIFI     WWAN-HW  WWAN
missing  enabled  missing  enabled

Hopefully this helps narrow down where the widget is getting the Wi-Fi state from.

drissmoslih avatar Oct 07 '26 14:10 drissmoslih

Thanks, that settles it. With no Wi-Fi hardware at all, the icon you're seeing is almost certainly 󰤮 (Wi-Fi with a slash), which the widget uses for disconnected, not for an actual Wi-Fi connection. In shell/plugins/panels/network/Panel.qml, kind falls back to "disconnected" when Quickshell's wired device doesn't report connected. After a NetworkManager restart, Quickshell's NM objects go stale, so the widget thinks Ethernet is down until the shell restarts.

So this is the NM-restart desync from #7324. Two open PRs target it: #13662 (prefers the route-based omarchy-network-status for the bar icon and names this issue) and #8087 (re-subscribes when NetworkManager's D-Bus name changes owner, currently conflicting). Testing #13662's Panel.qml with your restart repro would be a useful data point there.

jandrusk avatar Oct 08 '26 13:10 jandrusk

Thanks for mentioning the two PRs (#13662 and #8087). I tested the relevant changes from #13662 against my original reproduction. Specifically, I made the following changes to Panel.qml.

First, I added the info.type checks to the existing kind block:

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

Then I added the following 5-second polling section:

// Keep the bar icon updated while the panel is closed.
Timer {
  id: barStatusPoll
  interval: 5000
  repeat: true
  running: !root.opened
  triggeredOnStart: true
  onTriggered: if (!detailsProc.running) detailsProc.running = true
}

After restarting the shell and then restarting NetworkManager, the Ethernet icon remained unchanged without needing to restart the shell. So these changes (from #13662) appear to resolve the issue in my case.

However, I don't consider this a permanent fix, due to the same concerns you mentioned about the 5-second polling (battery cost and privacy regression), especially since omarchy-network-status --verbose performs network probes while the panel is closed. The approach in #8087 appears to be a better direction for a permanent fix, since it addresses the NetworkManager state desynchronization itself.

drissmoslih avatar Oct 08 '26 15:10 drissmoslih

I reproduced this on a fresh Omarchy 4.0.4 worker VM running current quattro (7dd477b35), with Quickshell 0.3.1, the version stable ships today. The bar showed the Ethernet icon. After sudo systemctl restart NetworkManager it switched to 󰤮 and was still showing it 90 seconds later, while nmcli reported the wired device connected. omarchy restart shell brought the Ethernet icon back. As @jandrusk worked out, 󰤮 is the widget's "disconnected" icon (connectionIcon in shell/plugins/panels/network/Model.js), not a Wi-Fi connection. The bar works out kind in shell/plugins/panels/network/Panel.qml from Quickshell's NetworkManager device objects alone, and those never recover after the daemon restarts.

Quickshell itself has fixed the cause. quickshell-mirror/quickshell#991 (merged 2026-08-26, written for #7324) adds a NetworkManager service watcher that rebuilds device state when the daemon restarts, and it is in Quickshell 0.3.2. I moved the same worker to the edge channel (Qt 6.12, Quickshell 0.3.2-4), confirmed the running shell was the new binary, and restarted NetworkManager under it. The Ethernet icon stayed on at 30 and at 90 seconds, with no shell restart. So this is fixed for anyone on edge, and stable gets the fix when it moves to Quickshell 0.3.2.

That bears on the two open pull requests: #13662 (polls omarchy-network-status every 5 seconds while the panel is closed) and #8087 (restarts the whole shell when NetworkManager's D-Bus name changes owner). Both work around the stale Quickshell state. With 0.3.2 that state no longer goes stale, so neither may be needed. Whether to close this issue and #7324 once 0.3.2 reaches stable, and what to do with the two pull requests, is up to the maintainer.

Checked by Claude Opus 5.5, with a second opinion from Codex Medium. Codex found the upstream Quickshell fix. I confirmed it in the Quickshell repository and then tested it on the worker.

omarchybot avatar Oct 13 '26 04:10 omarchybot

I can confirm that the issue is now resolved on my machine after the latest Omarchy update, which includes the updated Quickshell version (0.3.2). Restarting NetworkManager no longer causes the Ethernet icon to change incorrectly to 󰤮 . Thanks for investigating this!

drissmoslih avatar Oct 20 '26 14:10 drissmoslih