Skip to content

Conversation

@bt90
Copy link
Contributor

@bt90 bt90 commented Dec 22, 2025

Purpose

As proposed in https://forum.syncthing.net/t/syncthing-fork-v2-uses-far-too-much-battery-over-v1/25384/124?u=bt90, the cellular interfaces on Android devices should not be woken up by local discovery in order to preserve battery life. These interfaces are marked as point-to-point on Android, which sets them apart from regular local interfaces such as Wi-Fi. Another typical use case for P2P interfaces is a VPN, but these TUN interfaces usually don't support broadcast or multicast, so we're not breaking any existing functionality.

I also added an additional FlagRunning check for the multicast listener. The group join can only be done by sending IGMP packets and I doubt this is going to work on an interface that's not running 😅

Testing

researchxxl/syncthing-android#75 (comment)

https://forum.syncthing.net/t/syncthing-fork-v2-uses-far-too-much-battery-over-v1/25384/128?u=bt90

Authorship

Your name and email will be added automatically to the AUTHORS file
based on the commit metadata.

@github-actions github-actions bot added the bug A problem with current functionality, as opposed to missing functionality (enhancement) label Dec 22, 2025
Signed-off-by: bt90 <btom1990@googlemail.com>
Signed-off-by: bt90 <btom1990@googlemail.com>
researchxxl added a commit to researchxxl/syncthing-android that referenced this pull request Dec 23, 2025
authored by bt90 syncthing/syncthing#10504
intended to solve the huge battery drain while syncthing local discovery is turned on
@wilriker
Copy link

I run a build of Synching-Fork with this change on my Pixel 8 with Android 16 since last night and I can confirm that this solves the battery draining issue.

@researchxxl
Copy link

this seems to help the users of affected phones so would love to see this rc.2 =)

researchxxl/syncthing-android#75 (comment)

researchxxl/syncthing-android#75 (comment)

Copy link
Member

@calmh calmh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable

Signed-off-by: bt90 <btom1990@googlemail.com>
@bt90 bt90 marked this pull request as ready for review December 23, 2025 18:11
@bt90
Copy link
Contributor Author

bt90 commented Dec 23, 2025

Let's wrap this up in time for Christmas 🎅 🎁

@calmh calmh enabled auto-merge (squash) December 23, 2025 18:34
@calmh calmh merged commit b7b494b into syncthing:main Dec 23, 2025
31 checks passed
@bt90 bt90 deleted the skip_cellular branch December 23, 2025 18:57
Martchus pushed a commit to Martchus/syncthing that referenced this pull request Dec 26, 2025
Martchus added a commit to Martchus/syncthingtray that referenced this pull request Dec 26, 2025
Martchus pushed a commit to Martchus/syncthing that referenced this pull request Jan 6, 2026
chenxiaolong pushed a commit to chenxiaolong/syncthing that referenced this pull request Jan 7, 2026
chenxiaolong added a commit to chenxiaolong/BasicSync that referenced this pull request Jan 7, 2026
This prevents the cellular interfaces from being used by the local
discovery feature.

Upstream PR: syncthing/syncthing#10504
Upstream commit: b7b494b7cfaba642cded88073999bdefee472332

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug A problem with current functionality, as opposed to missing functionality (enhancement)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants