This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Plasma does not save Session

Tags: None
(comma "," separated)
ulim
Registered Member
Posts
8
Karma
0

Plasma does not save Session

Sat May 07, 2022 5:16 pm
I have a vanilla install of Fedora 35 and KDE 5.24.4 (plasmashell). When I start Konsole, Dolphin or the KDE settings app and then sign out and sign in again, the konsole and KDE settings app aren't launched. I have enabled "Vorherige gespeicherte Sitzung wiederherstellen" (restore previous session) in the KDE settings.

This happens without virtual desktops as well as when using them. I am simply getting an empty desktop, no matter which applications ran before.

There's one exception though: Firefox will restart. But I think this may be due to it having its own session management thing.
ulim
Registered Member
Posts
8
Karma
0

Re: Plasma does not save Session

Mon May 23, 2022 11:24 am
Is there really no one who can help with this very basic function of KDE/Plasma?

This used to work in older versions of Plasma (e. g. Fedora 33 / Plasma 5.20.5). I have a completely fresh install of Fedora 35 and Plasma 5.24.4 / Qt 5.15.2 / Wayland. All I configured was a bunch of virtual desktops.

It's as simple as me opening a few terminals and other apps on several virtual desktops and then logging out and logging in again - everything is gone. None of my workspaces have any of the apps that I have started. It makes KDE pretty much unusable for me if my desktops aren't saved.

So please, if anyone can tell me which folders the sessions are supposed to be saved to or whatever else I can do to debug, that would be fantastic.
User avatar
Paul
Registered Member
Posts
64
Karma
0
OS

Re: Plasma does not save Session

Mon May 23, 2022 5:38 pm
Hi, I think the sessions are saved in:
Code: Select all
~/.config/ksmserverrc

Do you have that file? Is it writeable? is the folder writeable?
I am using Plasma 5.24.4 and it works OK for me.


Running KDE neon User Edition
ulim
Registered Member
Posts
8
Karma
0

Re: Plasma does not save Session

Tue May 24, 2022 7:56 am
Many thanks for your help!

Yes, I have that file and it is writable, but it does not contain my windows and apps. For example, I have Firefox started on virtual desktop 7 and several Konsoles on other desktops. But the Konsoles aren't in the file at all and Firefox is listed to be started on virtual desktop 1.

Is there a command or some other way to save the session without logging out?
User avatar
Paul
Registered Member
Posts
64
Karma
0
OS

Re: Plasma does not save Session

Tue May 24, 2022 8:29 am
In System Settings, if you chose "Restore manually saved session", then the next time you log in you should see a "Save Session" command next to the "Logout" command. I don't see why you have to log out/in for that command to appear after changing the system setting, but that's how it works for me.


Running KDE neon User Edition
ulim
Registered Member
Posts
8
Karma
0

Re: Plasma does not save Session

Tue May 24, 2022 8:50 am
Ok thanks, so I did that and saved manually, but the result was the same: the only difference being that previously the section [Session: saved at previous logout] was written to and now the section [Session: saved by user] was written to. But, as before, my session wasn't saved correctly:

- Kontact was running, but wasn't saved
- Okular was running, but wasn't saved
- gedit was running, but wasn't saved
- Thunderbird and Firefox were saved, but to the wrong virtual desktop (1 and 2 instead of 4 and 7)
ulim
Registered Member
Posts
8
Karma
0

Re: Plasma does not save Session

Tue May 24, 2022 8:53 am
Slight correction: Thunderbird was actually saved to the correct virtual desktop. I don't see in ksmserverrc where the virtual desktop is specified, though.
User avatar
Paul
Registered Member
Posts
64
Karma
0
OS

Re: Plasma does not save Session

Tue May 24, 2022 10:47 am
I just tried it with Okular, gedit, Thunderbird, Firefox and Konsole (I don't have Kontact) on two virtual desktops and it restored the (manually saved) session OK. I can't see any reports on the KDE bug-tracker that seem relevant. Maybe it's saving the session OK but then not restoring it at the next login for some reason (I can't think why)?


Running KDE neon User Edition
ulim
Registered Member
Posts
8
Karma
0

Re: Plasma does not save Session

Tue May 24, 2022 11:04 am
No, it's not saving. Here's what I did:

I copied the ~/.config/ksmserverrc to ksmserverrc.old

Then I changed some stuff (opened new Konsole) and waited a minute, then saved the session manually.

The result is that ~/.config/ksmserverrc had a newer timestamp by one minute than ksmserverrc.old, but the content of the files (via diff) was the same.
User avatar
Paul
Registered Member
Posts
64
Karma
0
OS

Re: Plasma does not save Session

Tue May 24, 2022 3:52 pm
Sorry, the reason I couldn't reproduce this is I use X11 rather than Wayland. It seems to be a known issue on Wayland see: KDE Bug 436318. Unfortunately there doesn't seem to be any indication when it will be fixed >:(


Running KDE neon User Edition
ulim
Registered Member
Posts
8
Karma
0

Re: Plasma does not save Session

Tue May 24, 2022 4:15 pm
Well, anyway thanks a lot for clearing that up!

However, I just now tried it with X11 and it didn't work right either. Now Firefox is correctly restored to the correct virtual desktop, but all other applications are cluttering the first virtual desktop. I tried it with Thunderbird, Konsole, KWrite - all restored to the first virtual desktop. And all the Konsoles from all virtual desktop are combined into one application with several windows on the first virtual desktop.
User avatar
Paul
Registered Member
Posts
64
Karma
0
OS

Re: Plasma does not save Session

Tue May 24, 2022 4:28 pm
Just found this: https://bugs.kde.org/show_bug.cgi?id=442380. Makes me wonder why it works for me.


Running KDE neon User Edition
ulim
Registered Member
Posts
8
Karma
0

Re: Plasma does not save Session

Tue May 24, 2022 4:57 pm
What is your OS / Plasma version? For me it does work with Fedora 33 / Plasma 5.20.5.

But since Fedora 33 is EOL I want to upgrade to Fedora 35, which will introduce the bug. I don't think it is possible to use Fedora 35 and downgrade KDE to Plasma 5.20.5.

Reading through the bug reports you posted made me feel pretty disillusioned. There is not a single statement from the KDE developers.
User avatar
Paul
Registered Member
Posts
64
Karma
0
OS

Re: Plasma does not save Session

Tue May 24, 2022 5:37 pm
I'm using KDE Neon User Edition, which is now at Plasma 5.24.5 and will go to 5.25 around the middle of June (fingers crossed it all still works after that !).

BTW, I just "stress tested" it with eight apps on different virtual desktops, including firefox and libreoffice and the session saved and restored OK.


Running KDE neon User Edition
jtornado
Registered Member
Posts
1
Karma
0

Re: Plasma does not save Session

Tue Apr 04, 2023 11:58 pm
Session saving doesn't work for me either. Doesn't look like anything is being written to the session file, regardless of whether it's initiated through logout, CLI, or "Manual Save" button:

Code: Select all
qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.saveCurrentSession

Code: Select all
#  ~/.config/session/'kwin_saved by user_'
[Session]
active=-1
count=0
desktop=1

Code: Select all
# ~/.config/ksmserverrc
[$Version]
update_info=ksmserver_update_loginMode_value.upd:ksmserver_update_loginMode_value_default_enum

[LegacySession: saved at previous logout]
count=0

[LegacySession: saved by user]
count=0

[Session: saved at previous logout]
count=0

[Session: saved by user]
count=0

[SubSession: e47f119b-84ac-46a9-8aba-f43b60e120b4]
count=0

[SubSession: f04a3093-c7dc-49eb-8f22-1673a9d46cb9]
count=0


Code: Select all
6.1.0-7-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.20-1 (2023-03-19) x86_64 GNU/Linux
plasmashell 5.27.2


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], kesang, Yahoo [Bot]