android
android copied to clipboard
Battery draining on android
Battery is completely drained on android, I'd like to send a screenshot of my stats on my samsung
Steps to reproduce
Expected behaviour
Tell us what should happen
Actual behaviour
Tell us what happens instead
Server configuration
Operating system:
Web server:
Database:
PHP version:
Nextcloud version: (see Nextcloud admin page)
Contacts version: (see Nextcloud apps page)
Updated from an older Nextcloud or fresh install:
Signing status:
Login as admin user into your Nextcloud and access
http://example.com/index.php/settings/integrity/failed
paste the results here.
List of activated apps:
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder
Nextcloud configuration:
If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your instance's installation folder
or
Insert your config.php content here
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)
Are you using external storage, if yes which one: local/smb/sftp/...
Are you using encryption: yes/no
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
LDAP configuration (delete this part if not used)
With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your Nextcloud installation folder
Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';
Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.
Client configuration
Browser:
Operating system:
CardDAV-clients:
Logs
Web server error log
Insert your webserver log here
Nextcloud log (data/nextcloud.log)
Insert your Nextcloud log here
Browser log
Insert your browser log here, this could for example include:
a) The javascript console log
b) The network log
c) ...
Hi, sorry, but what does it have to do with contacts?
Oops sorry no idea, but my phone (s20 plus) is showing huge amount of battery used by the nextcloud app, I disabled battery optimization in android because I use auto upload, and I'm not uploading 24/7 so I don't understand the battery drained
A friend of mine has a s20 plus too and he doesn't have this problem

Moving to the android repo
So no idea?
what device do you have? Have you enabled auto sync?
Samsung s20 plus, before I had the Samsung note 10 plus, and I had the same problem.
Yes I have the "auto upload" feature activated
Can you check logs on the server to see if you get a lot of PROPFIND requests coming from the device every 15 minutes? :)
@ezaquarii, I do actually observe exactly the behaviour you describe with two different Android phones having two different user accounts, yes.
I found those entries in the logs of my nginx server running Nextcloud and was wondering whether this should be expected/desired behaviour or not.
Do you have an idea what's going on with those random directory, but very regular PROPFIND commands?
On both phones, the app is completely closed (not stopped via the app settings, but closed from task manager) and auto upload is deactivated.
@yawicz I don't know exactly - as I'm not expert on files sync component - but I can only speculate that it polls the server for changes. I'd additionally check the interval - if it's 15 minutes, that would correlate with default background task wakeup.
One option is to turn on battery optimization for that app - it should stop OS from waking the app and giving it network access frivolously.
Is this expected? Yes, because sync is implemented using polling. Desired - hell no, but the fix is not trivial, to say the least.
This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!
I hope this doesn't get closed because of inactivity, it's a real problem for android users, I'd be happy to help poke at this if there's more info that I can provide?
Maybe instead of just checking every 15 minutes, we could let the user configure this setting? I would be quite happy with a nightly upload, I don't need my phone to check every 15 minutes. I also understand the desire to avoid options overload as mentioned in another Issue comment, but IMO this warrants a user configurable option of some sort.
I'm currently seeing this battery consumption issue.
Android Samsung model SM-G965W Android 10 NextCloud App 3.15.1
AutoUpload is enabled, but has caught up with everything needing to be uploaded.
Do you know how many files/images you have on your device? It scans and compares them to find those needed for upload.
I have the same problem of high battery drain.
Google Pixel 4a 5G Android 11 NextCloud App 3.15.1 (F-Droid-Build) NextCloudPi 20.0.8 ~30GB videos & photos
AutoUpload is enabled, but has caught up with everything needing to be uploaded.
Do you know how many files/images you have on your device?
~15K photos and videos for me, totaling about 60GB.
It scans and compares them to find those needed for upload.
Understandable, but it seems the default value perhaps doesn't work for people with large existing camera rolls, one solution here may be to just let the user configure the app to only check nightly, instead of continuously. Is there any chance such a feature could be implemented, perhaps with a simple checkbox in Settings?
Also open to alternative solutions, maybe just let the user decide how often to check?
Even with working from home, having the app drain battery this fast is a big obstacle for getting the rest of the family to adopt NextCloud, so I'd like to help get this fixed any way I can :)
@jeffWelling are all files uploaded? I currently fear that pending uploads is more draining battery than auto upload does.
I thought the problem came from a large amount of files too. I had 20k files for 185GO, but then i reduced the files to 3k and i have still the same problem....
In my situation, all files are eventually uploaded yes.
@tobiasKaminsky That makes a lot of sense actually. The last few days I'll take a photo of something in the morning to send to someone (garden growth), and it queues for upload but has to wait for me to charge the phone because that's what I config'd, and Android frequently asks me if I'll let it put the app to sleep because of how much battery it's using. I'll try resisting taking pics to see if the battery usage is different with nothing pending an upload, good thought!
Can i provide any additional information to solve this problem?
Maybe instead of just checking every 15 minutes, we could let the user configure this setting? I would be quite happy with a nightly upload, I don't need my phone to check every 15 minutes.
@jeffWelling i really like your solution with making this configurable!
A crontab like config would be great :)
I would also like to put my vote behind having a user configurable sync frequency + a sync now button. For my case, I only sync a few critical files to my phone (less than 5MB) that rarely gets updated, but the battery is draining faster than before I installed the app.
Google Pixel 4a Android 11 NextCloud App 3.15.1 from Google's play store a self hosted Nextcloud 21.0.0 server
Hi, I have been observing a heavy drainage since a couple days. Samsung S9 - Android - April Update Nextcloud Version 3.15.1 4 Auto Upload Folders
Haven't had the problem that extreme. Only a couple auto uploads a day. Up to 85% consuming battery!!!!! (See the screenshot)! No pending uploads.

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!
this is definitely not a stale issue and is an ongoing problem for android users.
Samsung Galaxy Note 8 Android 9 Nextcloud App 3.15.1 Nextcloud Server 20.0.3
Used to be able to leave my phone off the charger overnight and only lose 5% or so battery life. Ever since enabling auto upload, I've seen extreme battery drain from the Nextcloud app and an extremely reduced battery time for my phone.
I found a workaround which isn't ideal but it's the best I got. I enabled battery optimization for the nextcloud app and time to time I launch the app to start the upload. So nextcloud isn't draining battery in the background.
Best fix by nextcloud team would be :
- possibility to put a custom time instead of checking every 15 min
- add a condition to scan only if the phone is charging
I am observing same battery drain as other users. I think, it is connected to auto-update mechanism. I've made all four synchronized folders to upload only when the phone is on charger. It has indeed prevented uploads themselves to happen, but the application regularly checks all the files whether there is anything to upload (even though all folder are configured to not upload on battery) - at the end it never uploads anything when on battery. Configuration option, which would make the Nextcloud check for new files only on charge would probably solve my issues.
This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!
I see there is no activity on this issue and it is about to be closed in 2 weeks. The problem is still there - would it be possible to offer configuration to prevent Nextcloud background operations when not connected to charger?
Same issue here. Nextcloud is basically the biggest battery drainer in the background when I lay my phone overnight during sleep.
No auto sync is turned on, I sync contacts using DavX5, but DavX5 is using less battery overnight.
I don't have any clue what Nextcloud is doing in background, nor do I have any clue why it needs to do those things.
I too am experiencing this as of last week.