Syncthing Andoid synchronizes only after restart, on Marshmellow

@Nutomic Syncthing Android is still displayed in the other clients as online but when I take a picture then the picture is not synchronized from the phone to the computer. The photos are only synchronized when I reboot Syncthing on the phone. I have Android 6.0.1

I have the impression that the continuous monitoring of folder is inhibited by marshmallow.

I am not having this issue on my Nexus 5. I have been on 6.0.1 since it was released.

Perhaps storage is a factor… are you on sdcard?

No i have the OnePlus Two with internal storage.

Does the file count change in Syncthing after you add the file? (best check in the web GUI).

Does the file sync if you press the rescan button in the web GUI?

Are there any errors in the logs?

No it does not ad the file

Yes if i press the rescan button in the web GUI syncs the files

@Nutomic I send you the log as message

You’re right, I just tried and inotify also doesn’t work on my device. Will look into it.

2 Likes

Can it be that the Marshmellow switches Wifi off after a long inactivity and Syncthing therefore loses the connection? I also observed that it is no longer possible to deletet folder and clients over the UI (Syncthing GTK and Syncthing Android), only through the web interface. And then just if i delete one folder or client at one time with restarting after each deletion.

I have found the Syncthing is stopped repeatedly and must be restarted manually. This happens even if Syncthing is excluded from the battery save mode and the option to keep the processor awake during sync is on.

Have been using syncthing on a Nexus 6P with 6.0.1 for a few days, with so far no problems. I also use it on an M8 with Cyanogenmod.

Battery Optimisation on 6.0.1 does cause problems - I first noticed it on K9mail which could not sync after long phone inactivity - so I changed syncing apps like syncthing, k9mail to:

Battery Optimisation → Not Optimised

Android syncthing is a bit less reliable than on Linux, both on the 6P and M8 - but if I am having problems a quick “restart” usually fixes it.

But the same as you, I noticed some things work only in android app’s “web gui”.

I noticed on OxygenOS (OnePlus 2) it’s killed if it’s syncing longer than 5-10 minutes due to a custom background checker for CPU usage, added by the development team. It’s never auto-restarted after that until you manually start the application again. Something similar may exist in other ROMs as well.

I’m currently trying out a patched version where the service is put into “foreground-mode” (via startForeground()) which is really meant to be used for interactive services like music playback. Until now, the issue is gone this way. I’ll introduce an experimental option for this soon and hopefully @nutomic will accept it and release it as an experimental option.

1 Like

I have also the OnePlus 2. I could never determine why Syncthing was always stopped.

So I have an similar problem. My Samsung A5 syncs only, when the display is on. Once the display closes, syncthing stops. So thats somehow a bugg I think.

Since syncthing-android 0.8.0 is out, which includes the patch for “Foreground service” in the “Experimental” section, I’d be very happy to get feedback if this solves some problems for others as well.

For me, it does, but I use Syncthing only while on WiFi and while on external power. YMMV for other usage scenarios and other ROMs.

Seems to be working for me!!!:+1:

My Syncthing runs with “Foreground service” turned on now.

I now changed the options back on standard…in the Android Setting i set Syncthing back to be “optimized battery” and in the Syncthing app i have turned the option “Keep the processor awake during synchronization” back to unchecked and it seems that Syncthing is still working!!!

My experience here is, that it depends on the amount of data I transfer. If it keeps the CPU busy for more than 5-10 minutes, it’ll get killed, almost always in my case.