Bug 522039 - Switching Activities makes entire desktop unresponsive — D-Bus communication with kactivitymanagerd breaks
Summary: Switching Activities makes entire desktop unresponsive — D-Bus communication ...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: The Activities subsystem in general (other bugs)
Version First Reported In: 6.7.0
Platform: Fedora RPMs Linux
: HI major
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2026-06-23 05:20 UTC by Johannes Goller
Modified: 2026-07-23 04:22 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.6.7
Sentry Crash Report:


Attachments
6.6, sleep entry present even if last (125.94 KB, image/png)
2026-06-29 14:26 UTC, Marco Martin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Goller 2026-06-23 05:20:27 UTC
STEPS TO REPRODUCE
=================

1. Log into a Plasma 6.7 session (fresh login)
2. Verify the desktop is fully responsive:
   - Panel works normally
   - Dolphin right-click displays context menu without crashing
   - Dolphin settings dialog opens promptly
3. Verify org.kde.kuiserver responds on D-Bus:

   $ dbus-send --session --dest=org.kde.kuiserver \
       --type=method_call --print-reply \
       /JobViewServer org.freedesktop.DBus.Introspectable.Introspect

   (returns valid introspection data)
4. Switch to a different Activity using the Activity Switcher
5. Attempt any panel interaction, or re-run the D-Bus command above


OBSERVED RESULT
===============

After switching Activities:

- The entire KDE panel becomes unresponsive
- D-Bus communication with org.kde.kuiserver fails:

  $ dbus-send --session --dest=org.kde.kuiserver \
      --type=method_call --print-reply \
      /JobViewServer org.freedesktop.DBus.Introspectable.Introspect

  Error org.freedesktop.DBus.Error.NoReply: Did not receive a reply.
  Possible causes include: the remote application did not send a reply,
  the message bus security policy blocked the reply, the reply timeout
  expired, or the network connection was broken.

  - Applications that depend on D-Bus services crash:
  - Dolphin crashes with SIGSEGV on right-click
  - Dolphin stderr shows: "Failed to check which JobView API is supported"
  - Opening "Configure Dolphin" takes ~60 seconds (D-Bus timeout)


EXPECTED RESULT
===============

Switching Activities should not break D-Bus communication.
The panel and all applications should remain fully responsive after an Activity switch.


ROOT CAUSE
==========

After switching Activities, kactivitymanagerd appears to become unresponsive
on the D-Bus session bus. This causes a cascade of failures:
- Other D-Bus services (including org.kde.kuiserver) become unreachable
- The panel freezes
- Any application that makes a D-Bus call to these services either hangs or crashes

This is consistent with the pattern in bug 435097 (D-Bus timeouts caused by
unresponsive kactivitymanagerd) and bug 314575 (resource issues linked to
kactivitymanagerd and the Activities context menu).

The kactivitymanagerd 6.7 release included significant D-Bus-related changes
("Fix dbus types for ActivityInfo arrays", "Add DBus2 lifecycle methods to
ActivityRunner", etc.), which may have introduced a regression.


SOFTWARE/OS VERSIONS
===================
Operating System: Fedora Linux 44
KDE Plasma Version: 6.7.0
KDE Frameworks Version: 6.27.0
Qt Version: 6.11.1
Kernel Version: 7.0.12-201.fc44.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 8500G w/ Radeon 740M Graphics
Memory: 32 GiB of RAM (30.4 GiB usable)
Graphics Processor 1: AMD Radeon 740M Graphics
Graphics Processor 2: NVIDIA GeForce GTX 960

REGRESSION
==========

Yes — this worked correctly before the Plasma 6.6 → 6.7 upgrade.


ADDITIONAL NOTES
================

After a fresh reboot, kactivitymanagerd and all D-Bus services work correctly.
The issue only manifests after switching Activities.

Recommended diagnostic commands to run after the problem triggers (when the
panel is frozen):

  # Is kactivitymanagerd still running?
  ps aux | grep kactivitymanagerd

  # Can we reach kactivitymanagerd on D-Bus?
  dbus-send --session --dest=org.kde.ActivityManager \
      --type=method_call --print-reply \
      /ActivityManager/Activities \
      org.kde.ActivityManager.Activities.ListActivities

  # Check systemd service status
  systemctl --user status plasma-kactivitymanagerd.service

  # Check for coredumps
  coredumpctl list | grep kactivitymanagerd


SEE ALSO
========

- Bug 435097 (30s D-Bus timeout caused by kactivitymanagerd)
- Bug 314575 (Dolphin freeze related to kactivitymanagerd)
- Bug 466193 (Plasmashell races kactivitymanagerd startup)
- Bug 456536 (Activity manager daemon not running error)
Comment 1 Johannes Goller 2026-06-24 21:44:15 UTC
I found the issue that triggered this. The activity I was trying to switch to included the statement below in ~/.config/plasma-org.kde.plasma.desktop-appletsrc:

```
[Containments][61]
ItemGeometries-0x0=Applet-63:0,32,576,128,0;
ItemGeometries-2259x1271=Applet-63:0,32,576,128,0;
ItemGeometries-3840x2160=Applet-63:0,32,inf,128,0;
ItemGeometriesHorizontal=Applet-63:0,32,inf,128,0;
activityId=753ce7d0-c788-4944-aa09-1558560dbec6
formfactor=0
immutability=1
lastScreen=0
location=0
plugin=org.kde.plasma.folder
wallpaperplugin=org.kde.image
```

The "inf" values caused the rendering of the activity to fail, and that resulted in the freezing I observed. Replacing "inf" with "576" in both occurrences and restarting plasmashell fixed the issue.

(For whatever reason that configuration, which I must have been using for years, did not trigger an issue in Plasma 6.6.)
Comment 2 Nate Graham 2026-06-26 20:41:59 UTC
inf?! I think that's the serialization of "infinity" which would suggest an invalid number being written to the config file.
Comment 3 Johannes Goller 2026-06-26 20:47:40 UTC
Yes, that is how I interpret it as well. My suggestion would be to find a more graceful way of handling such an invalid element in the config file.

(I have meanwhile obtained a stack trace of where the freeze is triggered, and perhaps I'll come up with a proposal myself. But I lack experience with Plasmashell code, so it takes time.)
Comment 4 Nate Graham 2026-06-26 20:56:18 UTC
Take all the time you need, if you'd like to work on this! It would be much appreciated.
Comment 5 Marco Martin 2026-06-29 14:22:03 UTC
I can reproduce partial matches working on 6.6 and not on 6.7.

So, if it's not the session runner that changed, is something around it that made its matches worth less
Comment 6 Marco Martin 2026-06-29 14:26:25 UTC
Created attachment 193850 [details]
6.6, sleep entry present even if last
Comment 7 Marco Martin 2026-06-29 14:27:28 UTC
hm, nvm, on 6.7 and master seems the same
Comment 8 Bug Janitor Service 2026-07-08 14:01:57 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/6828
Comment 9 Nate Graham 2026-07-23 02:16:55 UTC
Git commit b2b8fc265f38a1304aebff299e71d1131ff02767 by Nate Graham, on behalf of Shouvik Kar.
Committed on 23/07/2026 at 02:16.
Pushed by ngraham into branch 'master'.

containmentlayoutmanager: guard against non-finite item geometry

containmentlayoutmanager: guard against non-finite item geometry

A malformed ItemGeometries entry containing "inf"/NaN was parsed via QString::toDouble() straight into the applet geometry and then applied as an infinite item size. That sends the desktop layout into a CPU-pegged loop, freezing plasmashell and breaking session D-Bus services (kuiserver etc.), which in turn crashes dependent apps.

Reject non-finite values on both sides:

- when parsing the saved layout, skip such entries so an existing corrupt config can no longer wedge the layout (the applet falls back to automatic placement);
- when serializing, skip items whose geometry is non-finite so the layout manager does not write such a value back to the config.

###

M  +12   -1    components/containmentlayoutmanager/gridlayoutmanager.cpp
M  +5    -0    components/containmentlayoutmanager/itemcontainer.cpp
M  +2    -0    components/containmentlayoutmanager/itemcontainer.h

https://invent.kde.org/plasma/plasma-workspace/-/commit/b2b8fc265f38a1304aebff299e71d1131ff02767
Comment 10 Nate Graham 2026-07-23 03:28:22 UTC
Git commit 2cbd475768eb9e78f884f6a6ba7a365096db69ab by Nate Graham.
Committed on 23/07/2026 at 02:18.
Pushed by ngraham into branch 'Plasma/6.7'.

containmentlayoutmanager: guard against non-finite item geometry

containmentlayoutmanager: guard against non-finite item geometry

A malformed ItemGeometries entry containing "inf"/NaN was parsed via QString::toDouble() straight into the applet geometry and then applied as an infinite item size. That sends the desktop layout into a CPU-pegged loop, freezing plasmashell and breaking session D-Bus services (kuiserver etc.), which in turn crashes dependent apps.

Reject non-finite values on both sides:

- when parsing the saved layout, skip such entries so an existing corrupt config can no longer wedge the layout (the applet falls back to automatic placement);
- when serializing, skip items whose geometry is non-finite so the layout manager does not write such a value back to the config.

###


(cherry picked from commit b2b8fc265f38a1304aebff299e71d1131ff02767)

7fbe9879 containmentlayoutmanager: guard against non-finite item geometry

Co-authored-by: Shouvik Kar <auxcorelabs@gmail.com>

M  +12   -1    components/containmentlayoutmanager/gridlayoutmanager.cpp
M  +5    -0    components/containmentlayoutmanager/itemcontainer.cpp
M  +2    -0    components/containmentlayoutmanager/itemcontainer.h

https://invent.kde.org/plasma/plasma-workspace/-/commit/2cbd475768eb9e78f884f6a6ba7a365096db69ab
Comment 11 Nate Graham 2026-07-23 04:22:04 UTC
Git commit 738dd48e65eeee39308a70e54e48abdf39c7b982 by Nate Graham.
Committed on 23/07/2026 at 03:55.
Pushed by ngraham into branch 'Plasma/6.6'.

containmentlayoutmanager: guard against non-finite item geometry

containmentlayoutmanager: guard against non-finite item geometry

A malformed ItemGeometries entry containing "inf"/NaN was parsed via QString::toDouble() straight into the applet geometry and then applied as an infinite item size. That sends the desktop layout into a CPU-pegged loop, freezing plasmashell and breaking session D-Bus services (kuiserver etc.), which in turn crashes dependent apps.

Reject non-finite values on both sides:

- when parsing the saved layout, skip such entries so an existing corrupt config can no longer wedge the layout (the applet falls back to automatic placement);
- when serializing, skip items whose geometry is non-finite so the layout manager does not write such a value back to the config.

###


(cherry picked from commit b2b8fc265f38a1304aebff299e71d1131ff02767)

7fbe9879 containmentlayoutmanager: guard against non-finite item geometry

Co-authored-by: Shouvik Kar <auxcorelabs@gmail.com>

M  +12   -1    components/containmentlayoutmanager/gridlayoutmanager.cpp
M  +5    -0    components/containmentlayoutmanager/itemcontainer.cpp
M  +2    -0    components/containmentlayoutmanager/itemcontainer.h

https://invent.kde.org/plasma/plasma-workspace/-/commit/738dd48e65eeee39308a70e54e48abdf39c7b982