https://bugs.kde.org/show_bug.cgi?id=527012

Leo Gaggl <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
                 CC|                            |[email protected]
             Status|REPORTED                    |CONFIRMED

--- Comment #4 from Leo Gaggl <[email protected]> ---
I can confirm this on a second device and OS, with a measured battery cost. The
current behaviour is a real drain, not just a theoretical one, and I don't
think it should be the default.

Device: Pixel 10 Pro, GrapheneOS 2026102101 (Android 17), KDE Connect Android
1.37.0 (installed via Obtainium), paired with one Linux desktop over home
Wi-Fi.

Run 1 (24 h 10 min on battery, default settings):
- WiFi multicast wake lock under KDE Connect's UID: 87 acquisitions, held 24 h
9 min, i.e. the whole run.
- Wi-Fi kernel active 83.5% of the time; 9,801 wakeups from the Wi-Fi chip
(1238 dhdpcie_host_wake).
- Wi-Fi rail drain 1,095 mAh (45 mAh/h). Screen-off drain 60 mAh/h.
- KDE Connect itself is billed 0.58 mAh, because the cost lands on the Wi-Fi
chip and not on the app. That makes the cause very hard for users to find from
Android's battery screen.

Run 2 (18 h 24 min, same phone and network): the only change was turning on
Trusted networks with an empty list, which makes
MdnsDiscovery.startDiscovering() return before acquiring the lock.
- Multicast lock held about 2 min in total. `dumpsys wifi` shows no lock
owners.
- Wi-Fi kernel active 47.8%; Wi-Fi wakeups about 2,660 per 24 h (-73%).
- Wi-Fi rail drain 33 mAh/h (-27%). Screen-off drain 47 mAh/h (-22%).
- The already-paired laptop stayed connected while the phone stayed on the home
network.

The two days weren't identical (run 2 had more screen-on, GPS and cellular use,
so I'm not quoting whole-phone totals), but the Wi-Fi and screen-off figures
are directly comparable, and the change follows the lock.

The workaround has two costs. Trusted networks need location permission to read
the SSID, which is an awkward trade-off on a privacy-focused phone. And with
discovery off, the phone no longer reconnects by itself after changing
networks: I have to open KDE Connect on the phone before the laptop connects.
That suits me, since I'd rather connect deliberately, but most users expect it
to reconnect in the background, and many will never find the setting anyway,
since they don't attribute the drain to KDE Connect.

Current master (e1c3129) still acquires the lock in startDiscovering() and only
releases it in stopDiscovering(), so it is held for as long as the phone stays
on one network. Bounding discovery to a short window, as in Noah's patch in
comment 3, looks like the right default: paired devices stay connected over
TCP, and because a network change still triggers an immediate refresh, it keeps
the automatic reconnection that the Trusted networks workaround loses. I'd be
glad to test a build with that patch on this device and post the same
before/after figures.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to