Bug 441905 - After power cut/session crash, the previously-in-use session is destroyed and the one saved before that is restored instead
Summary: After power cut/session crash, the previously-in-use session is destroyed and...
Status: RESOLVED DUPLICATE of bug 60894
Alias: None
Product: ksmserver
Classification: Plasma
Component: general (show other bugs)
Version: 5.22.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: David Edmundson
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2021-09-02 11:34 UTC by medin
Modified: 2023-05-17 17:08 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description medin 2021-09-02 11:34:54 UTC
If power cut occurs, which is a nightmare for PCs (excluding laptops with battery), Plasma Desktop tries to restore the same session that was already restored in the previous session, which brings some unwanted apps that was used from long time, the sound level is restored correctly like it was before power cut but brightness is reset to 100%. It seems like when a session is restored it's not marked as consumed and should become eligible for deletion.
The normal behavior that should be seen with sudden power cut is to start a new empty session instead of restoring a session state (already consumed) that was saved from long time.

Operating System: Manjaro Linux
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2
Kernel Version: 5.13.12-1-MANJARO (64-bit)
Graphics Platform: X11
Comment 1 Nate Graham 2021-09-02 18:11:28 UTC
Yes, it seems like the session is only saved on a clean shutdown, not an unexpected one, so session restoration cannot be used to recover your state for this use case. Since we can't detect when the session is about to get killed by a crash or a power cut, we would probably need to do something sad like set a timer every n minutes that would save the current session if anything about it has changed from the last-saved state.
Comment 2 Nate Graham 2023-05-17 17:08:53 UTC
Right, because the session wasn't saved because the system lost power before that could happen. Probably we would need to implement Bug 60894 to fix it.

*** This bug has been marked as a duplicate of bug 60894 ***