On KDE Neon Kmail (and whole akonadi) stays offline after suspend or when reestablishing a network connection

Let me first mention, that we’ve posted this issue already here: 461400 – Kmail stays offline after wakeup from suspend to ram

Since 5.21.2 akonadi and kmail stay offline after suspend or changing network connection.

akonadictl gives:

Object does not exist at path “/org/freedesktop/NetworkManager/ActiveConnection/3”

It seems NetworkManager creates a fresh ActiveConnection file and a lot of kde apps relying on network connection think networkmanager is offline because they don’t get informed that there’s a new network connection.

As no one could help us on bugs.kde.org, were giving discuss a try.
Thanks for helping.

2 Likes

Interesting issue, I never encountered it with Fedora with the latest pim, but considering that you are not the only one affected I might have been lucky.

The code internally use QNetworkConfigurationManager Class | Qt Network 5.15.13 which is not so great and for Qt 6 the class was removed from Qt and replaced by something a bit better.

I suspect the bug is in QNetworkConfigurationManager or in NetworkManager itself since I see various issues with the same debug output online :frowning:

Very long shot, but can you try disabling IPV6 from your network settings?

When I had IPv6 enabled, I had some problems connecting every now and then (as a whole though, not just PIM)

No need to disable it forever though, just as a troubleshooting step to figure out where the bug might be hiding. :slight_smile:

I’ve tried this:

To disable IPv6 via sysctl, place the following into your /etc/sysctl.conf file:
net.ipv6.conf.all.disable_ipv6 = 1
Don’t forget to comment out any IPv6 hosts in your /etc/hosts file:
#::1 localhost.localdomain localhost

But unfortunately it had no effect.
Still the missing active connection

/org/freedesktop/NetworkManager/ActiveConnection/1

afaik it is a KDE Neon only issue - probably a packaging problem. I don’t know.

Thank you for looking into it

Ok, it seems that pointed me into the right direction! Thank you for that!

  1. add following line to /etc/apt/sources.list

deb http://de.archive.ubuntu.com/ubuntu lunar main

  1. sudo pkcon refresh
  2. sudo pkcon install network-manager
  3. sudo service NetworkManager restart
  4. add # in front of the currently added line in /etc/apt/sources.list
  5. sudo pkcon refresh
    (Please make sure not to update the whole system, it’ll likely break the whole thing, so don’t forget do comment the lunar repository after updating networkmanager)

(By the way, wo came up with this strange idea to use 3 different names for one thing: network-manager, NetworkManager, networkmanager)

to my sources.list and updated NetworkManager. This seems to work, but it’s a very dirty solution imho.

Still need to do some testing. I’d say this is just a workaround

1 Like

seems to work perfectly.
So what could be a solution: asking for backport to jammy?

I can confirm this did not fix the issue. I disabled ipv6, suspended my computer. When I resumed. Kmail was offline as always with the message “No network connection detected, all network jobs are suspended.”

When I look at the journal log, the akonadi resources are trying to look at Active Connection 7, 8 and 9 which do not exist.

Clicking on the mailbox name and clicking “Update this folder and it’s sub folders” does nothing.

The only way to bring all the Kontact resources back online is to issue the akonadictl reset command.

I am very hesitant to try this solution and I perceive a high risk of breaking other things. Is there any safer way to fix this.

There is probably half a dozen open bug reports and a few closed ones as well for this issue going back to 2012. I had them all gathered up in one place a year ago but the issue resolved itself for me a few version ago and got reintroduced again recently. I suspect a lot of users are affected.

I can understand your hesitation - it just upgraded 4 or 5 networkmanager related packages. You can downgrade again, but the chances of having a system without networkmanager and the need of a second laptop with internet connection aren’t low when doing so.

Anyway - it isn’t a solution, just a workaround.

What you can do instead: Close kontact, do a akonadictl restart and start kontact again.

ok, I’m confused. It works, but still this error:

"Das Objekt existiert nicht am Pfad »/org/freedesktop/NetworkManager/ActiveConnection/15«"

edit: ah ok, I think I know why

org.kde.pim.imapresource: Select failed:  "Die Verbindung zum Server ist abgebrochen."
org.kde.pim.akonadiserver: New notification connection (registered as Akonadi::Server::NotificationSubscriber(0x7fc4ec2e1910) )
org.kde.pim.akonadiserver: Subscriber "" disconnected

It now realizes that the connection was reestablished

I’m curious, networkmanager in KDE Neon comes from ubuntu repos, right? So KDE Neon (Jammy) and (K)ubuntu Jammy use the same debs for networkmanager. Problem exists since 5.21 which was availabe on both distros. Afaik this issue never occured in ubuntu but Neon. Neon and Ubuntu don’t use the same debs for KDE Plasma, so it has to be an issue on Neon only, or am I wrong? Isn’t it a packaging issue then?

1 Like