From 2fb33a2a6a83d1735cf44ab95e8daf8a255de156 Mon Sep 17 00:00:00 2001 From: Ryan Hughes Date: Mon, 27 Jul 2026 11:29:03 -0400 Subject: [PATCH] Prevent showing disconnected icon when connected on another device --- shell/plugins/panels/network/Panel.qml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/shell/plugins/panels/network/Panel.qml b/shell/plugins/panels/network/Panel.qml index 935d1673..aa55f1dd 100644 --- a/shell/plugins/panels/network/Panel.qml +++ b/shell/plugins/panels/network/Panel.qml @@ -377,12 +377,19 @@ Panel { return Model.formatPacketLoss(percent) } + // Prefer a connected device: a machine can expose several NICs of the + // same type (e.g. an idle onboard port alongside the active adapter), + // and the first-enumerated one may be carrierless. function findDevice(type) { var devices = networkDevices || [] + var fallback = null for (var i = 0; i < devices.length; i++) { - if (devices[i] && devices[i].type === type) return devices[i] + var device = devices[i] + if (!device || device.type !== type) continue + if (device.connected) return device + if (!fallback) fallback = device } - return null + return fallback } function findConnectedWifiNetwork() {