You are not logged in.
Apparently some recent (past 6 months?) updates have broken Kmail. The symptoms look like this:
* Kmail takes a very long time to start
* When it starts, you get an error about Akonadi failing to work
* If you do "akonadictl status" it will probably be stopped
* "akonadictl start" prints an error about MySQL and "unknown error"
It's very annoying to troubleshoot and Google didn't help me much. I did find many other people scratching their heads like https://askubuntu.com/q/1407756. I have no idea what kind tomfoolery KDE developers are getting up to - but in my case I had some important work emails to deal with and didn't have the luxury of investigating. Their forum and bug tracker sucks too. Unfortunately as far as mail clients go the selection is not great.
Anyways, I think I found a strange workaround: Akonadi can use different storage backends like MySQL, Postgres, SQLite. It's explained in https://wiki.archlinux.org/title/KDE#Akonadi . Switching this to Postgres or Sqlite unbreaks Kmail. It had to redownload all the emails (IMAP), but I didn't lose anything. The funny thing is that if you switch it back to MySQL after, that works too. So the steps to fix are:
* Run "akonadictl start" to confirm you get the "unknown error" about MySql (Ctrl+C will exit the akonadi service)
* Run "akonadictl status" to confirm it's stopped
* Edit "~/.config/akonadi/akonadiserverrc"
* Under "[%General]" change "Driver=QMYSQL" to "Driver=QPSQL" (no idea what's the deal with this weird conf syntax)
* Do "akonadictl start" and if everything worked it will now print some nicer output
* Without exiting akonadi, open Kmail - hopefully it should work now
* Close Kmail, Ctrl+C out of Akonadi (do "akonadictl stop" if necessary), change "Driver" back to "QMYSQL"
* Try "akonadictl start" and now mysql should also work
* Try Kmail again and that should work also
It's a very annoying problem to troubleshoot, and I still have no idea what exactly is the cause, but the above seems to fix it.
Offline
THANK YOU!
This is a much more convenient workaround than downgrading mariadb, backup and so on ![]()
Had to redo my favorites and the trash/sent/drafts folders for every account though as they were jumbled around quite randomly….
I think i'll leave it on postgres and hope that doesn't break as often as mariadb does ^^
Last edited by Termy (2022-06-11 10:05:07)
Offline
This bug can also be fixed with a single command rather than the above sequence of steps:
touch ~/.local/share/akonadi/db_data/ib_logfile0
Offline
This bug can also be fixed with a single command rather than the above sequence of steps:
touch ~/.local/share/akonadi/db_data/ib_logfile0
That only worked till the next reboot for me unfortunately...
Offline
Lanz wrote:This bug can also be fixed with a single command rather than the above sequence of steps:
touch ~/.local/share/akonadi/db_data/ib_logfile0
That only worked till the next reboot for me unfortunately...
For me it worked also after a reboot. Thanks @Lanz!
Offline