I’m on fedora 40, KDE 6 and Wayland. I always configure session management to ‘On last logout’.
On one of my devices this doesn’t work. On every reboot Plasma loads the same window arrangement: three Brave, two Dolphin and one Konsole window. How can I fix this?
That can mean plasma can’t write to some file. I suggest checking the ownership of files in your home directory:
cd
find . '!' -user $USER
you can try booting to an empty session for one cycle and then flip it back to restore previous.
that should clear any fault there may be with the config.
Thanks for your suggestion. I didn’t know the parameter “!” yet. The results didn’t show anything KDE related.
Good idea. But unfortunately it didn’t work. After re-enabling the session restore feature, the old session status was loaded again.
I have finally found the session data file: ~/.local/share/plasmasessionrestore/plasmasessionrestorestaterc
I have rw access to this file, but I can see it is very old (06/19/24). I will rename it and continue testing.
Edit
It’s getting weird now. After disabling the above mentioned file, the old session setting is cleared. as expected. But the file is not restored. Maybe it’s a legacy file, maybe this is a bug.
Session restore works partially now - not all windows are saved. Eg Brave browser or Signal desktop are not restored as before.
After some further testing, I came across another error:
If I switch from system settings > sessions > desktop sessions to system settings > sessions > places, all my session settings are gone. That’s reproducible. I’m not sure if this is part of my problem or if this is just a different bug.
Edit 2:
I don’t know why parts of my text are in bold now. I can’t find any formatting. Even re-pasting my text from an editor doesn’t help.
i don’t have anything in ~/.local/share/plasmasessionrestore
not even the folder…and i’ve also never “saved” a session using this feature.
i would just delete the entire folder, then set it to “start with empty session” (be sure to hit Apply) for a full reboot and shutdown.
then you can set it to “on last logout” if you want to have it come back exactly how you left it each time.
or if you want to always come back certain apps open, they try using that feature again… but as i said, i’ve never used it so don’t know how well it works.
i don’t have anything in
~/.local/share/plasmasessionrestore
not even the folder…
Ok, thanks for confirming. So it seems a left-over from KDE 5.
I already tried switching to ‘start with empty session’, rebooting and turning back to ‘last session’. I kinda works, but obviously it works different now. At least Chrome-based software isn’t covered any more, so Signal or Brave windows are not restored. This seems to be a shortcoming of the current implementation, so I think my investigations are finished for now.
Thanks to all who helped to solve this problem
The file has been relocated to ./local/state
(I’m using plasma 6). To delete the saved sessions, simply remove the file:
rm .local/state/plasmasessionrestorestaterc
Thanks for your help. I already deleted the old file in .local/share. That fixed the problem for me.
I didn’t know about the new folder yet. I have made a note of it in my personal Linux documentation.