Don't start akonadi at login if it is not used
Open, Needs TriagePublic

Description

Quite a few people don't use korganizer. Nevertheless the 'Event reminder daemon' is started on login by default. This triggers an akonadi daemon start. (Verified on 2 Yakkety Systems that this prevent the autostart of akonadi)

IMHO, we should not trigger an unnecessary login delay and permanent resource allocation/consumption of akonadi as long as the user does not use it.

I'll suggest to turn off autostart of the ''Event reminder daemon'.

TODO: Check/Verify that if a user starts using korganizer, that

a) event daemon is set to autostart
or
b) user is asked if he want's to use the feature.

Even if it does not do a) or b) autostart off is the better default IMHO.

clivej created this task.Jan 18 2017, 11:47 PM

I'd have a better proposal: Let's not ship preinstalled KDE-PIM. Many people don't use it, and it's easily installed if needed. we can launch a pol in the community and ask what do they think. I've removed it from my system, and the system is twice as fast, and less memory is used.

We may be unable to include PIM on 17.04. So what should we include instead? Trojita? If so, we should get some heavy testing done NOW.

If this is an option than I'll test the heck out of it. Just let me know. And also I'd like for us to make sure we have the most recent version possible available in the archive.

Same applies for any other qt/qml based pim application we consider.

clivej added a comment.EditedApr 7 2017, 11:40 AM

I would be +1 for dropping it off our seed for zesty. It should still be installable via apt / discover / muon but as Ovi mentioned it would free up resources and make the system faster. I would far rather have an opt-in solution rather than opt-out as default.

Could a decision on this be fast tracked for a yes/no answer in the next 24 hours?

+1 for not adding KDE PIM by default.
An basic email client is needed still, so I propose we have a easy way to add KDEPIM, like we had for Firefox back in the day.

+1 For setting autostart=off,

+0 for removing it from the seed unless it's known-broken in some major way. I'm not happy about it security wise until we at least have the qtwebengine version, but dropping it from the seed won't help upgrade users in any way.
-1 for replacing it with something else. Then we just end up in a quassel/konversation situation where we end up having to support 2 solutions in parallel for a while.

I am very much with what Philip says: we need to make sure Akonadi only starts if the user really uses PIM. I had the problem it chocked my computer despite me not running any PIM stuff, just because I once opened Kontact, then closed it again. It persistently restarts every time I start Plasma, and that should NEVER happen. Akonadi should only start if the users starts ACTIVELY a PIM application.

We need to make this clear to the KDE PIM folks: this should never start by default. If they can't guarantee this, we should remove it from the ISO and free space for something else.
And now I go to pray in my corner that somebody finally sees sense in the KDE PIM world that choosing Akonadi was an error. I mean even Mir is now dead and buried, keeping bad choices just because nobody is humble enough to admit it was an error to keep this "kraken" alive is so wrong...

rikmills added a subscriber: rikmills.EditedApr 7 2017, 3:48 PM

So, maybe something like?

http://paste.ubuntu.com/24334630/

clivej added a comment.Apr 7 2017, 4:55 PM

Looks good to me

Looks like this patch for korg is enough to prevent akonadi from starting and tying up resources. We could probably shut this down as resolved.

ach added a subscriber: ach.Apr 16 2017, 10:12 AM

IMHO system defaults should make sense. Preconfigured config files in $HOME is IMHO not the way to go. /etc/skel doesn't fix the problem for all our existing users out there that already needlessly run akonadi. Config files in $HOME can also not changed via .deb postinstall

Maybe ...

autostart a wrapper-script instead of the daemon itself. The wrapper could e.g. check if there 'any calendar resource' is configured. Or any other smart thing. Or the 'TryExec' desktop key can contain a make-sense-to-start-reminder-daemon script?

ach added a comment.Apr 16 2017, 10:15 AM

If it's decided to go the /etc/skel route ( -1 from my side ;-) ) , remember that ~/.config has mode 0700 and config files 0600. Are permission fixed later if files from /etc/skel have wrong permission?

Ideally this bug should be opened with the PIM team so that korg is not started by default and maybe even ask the user if they want it started on startup.

After reading this entire thread, I'm revising my thoughts. First, patches are evil. So our thoughts and code should go upstream to KDE PIM.

I very much want a working PIM stack for our users, many of whom use Kubuntu in schools and businesses. They want and even need Kontact, not just a light-weight email client.

That said, there is no reason for akonadi to start when Kontact is shut down. The PIM team should make this so, with our help and encouragement if necessary.

In T5123#89499, @ach wrote:

IMHO system defaults should make sense. Preconfigured config files in $HOME is IMHO not the way to go. /etc/skel doesn't fix the problem for all our existing users out there that already needlessly run akonadi. Config files in $HOME can also not changed via .deb postinstall

I don't disagree. This was just a "sticking plaster" fix a few days from release, to achieve what we wanted without (a) altering the settings on existing installs or users and (b) making patches to code or scripts that would really need much more testing for functionality and consequences than we had time for at that point.

The whole 'kubuntu-settings' needs a thorough review and reworking in the next release, and I hope to do this. Plus see if KDE/PIM are able to do some acceptable changes to the defaults.

In T5123#89538, @clivej wrote:

Ideally this bug should be opened with the PIM team so that korg is not started by default and maybe even ask the user if they want it started on startup.

Yep.

i do use KOrganizer. i don't know what has happened to it in Artful but the reminders don't work any more.

https://www.kubuntuforums.net/showthread.php/72584

i do use KOrganizer. i don't know what has happened to it in Artful but the reminders don't work any more.

https://www.kubuntuforums.net/showthread.php/72584

Sounds like: https://bugs.kde.org/show_bug.cgi?id=384212

clivej removed a subscriber: clivej.Feb 19 2018, 10:12 PM