Bug 511980

Summary: Plasma seems not to be closing apps gracefully before shutdown anymore
Product: [Plasma] plasmashell Reporter: EpicTux123 <EpicTux123>
Component: Session ManagementAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: kde, kdedev, natalie_clarius
Priority: NOR    
Version First Reported In: 6.5.2   
Target Milestone: 1.0   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: session settings

Description EpicTux123 2025-11-12 06:57:40 UTC
I"ve noticed this happening because of Firefox. On my Firefox I make it so it opens a blank page on start-up, but I started noticing that when asking Plasma to shut down two things happen:

1. An artificial delay seems to be introduced, which was not there before. Before the shutdown was faster.
2. Apps seem not to close gracefully. After restarting with Firefox open, Firefox restores previous tabs as if a crash occured.

I've started noticing this somewhere around version ⪰ 6.5.0. Firefox was somewhere around version ⪰ 144.0.

Currently reproducible on Plasma 6.5.2 and Firefox 144.0.2.



Operating System: Fedora Linux 43
KDE Plasma Version: 6.5.2
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0
Kernel Version: 6.17.7-300.fc43.x86_64 (64-bit)
Graphics Platform: Wayland
Comment 1 TraceyC 2025-11-13 17:22:32 UTC
Changing importance, since this doesn't look like an actual crash. This may be a bug in session saving.
Comment 2 TraceyC 2025-11-17 23:44:10 UTC
I'm able to reproduce the Firefox issue on git-master but not the delay, with my regular user or a brand new user
The system is set to launch apps that were open at logout

- Shutdown is quick, no noticeable delay
- Other apps that were open are reopened as expected
- Firefox starts up with all tabs I had open, not just one tab with the homepage per my settings (restarting Firefox, it has just one tab as expected)
Comment 3 EpicTux123 2025-11-18 02:26:59 UTC
Created attachment 186905 [details]
session settings

I've noticed a bit of a delay after such problem started ocurring. It's like a two or three seconds delay before the shutdown starts, whereas before that didn't happen. However, it may be a problem of a 3rd-party package such as systemd rather than KDE's, but I didn't test it.

In regards to Desktop Session settings, I've attached a screenshot of my used settings.
Comment 4 EpicTux123 2025-12-05 13:22:36 UTC
Can this bug severity/importance/priority be raised to the maximum? This bug can lead to data loss.
Comment 5 TraceyC 2025-12-05 17:25:39 UTC
Can you walk me through how this has or would cause data loss? I don't immediately see how Firefox starting with more tabs than desired would do that.
Comment 6 David Edmundson 2025-12-05 17:29:47 UTC
Can we also try to narrow this down with some other apps. 
I was testing kate open with unsaved changes and it seemed to prompt. 

If it's just firefox crashing, then it could be a firefox issue.
Comment 7 EpicTux123 2025-12-05 20:39:52 UTC
In my case I noticed OBS Studio also prompting me due to a non-clean shutdown after a restart. So far I have not been able to get an instance where data loss would occur, but since apps are technically crashing, I believe this can indeed induce to data loss in some context.
Comment 8 EpicTux123 2025-12-10 04:21:06 UTC
Update: I cannot reproduce the issue anymore, but now I am on Arch Linux (installed KDE via archinstall).

On Fedora I believe it still happens.

The Firefox issue seem something that has existed for more than a decade now. I believe the problem is with how Firefox handles SIGTERM rather than KDE being the culprit. If you guys think a separate issue should be filled for the Firefox thing, let me know.

But I will close this since it seems KDE is not the culprit. Instead, Fedora seems to be one in question here.