#1103960 kate: 30 second pause on startup b/c kactivitymanagerd not there

Package:
kate
Source:
kate
Description:
powerful text editor
Submitter:
Bernhard Reiter
Date:
2025-04-23 07:15:02 UTC
Severity:
normal
#1103960#5
Date:
2025-04-23 07:11:37 UTC
From:
To:
Dear Maintainer,

when using kate on an application server via "ssh -Y"
it does a long pause that makes it unusable as an editor
for small tasks.

How to reproduce:
  * ssh -Y  (or ssh -X which is the same thing on Debian) unto a
    Bookworm server.
  * start "kate"
  * now you get at least 30 seconds delay. Sometimes up to 50 seconds.

This is a regression over Bullseye.

Expected behaviour:
Start within 2 seconds, or up to 10 seconds. Which it did with Bullseye.
On the usuabilty side, the rule of thumb is that users will get really
impatient once 10 seconds have past after a command.
People will believe kate is broken.

For long development sessions it maybe okay to accept a minute startup
time once, but if you fire up kate for a regular file 50 seconds is
unacceptable.

Technical analyis:
strace -f --timestamps -o ~/tmp/kate-1.log kate
shows a 26 second timeout on d-bus:

105600 14:32:01 prctl(PR_SET_NAME, "QDBusConnection"...) = 0
105600 14:32:01 poll([{fd=7, events=POLLIN}], 1, 0) = 0 (Timeout)

105600 14:32:01 socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0) = 8
105600 14:32:01 connect(8, {sa_family=AF_UNIX, sun_path="/run/user/10003/bus"}, 21) = 0

105600 14:32:01 sendmsg(8, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="l\1\0\1\0\0\0\0\3\0\0\0\220\0\0\0\1\1o\0\33\0\0\0/Activit"..., iov_len=160}, {iov_base="", iov_len=0}], msg_iovlen=2, msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 160
105600 14:32:01 poll([{fd=7, events=POLLIN}, {fd=8, events=POLLIN}], 2, 25478) = 0 (Timeout)
             ^^
105600 14:32:27 write(7, "\1\0\0\0\0\0\0\0", 8) = 8
             ^^

running
 dbus-monitor
before starting kate confirms that it is
signal time=1745326251.063633 sender=org.freedesktop.DBus -> destination=org.freedesktop.systemd1 serial=51 path=/org/freedesktop/DBus; interface=org.freedesktop.systemd1.Activator; member=ActivationRequest
   string "plasma-kactivitymanagerd.service"
method call time=1745326251.063645 sender=:1.24 ->
destination=org.kde.ActivityManager serial=3
path=/ActivityManager/Activities;

ps shows no kactivitymanagerd running for the user.

When starting /usr/lib/x86_64-linux-gnu/libexec/kactivitymanagerd
manually before starting kate, the startup is fast.

there is

/usr/lib/systemd/user/plasma-kactivitymanagerd.service
::::::::::::::
[Unit]
Description=KActivityManager Activity manager Service
PartOf=graphical-session.target
Before=graphical-session.target

[Service]
ExecStart=/usr/lib/x86_64-linux-gnu/libexec/kactivitymanagerd
BusName=org.kde.ActivityManager
Slice=background.slice
::::::::::::::

but it does not get started when using ssh to connect to the machine.

I've reported this, because even if it is fixed with Trixie, it would
stay a problem with Bookworm installations.
And the symptoms will be seen with kate, even if the cause of the
problem is elsewhere or affects other packages as well.

Thanks for looking into this!
Bernhard