SUMMARY kde-apps/kalarm-19.12.3 completely unusable, since most alarms don't appear unless restarting kalarm manually. STEPS TO REPRODUCE 1. Wait for an alarm to trigger. 2. See that it didn't. 3. Restart kalarm. 4. See the alarm pop up a week late. 5. Notice a mysterious "Show Calendars" button and click on it to see what it does. 6. See two calendars called "Active Alarms", one of which (~/.local/share/kalarm/calendar.ics) is forbidden to be disabled, and the other (~/.kde4/share/apps/kalarm/calendar.ics) can be disabled. 7. Disable the one that can be disabled, and see that most alarms are in it (since they disappear). 8. Reenable, and one of the alarms triggers. 9. Disable and reenable again and again, and the same alarm triggers again and again (despite having been closed multiple times). 10. Make a backup copy of the two calendar files. 11. Close kalarm. 12. Manually merge the calendars in a text editor. 13. Reopen kalarm, and see all the alarms have been split back into two files again. 14. Close kalarm. 15. Do 'killall -v -9 akonadi_kalarm_resource' to kill 12 processes. 16. Do 'killall -v -9 akonadi_kalarm_resource' to kill 12 more processes. 17. Do 'killall -v -9 akonadi_kalarm_resource' to kill 12 more processes. 18. Do 'killall -v -9 akonadi_kalarm_resource' and see they finally stopped coming back. 19. Merge the calendars in a text editor again. 20. Open kalarm. 21. See the alarms in two separate files again. 22. Delete the deletable calendar in kalarm 23. Close kalarm. 24 Try to kill any traces of it (although now there aren't any akonadi_kalarm_resource processes to kill). 25. See all alarms are still in ~/.local/share/kalarm/calendar.ics and that ~/.kde4/share/apps/kalarm/calendar.ics is still empty. 26. Reopen kalarm. 27. Wonder why kalarm still isn't showing the alarms in ~/.local/share/kalarm/calendar.ics that used to be in ~/.kde4/share/apps/kalarm/calendar.ics (just showing the few that were already there). 28. Create a new display alarm "test". 29. See that ~/.local/share/kalarm/calendar.ics doesn't get updated. 30. Close kalarm and try to kill any traces in case. 31. See that ~/.local/share/kalarm/calendar.ics still hasn't been updated. 32. Reopen kalarm, and see "test" pop up, despite it not being in ~/.local/share/kalarm/calendar.ics which is the only remaining calendar. 33. Right-click the calendar, choose Import. 34. Select the backup copy of ~/.kde4/share/apps/kalarm/calendar.ics. 35. Click "Open". Nothing happens. 36. Double-click the file to import. Nothing happens. 37. Repeat step 35. and 36. 10 times. 38. Run around in circles screaming in frustration, while pulling hair out. 39. Try typing the name of the backup file called "~\.kde4\share\apps\kalarm\calendar.ics", surrounded by double quotes. 40. Try opening it, which finally works, and it finally imports the alarms into the ~/.local/share/kalarm/calendar.ics calendar. 41. See that the ~/.local/share/kalarm/calendar.ics file hasn't been modified by importing the calendars (which were already in the file, anyway). 42. Report this bug. OBSERVED RESULT See above. EXPECTED RESULT For most steps, pretty much the exact opposite. SOFTWARE/OS VERSIONS Linux/KDE Plasma: (available in About System) KDE Plasma Version: kde-frameworks/plasma-5.67.0-r3 KDE Frameworks Version: 5.67.0 Qt Version: 5.14.1-r4 ADDITIONAL INFORMATION At least there aren't 12 akonadi_kalarm_resource processes thrashing the hard drive constantly forever, like previous versions used to. So despite being completely unusable, the current version is still a major improvement. Come to think of it, it's weird that by the time I got to step 42, it's down to 0 akonadi_kalarm_resource processes, even after restarting kalarm.
Perhaps step 42 will provide the answer after all (I hope) ;) What might fix this is to delete all KAlarm's Akonadi active alarm resources, and then recreate them. To do this, first quit kalarm. Then run akonadiconsole (which you might have to install), and in its Agents tab, select each of the active alarm resources in turn and delete them. This won't affect the calendar files which they use. Now start KAlarm again. It should recreate the Akonadi resource for ~/.local/share/kalarm/calendar.ics, or if not, use the Add button in the Calendars panel (accessed by View Calendars) to recreate it. If there are any other calendars which you want to use, add them here as well. With any luck, that will fix the problems you have seen. Yours is unfortunately one of too many bug reports which are due to Akonadi doing things wrong, in particular not saving calendar updates. For this reason, the next major release of KAlarm (version 3.0) will by default no longer use Akonadi (although Akonadi will remain as a build option), and the type of problem which you have seen should go away. KAlarm version 3.0 will be in the KDE 20.08 release in August. Since you use Gentoo, you could consider downloading the current git master branch for KAlarm, which contains the non-Akonadi build option. Of course, you would need to amend CMakeLists.txt to avoid the build pulling in newer versions of KDE Pim and Frameworks library dependencies. Whether you want to spend time doing that, or rather wait until August for the new release, is your choice.
Thanks, I deleted lots and lots of kalarm entries marked as failed from akonadiconsole. They didn't reappear in akonadiconsole after starting kalarm, but akonadi_kalarm_resource_{15,16,17} is now running, and ~/.local/share/kalarm/calendar.ics seems to get updated now. Hope everything will work, now.
I'm glad it's working now. The problems you report (and particularly any involving akonadi_kalarm_resource processes) should, I hope, be fixed in KAlarm version 3.0 which will no longer by default use Akonadi. This is due for release in August in KDE release 20.08.