Repository navigation
Battery draining on android #7663
Copy link
Copy link
Closed
Labels
approvedbugfeature: auto uploadfeature: power managementPower / battery mattersPower / battery mattersneeds reviewPotentially out of date or duplicate and/or fixed or mostly fixed so needs a status updatePotentially out of date or duplicate and/or fixed or mostly fixed so needs a status update
Description
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) ...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
approvedbugfeature: auto uploadfeature: power managementPower / battery mattersPower / battery mattersneeds reviewPotentially out of date or duplicate and/or fixed or mostly fixed so needs a status updatePotentially out of date or duplicate and/or fixed or mostly fixed so needs a status update
Activity
skjnldsv commentedon Dec 13, 2020
Hi, sorry, but what does it have to do with contacts?
kinorai commentedon Dec 14, 2020
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
skjnldsv commentedon Dec 14, 2020
Moving to the android repo
kinorai commentedon Dec 16, 2020
So no idea?
tobiasKaminsky commentedon Dec 18, 2020
what device do you have?
Have you enabled auto sync?
kinorai commentedon Dec 18, 2020
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
ezaquarii commentedon Dec 18, 2020
Can you check logs on the server to see if you get a lot of
PROPFINDrequests coming from the device every 15 minutes? :)yawicz commentedon Feb 4, 2021
@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
PROPFINDcommands?On both phones, the app is completely closed (not stopped via the app settings, but closed from task manager) and auto upload is deactivated.
ezaquarii commentedon Feb 5, 2021
@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.
github-actions commentedon Mar 5, 2021
jeffWelling commentedon Mar 14, 2021
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.
110 remaining items
trostn commentedon Feb 12, 2024
I have the same problem. Please don't forget about it.
The suggested option to have the app just syncing over night or in a configurable schedule would be really nice and could also be a solution to this problem.
TheOneOgre commentedon Apr 21, 2024
Please add a scheduled upload or only at night or something along those lines. Even if it's not a permanent fix, it's a damn good workaround and as an option shouldn't hurt anything
tperka-catalogicsoftware commentedon Jun 19, 2024
Still the same problem on 3.29.0 version running on Pixel 6. Enormous battery usage. Why can't we select
auto-sync dailyjust like in case of contacts and calendar?animalite commentedon Jul 10, 2024
I'm having the same problem. Huge battery drain and "Preparing auto-upload" notification present every few minutes. I'm on Lineage OS 20.
lckarssen commentedon Aug 26, 2024
Same problem here with Nextcloud client being listed as the app that consumes most battery, as well as the frequent "Preparing auto-upload". This is on a Samsung S22, Nextcloud client v3.29.2, with 3 accounts to 3 different servers (all 29.x.x), but only one account has auto-upload enabled.
#12141 is probably related/duplicate. For me this has been a problem since roughly September 2023, when I created #11983.
Mattie112 commentedon Aug 26, 2024
Since a couple of weeks I have the same indeed. It has been good for a long time for me but now lots of "preparing auto-uploads" (even when no picture / screenshot was taken). Battery is worse that it was.
joshtrichards commentedon Aug 30, 2024
Related: #13008
d4f0 commentedon Oct 1, 2024
I've been having this issue for the last month and in my case it seems to be related to a faulty charging port. Last week the charging port stopped working, i've replaced it and the high battery drain has dissapeared. The app is the same version and other than the charging port I can't think of any change.
acardona commentedon Oct 23, 2024
I have the same problem: very excessive battery usage by the Nextcloud app. Battery used to last 2 to 3 days, now it lasts less than 1 day. The change was exactly started when I installed the Nextcloud app and set it up to auto-update my image and movie folders, as well as my contacts.
Phone: Android Samsung Galaxy A14.
Update: Today the Nextcloud app used 27.5% of the battery, even though I created no new documents or photos, so there was nothing to backup.
joshtrichards commentedon Oct 23, 2024
@acardona Please make sure your situation isn't #13738 in v3.30.1 which is unrelated.
acardona commentedon Oct 23, 2024
acardona commentedon Oct 24, 2024
In the 15 days or so that I've had NextCloud installed, it used up 8 GB of bandwidth when not on wifi. In other words it's uploading and reuploading everything at least daily, as if it wasn't able to detect that the files haven't changed, as if the file watcher thread was misreading the timestamps or checksums or whatever it is that is used to determine if a file has changed.
By the way issue #13738 is reported as done, and that the F-droid should be serving an updated version soon.
Indeed the symptoms described by ZetaTom here #13872 match pretty much what I am seeing, despite F-droid claiming my installed version is v3.30.0 and not v.3.30.1.
joshtrichards commentedon Jan 29, 2025
In the five years since this Issue was created, a number of changed have been made.
Some of you have reported improvements. Some have reported no change.
Are things perfect? Unlikely.
Unfortunately, it's likely that there are several distinct problems being reported here (that just happen to each result in battery drain). For example, some of the situations described in this Issue did not even exist at the time of OP's post (they were introduced along the way and since fixed). As a result at this point this Issue has become a "catch all" issue.
Since the original matter(s) have been targeted and the older reports can't really be relied upon at this point due to significant code base changes, it seems best to shift gears: If you're experiencing battery draining related issues please report them in dedicated new Issues (with all the details about your configuration/use case) rather than commenting here.
We need to look at each situation individually.
This will ensure we have the data needed to look into your particular matter rather than a mishmash of conflicting data from all the of fixed, mostly fixed, somewhat fixed, not at all fixed, etc. matters that have ended up being discussed in this Issue over the past few years.
P.S. This was your issue originally, @kinorai. Don't hesitate to ping us if you're still experiencing it.