Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constant high CPU load #1523

Closed
frainz-de opened this issue Oct 27, 2021 · 29 comments
Closed

Constant high CPU load #1523

frainz-de opened this issue Oct 27, 2021 · 29 comments

Comments

@frainz-de
Copy link

Hi,

I have a similar situation as #1110, but as this was fixed in 6.13, I guess this is a new issue. I'm seeing a constant CPU usage by com.simplemobiletools.calendar.pro between 50% and 150% in top (via termux). In addition, com.android.providers.calendar and system_server also seem unusually high. I have some calendars synced with DavX5 and some with Etesync.
I suspect that something triggers sync too often, but I'm not sure about that.

I will send you the logcat logs via email as I'm not sure I can sanitize them enough for the open internet.

App version: 6.15.4
Android version: 8.0.0

@tibbi
Copy link
Member

tibbi commented Oct 27, 2021

Do you have CalDAV sync enabled, or you have events stored locally only?

@frainz-de
Copy link
Author

Yes, I have caldav sync enabled. But the actual sync should be done by DAVx5 and Etesync, right?

@tibbi
Copy link
Member

tibbi commented Oct 27, 2021

well the app checks it too though. Try disabling one of those services to see if it will still happen.

@frainz-de
Copy link
Author

Does it trigger the other services to sync? I will wait until it happens again and tell you if disabling Davx5 or Etesync helped.

@tibbi
Copy link
Member

tibbi commented Oct 27, 2021

Well it can trigger them. But it should still happen only from time to time, not constantly.

@jakobroehrl
Copy link

If have the same problem, the latest version drains the battery. Changed nothing after the update.

@frainz-de
Copy link
Author

I didn't get the issue for a few days with caldav sync disabled entirely and also with it enabled but only for a single Etesync calendar. So I guess the issue is with DAVx5? But I'm not sure since the issue was so sporadic to begin with.

@jakobroehrl
Copy link

I will test some days with another calender app and davx5

@michaelof
Copy link
Contributor

Same battery drain here. Nokia 7.1 and 7.2, latest F-Droid version 6.15.4.
Used with Nextcloud/calDAV, synched via DAVx5

@michaelof
Copy link
Contributor

@tibbi : As the Android system settings are saying that Simple Calender app and not davx5 is cosuming the cpu power, how can we test/narrow down the root cause? FYI in Apps / Apps usage Simple Calender is shown as #1 app,up to 20+% o a fully loaded battery. THis even with sync settings set to sync every 30 min for calendar entries. E.g. K9-Mail, where I have several IMAP PUSH connections in use for several email accounts, so permanently connected, just consumes 3%, in average

I've tried myself and set davx5 sync settings to "manual only", will report here if any change.

Somewhat painful issue, on both my wife's and my mobile ;)

@tibbi
Copy link
Member

tibbi commented Nov 17, 2021

Im not sure, it is apparently some CalDAV syncing related issue, like it happens too often. I dont have it on my devices though and actually not many people reported it, so it looks like something device or setup specific.

@nicolasGrim
Copy link

Hi i'm having the same issue regarding battery usage on a oneplus nord ce, with the latest version on f-droid.
I also have DAVx5 and simple calendar working together, and the calendar uses at least 10 percent of a full battery.
Never tried Etesync so I'll give it a go and let you know.

@Tentos
Copy link

Tentos commented Nov 21, 2021

I recently had a similar problem when updating to version 6.5.13 and 6.5.14 6.15.13 and 6.15.14: For unknown reasons, Simple Calendar started to synchronize my Caldav account every couple of seconds. I noticed this because this triggered a reload of the appointments in my custom ROM calendar app (i.e., the /e/OS Etar calendar fork), which shows a small notification during the calendar synchronization.

I do not have this problem with version 6.5.12 6.15.12. Unfortunately, I cannot tell what could have led to this strange bug, and whether it is ROM related. Maybe the others in this thread could try to downgrade/reinstall version 6.5.12 6.15.12 and see whether the CPU problem is still there?

@tibbi
Copy link
Member

tibbi commented Nov 21, 2021

Is that a typo or you really mean app versions like 6.5.13? Those are ancient ones.

@Tentos
Copy link

Tentos commented Nov 21, 2021

(I hope to not have mixed up the version scheme or something similar...) Yes, I indeed mean versions 6.5.12-6.5.14 of Simple Calendar Pro. You are right, an obvious typo: I meant versions 6.15.12-6.15.14

  • Version 6.15.12 (from 26 September 2021): normal synchronization in the set interval (in my case, every 4 hours)
  • Version 6.15.13 (from 11 October 2021): synchronization every couple of seconds (reason unknown)
  • Version 6.15.14 (from 14 October 2021): synchronization every couple of seconds (reason unknown)

@michaelof
Copy link
Contributor

Im not sure, it is apparently some CalDAV syncing related issue, like it happens too often.

Hi Tibbi, battery drain drops to <5% if DAVx5 option for calendar entries sync interval is set to "manual only". Nevertheless 5% for doing more or less nothing seems still too much :) Tried today with the newest SimpleCalendar version and DAVx5 sync settings set to "every 60 minutes" - 20% battery since last 100% charge, 15% left in total.

I haven't found the possibility in DAVx5 Github for issues, so opened a thread in their forum, FYI crosslinked: https://forums.bitfire.at/topic/2643/battery-drain-with-davx5-and-simplecalendar

Interesting for me is that SimpleContacts, using same Nextcloud account synced via same account in DAVx5, does NOT have this draining issue...

@michaelof
Copy link
Contributor

@tibbi there are answers in the DAVx5 forum, esp. this finding:

So the system permanently starts DAVx5 with the information that something in the calendars has changed (“upload”). (Note that DAVx5 doesn’t start itself, but it is managed by the Android sync framework, which starts a sync when the content has changed). So I guess there’s really something changing the calendars/events permanently. But I don’t know the real cause.

As I'm using SimpleCalendar only, seems at first that SimpleCalendar must trigger this, somehow.

@tibbi
Copy link
Member

tibbi commented Dec 29, 2021

try the version mentioned at #1037 (comment) please, if it will still happen

@michaelof
Copy link
Contributor

@tibbi Android refuses to install mentioned version.

  • downloaded apk.zip
  • renamed, with SimpleFilemanager
  • enabled SimpleFilemanager as trusted source for installs
  • tried to install. looks normal at first, but last dialogue says: "App hasn't been installed" (translated from German)

any hints?

@Tentos
Copy link

Tentos commented Dec 30, 2021

@michaelof Did you install Simple Calendar Pro from F-Droid? If yes, your current installation is signed by F-Droid while @tibbi's apk is signed by him. Android does not seem to allow an app update if the signatures differ.
Unfortunately, you have to uninstall your current installation first to install this new version.

Please note: If you want to revert to the old version afterwards, you will again to have uninstall Simple Calendar. Moreover, make sure that you have access to the apk of the old version. (I am currently stuck with 6.15.12, which is not available in F-Droid anymore. I have manually downloaded this version a couple of weeks ago to have a working version of Simple Calendar for the time being if I had to reinstall it.)

@michaelof
Copy link
Contributor

@Tentos thanks for your hint, installed yesterday after having uninstalled the other version.

@tibbi your suggested version solves the issue for me, SimpleCalendar now does not even show up in battery using app statistics, currently. What are your plans to merge this app version with the current trunk?

@Tentos
Copy link

Tentos commented Jan 1, 2022

Unfortunately, the problem occurs with this version when I save an existing calendar entry on CalDAV. I have to force-stop the calendar app in the Android app info, and the frequent updates stop.
Edit: I have four calendars - the regular (offline) calendar, the calendar for public holidays, and two CalDAV calendars. I have tried whether the deletion of the holiday calendar could solve the problem, but this was not the case.

@michaelof
Copy link
Contributor

Confirmed :( As soon as you create a new event or update an existing event, the "Sending local deletes/updates to server” every minute starts again...

@tibbi
Copy link
Member

tibbi commented Jan 1, 2022

are you using Birthday adapter by any chance?

@michaelof
Copy link
Contributor

As I wasn't aware of this app until now, I just double checked: NO, not installed.

@tibbi
Copy link
Member

tibbi commented Jan 1, 2022

possible fix found, please check #1037 (comment)

@Tentos
Copy link

Tentos commented Jan 2, 2022

possible fix found, please check #1037 (comment)

This indeed seems to fix the problem. I have modified some calendar entries, and the frequent updates did not happen anymore. :)

@tibbi
Copy link
Member

tibbi commented Jan 2, 2022

okay, Ill close it then, let me know if it wont work in the new version 6.17.0. Thanks

@tibbi tibbi closed this as completed Jan 2, 2022
@Tentos
Copy link

Tentos commented Jan 16, 2022

I can confirm that the fix also works in Version 6.17.0 (in my case, the F-Droid build). Thank you for your work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants