Bug 488998 - Clicking on "Save Session" breaks Shutdown, Restart and Logout in Kickoff
Summary: Clicking on "Save Session" breaks Shutdown, Restart and Logout in Kickoff
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Session Management (other bugs)
Version First Reported In: 6.1.0
Platform: Manjaro Linux
: HI major
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
: 503065 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-06-22 18:15 UTC by medin
Modified: 2025-10-02 22:03 UTC (History)
13 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description medin 2024-06-22 18:15:19 UTC
When you click on "Save Session" in Kickoff, then try to click on Shutdown, Restart or Logout it will fail, the only way to achieve it is using terminal command "shutdown" or holding the power off button to force it.

Operating System: Manjaro Linux 
KDE Plasma Version: 6.1.0
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.1
Kernel Version: 6.9.6-1-MANJARO (64-bit)
Graphics Platform: Wayland
Comment 1 Marco Martin 2024-06-27 12:34:37 UTC
can reproduce
Comment 2 Marco Martin 2024-06-27 12:43:41 UTC
the plasma-shutdown spawns and remains stuck forever when save session is clicked.

killing plasma-shutdown makes the logout actions work again
Comment 3 Marco Martin 2024-06-27 13:07:30 UTC
Actually i can reproduce only on a system with plasma built from kdesrc-build, where plasma-shutdown is wrongly picked from /usr/bin from the packaged version rather than the self built.

This makes me suspect that it might be a packaging issue
Comment 4 medin 2024-06-27 18:41:21 UTC
(In reply to Marco Martin from comment #3)
> Actually i can reproduce only on a system with plasma built from
> kdesrc-build, where plasma-shutdown is wrongly picked from /usr/bin from the
> packaged version rather than the self built.
> 
> This makes me suspect that it might be a packaging issue


I don't know if I'm right, but isn't plasma-shutdown owned by plasma-workspace package? 

And everything is compiled by Arch at the same time? There is no external source that provides a separate plasma-shutdown binary.

https://gitlab.archlinux.org/archlinux/packaging/packages/plasma-workspace/-/blob/main/PKGBUILD?ref_type=heads
Comment 5 Lassi Väätämöinen 2024-06-28 17:28:07 UTC
Happens on openSUSE Tumbleweed too.

Operating System: openSUSE Tumbleweed 20240627
KDE Plasma Version: 6.1.1
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.2
Kernel Version: 6.9.6-1-default (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 15,5 GiB of RAM
Graphics Processor: AMD Radeon RX 580 Series
Manufacturer: Micro-Star International Co., Ltd.
Product Name: MS-7B79
System Version: 4.0


Session save/restoration is all kinds of broken. Looks like Firefox is the only application remembered upon session restore, no KDE applications that I have tried so far get restarted.
Comment 6 Lassi Väätämöinen 2024-06-28 17:35:20 UTC
(In reply to Lassi Väätämöinen from comment #5)
> Session save/restoration is all kinds of broken. Looks like Firefox is the
> only application remembered upon session restore, no KDE applications that I
> have tried so far get restarted.

Just to clarify, upon auto-save session the apps are not remembered.
Manually saved sessions' applications seem to be started properly after logout/login.
Comment 7 Toralf Förster 2024-11-20 20:13:56 UTC
Same problem here, at a stable hardened Gentoo with keyworded Plasma 6.2.3, Gear 24.08.3, KF 5.116.0, KF 6.8.0
If I save a session, then only
  DISPLAY=:0 qdbus6 org.kde.Shutdown /Shutdown org.kde.Shutdown.logout
works to really log out.
Comment 8 Graham Perrin 2025-06-15 13:44:27 UTC
*** Bug 503065 has been marked as a duplicate of this bug. ***
Comment 9 Graham Perrin 2025-06-15 13:51:10 UTC
(In reply to Toralf Förster from comment #7)

Bug 503065 comment 1 offers an alternative workaround.
Comment 10 geopapougr 2025-09-06 12:42:51 UTC
Can reproduce in:
Operating System: Fedora Linux 42
KDE Plasma Version: 6.4.4
KDE Frameworks Version: 6.17.0
Qt Version: 6.9.1
Comment 11 Graham Perrin 2025-09-06 20:13:34 UTC
IMHO the slightly more annoying breakage is when the restart button, for installation of updates, becomes non-effective in Discover. 

Workaround: log out, log in, reopen Discover, retry the restart button.
Comment 12 Forest 2025-09-13 00:35:30 UTC
Reproduced in:
- Debian Stable 13.1 (Trixie): Plasma 6.3.6, Frameworks 6.13.0, Qt 6.8.2
- KDE Neon User Edition 20250911-1321 live ISO: Plasma 6.4.4, Frameworks 6.17.0, Qt 6.9.2
- KDE Neon Unstable Edition 20250901-1047 live ISO: Plasma 6.4.80, Frameworks 6.18.0, Qt 6.9.2
- Wayland and X11 sessions.

This bug is present in enough different distributions that I don't think it's a packaging problem. (Or if it is, then KDE has made correct packaging unreasonably difficult.)

The bad state can be entered by:
- Kickoff's Save Session button (Revealed by selecting Settings: Desktop Session: Session Restore: When session was manually saved)
- Running plasma-shutdown in a terminal, and leaving it running
- qdbus6 org.kde.Shutdown /Shutdown org.kde.Shutdown.saveSession

These things are broken in the bad state:
- Log Out Kickoff button
- Restart Kickoff button
- Shut Down Kickoff button
- qdbus6 org.kde.LogoutPrompt /LogoutPrompt org.kde.LogoutPrompt.promptLogout
- qdbus6 org.kde.LogoutPrompt /LogoutPrompt org.kde.LogoutPrompt.promptReboot
- qdbus6 org.kde.LogoutPrompt /LogoutPrompt org.kde.LogoutPrompt.promptShutDown
- qdbus6 org.kde.LogoutPrompt /LogoutPrompt org.kde.LogoutPrompt.promptAll
- The computer's power button, when configured in Power Management to show the logout screen

The session can be saved without triggering the bad state by using this command:
qdbus6 org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.saveCurrentSession

The bad state can be cleared by killing the plasma-shutdown process.

I don't see any errors in dmesg or journalctl.

In summary, Plasma's Save Session button leaves the user unable cleanly shut down or exit their desktop session, and it has been broken like this for at least a year. I hope someone familiar with plasma-shutdown and ksmserver-logout-greeter internals can investigate soon. It is easy to reproduce.
Comment 13 Nate Graham 2025-09-19 15:45:47 UTC
I can reproduce this on KDE Linux with distro-provided packages, so it doesn't seem to be caused by building the session from source.
Comment 14 Bug Janitor Service 2025-09-22 10:25:23 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5831
Comment 15 David Edmundson 2025-09-22 20:56:30 UTC
Git commit e1b251fa874e5bb1dbb009440724621a462cd691 by David Edmundson.
Committed on 22/09/2025 at 15:26.
Pushed by davidedmundson into branch 'master'.

plasma-shutdown: Exit after manual session save

plasma-shutdwon is a DBus activated executable that is meant to run one
task and exit swiftly.

The call to manually save a session left the process idling. This was
problematic as the logout greeter checked the presence of this process
to see if an existing shutdown is in progress

M  +2    -1    startkde/plasma-shutdown/shutdown.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/e1b251fa874e5bb1dbb009440724621a462cd691
Comment 16 Nate Graham 2025-09-26 20:43:25 UTC
Git commit fe268e85669dc293bd89b0813463a201ae589614 by Nate Graham, on behalf of David Edmundson.
Committed on 26/09/2025 at 20:16.
Pushed by ngraham into branch 'Plasma/6.5'.

plasma-shutdown: Exit after manual session save

plasma-shutdwon is a DBus activated executable that is meant to run one
task and exit swiftly.

The call to manually save a session left the process idling. This was
problematic as the logout greeter checked the presence of this process
to see if an existing shutdown is in progress


(cherry picked from commit e1b251fa874e5bb1dbb009440724621a462cd691)

Co-authored-by: David Edmundson <kde@davidedmundson.co.uk>

M  +2    -1    startkde/plasma-shutdown/shutdown.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/fe268e85669dc293bd89b0813463a201ae589614
Comment 17 Nate Graham 2025-10-02 22:03:16 UTC
Git commit 90131bdd34a33f8063795b766940b534b166a83e by Nate Graham.
Committed on 02/10/2025 at 22:01.
Pushed by ngraham into branch 'Plasma/6.4'.

plasma-shutdown: Exit after manual session save

plasma-shutdwon is a DBus activated executable that is meant to run one
task and exit swiftly.

The call to manually save a session left the process idling. This was
problematic as the logout greeter checked the presence of this process
to see if an existing shutdown is in progress


(cherry picked from commit e1b251fa874e5bb1dbb009440724621a462cd691)

Co-authored-by: David Edmundson <kde@davidedmundson.co.uk>

M  +2    -1    startkde/plasma-shutdown/shutdown.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/90131bdd34a33f8063795b766940b534b166a83e