Bug 436318

Summary: Save session doesn't work under Wayland
Product: [Plasma] plasmashell Reporter: Patrick O'Callaghan <pocallaghan>
Component: Session ManagementAssignee: Plasma Bugs List <plasma-bugs>
Status: REOPENED ---    
Severity: normal CC: agurenko, alex765, andihartmann, anssi.hannula, anton.schenker, arisu+kdebugs, auxsvr, bednarczyk.pawel, bernie, bruno, bugs.kde, butirsky, byelogurov, cdennett, cengique, chris, christian.rohmann, coque.couto, cribari, cruzki123, dennis, desw, dev+kde, dkxls23, drew.m.fisher, edtoml, endymion+kde, equeim, etaash.mathamsetty, eugene.shalygin+bugzilla.kde, feus73, forums, freisim93, funtoos, gzatko, hoehnp, hoperidesalone, imaginator, JanNowak94, jhs, jlp, jmtornetta, johannes.hirte, john.ettedgui, julien.dlq, kairo, kde, KDE, kde, kishore96, L.Bonnaud, lassi.vaatamoinen, linux, mail, majzoube, matt, matteo.mazzarelli, mauromol, miranda, mmkthecoolest, mmtsales, msdobrescu, mwc85.23yp, nate, nerumo, nico.kruber, niklas, nkwkelvin, nl6720, ol+kde, oleg.goro, omosnacek, p.r.worrall, pfeiffer, piotr.mierzwinski, plasma-bugs, postix, rdieter, roman, rpbikker, s2, sam, sandysareon, shtetldik, silvan.calarco, silver.salonen, smit17xp, tbondvagyok, ticonzero2010, tombrown9501, victualsquid, wdmlist, whyhow3.141, xqgrhiovxf6bw12h
Priority: HI Keywords: wayland
Version: 5.24.4   
Target Milestone: 1.0   
Platform: Fedora RPMs   
OS: Linux   
URL: https://invent.kde.org/plasma/kwin/-/issues/113#note_500909
See Also: https://bugs.kde.org/show_bug.cgi?id=476831
Latest Commit: Version Fixed In: 6.1
Sentry Crash Report:
Attachments: attachment-25640-0.html
attachment-30227-0.html
attachment-30617-0.html
attachment-13297-0.html
attachment-19101-0.html
attachment-23823-0.html
attachment-2084366-0.html
attachment-3317129-0.html

Description Patrick O'Callaghan 2021-04-28 16:11:50 UTC
SUMMARY
After configuring session-restore on login, then saving the session, many items are missing after starting a new session.

STEPS TO REPRODUCE
1. Enable "Manually saved session"
2. Set up some apps including Firefox, Konsole, Dolphin
3. Save the session using the Leave button

OBSERVED RESULT
On logging in again, neither Dolphin nor Konsole windows are restored. Firefox is restored.

EXPECTED RESULT
All saved windows should be restored.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Fedora 34
(available in About System)
KDE Plasma Version: 5.21.4
KDE Frameworks Version: 5.80.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2021-04-28 19:36:34 UTC
Already noted on https://community.kde.org/Plasma/Wayland_Showstoppers.

We can use this as the bug report to track it.
Comment 2 Nate Graham 2021-09-14 15:07:58 UTC
*** Bug 442192 has been marked as a duplicate of this bug. ***
Comment 3 Nate Graham 2021-09-16 17:51:46 UTC
*** Bug 442283 has been marked as a duplicate of this bug. ***
Comment 4 devsk 2022-04-18 06:53:30 UTC Comment hidden (spam)
Comment 5 Nate Graham 2022-04-18 14:29:15 UTC Comment hidden (spam)
Comment 6 Nate Graham 2022-05-16 18:46:11 UTC
*** Bug 453849 has been marked as a duplicate of this bug. ***
Comment 7 Etaash Mathamsetty 2022-06-10 02:21:17 UTC Comment hidden (spam)
Comment 8 David Redondo 2022-06-10 07:15:22 UTC
*** Bug 455105 has been marked as a duplicate of this bug. ***
Comment 9 David Edmundson 2022-06-27 11:10:43 UTC
*** Bug 455900 has been marked as a duplicate of this bug. ***
Comment 10 Shmerl 2022-06-29 04:50:24 UTC
So something like this will eventually be able to help it? https://www.youtube.com/watch?v=fRdnRwPBFBk
Comment 11 Francisco Cribari 2022-07-29 11:27:38 UTC Comment hidden (spam)
Comment 12 Nate Graham 2022-07-29 15:36:14 UTC Comment hidden (spam)
Comment 13 Armin 2022-08-30 06:46:51 UTC Comment hidden (spam)
Comment 14 Piotr Mierzwinski 2022-08-30 17:44:31 UTC Comment hidden (spam)
Comment 15 Nate Graham 2022-08-30 17:51:04 UTC Comment hidden (spam)
Comment 16 Piotr Mierzwinski 2022-08-30 20:13:15 UTC Comment hidden (spam)
Comment 17 Nate Graham 2022-08-30 20:15:58 UTC Comment hidden (spam)
Comment 18 Piotr Mierzwinski 2022-09-02 21:15:32 UTC Comment hidden (spam)
Comment 19 Nate Graham 2022-09-02 21:46:18 UTC Comment hidden (spam)
Comment 20 devsk 2022-09-30 18:15:36 UTC
(In reply to Nate Graham from comment #19)
> In general, Plasma has enough testers and QA people. What it lacks is enough
> developers to fix all the issues those people find.

Or the devs you already have are interested only in next shiny thing than to fix bugs in their code...:-) Sure, we can't force devs to stick around forever and fix bugs in their code but sometimes, its good to stop new development and just fix the bugs. You will have more adoption and participation, and that can potentially get you more devs.
Comment 21 Bernie Innocenti 2022-09-30 18:57:11 UTC
(In reply to devsk from comment #20)
> Or the devs you already have are interested only in next shiny thing than to
> fix bugs in their code...:-) Sure, we can't force devs to stick around
> forever and fix bugs in their code but sometimes, its good to stop new
> development and just fix the bugs. You will have more adoption and
> participation, and that can potentially get you more devs.

As a user, I also wish session restore to worked on Wayland, but inflammatory comments won't help expedite it.

I would like to know what's making this difficult. X11 had a session management protocol; does Wayland define something equivalent? If not, could Plasma do something limited to KDE apps?

Where is the current session save/restore code? Any documentation we could link in this bug to support someone who wants to give a shot at it?
Comment 22 devsk 2022-09-30 19:15:29 UTC
(In reply to Bernie Innocenti from comment #21)
> (In reply to devsk from comment #20)
> > Or the devs you already have are interested only in next shiny thing than to
> > fix bugs in their code...:-) Sure, we can't force devs to stick around
> > forever and fix bugs in their code but sometimes, its good to stop new
> > development and just fix the bugs. You will have more adoption and
> > participation, and that can potentially get you more devs.
> 
> As a user, I also wish session restore to worked on Wayland, but
> inflammatory comments won't help expedite it.

I swear inflammation was not the intention. But truth can be hard sometimes and it lands wrongly in written communications. My apologies if it sounded like that.

It is true that devs like to move onto newer things. I see it everyday at work. And good teams and leaders have to bring them back to the table. We have burnt sprints doing just bug fixes solely because of this. And it works! The overall quality of the code improves and customers are happier and they spread the good word!
Comment 23 Ard van der Marel 2022-10-01 12:53:02 UTC
For me, with x11 applications running under x11 ad Wayland, it just seems to be a app startup mechanism. xcalc for example doesn't remain state after logging out. The observed result has been found because Firefox has a option to reopen the pages that were closed during the shutdown of Firefox. Therefore i think changing restore to reopen would be more accurate and a more concrete path to a solution.

after the user ends session by logging out, rebooting, etc. Before closing the applications, the paths of the open applications should be saved to a (session) file from where these can be opened.

I would be interested to know how the x11 application reopen is done in Wayland as hopefully some of the solution can be reused or be expanded on to include Wayland applications. Im not completely confident in my c++ skills yet as im studying it, so maybe some would like to help me tackle by introducing me to the project structure and the working parts making up KDE.
Comment 24 imaginator 2022-10-02 13:32:10 UTC
(In reply to devsk from comment #22)
> (In reply to Bernie Innocenti from comment #21)
> > (In reply to devsk from comment #20)
> > > Or the devs you already have are interested only in next shiny thing than to
> > > fix bugs in their code...:-) Sure, we can't force devs to stick around
> > > forever and fix bugs in their code but sometimes, its good to stop new
> > > development and just fix the bugs. You will have more adoption and
> > > participation, and that can potentially get you more devs.
> > 
> > As a user, I also wish session restore to worked on Wayland, but
> > inflammatory comments won't help expedite it.
> 
> I swear inflammation was not the intention. But truth can be hard sometimes
> and it lands wrongly in written communications. My apologies if it sounded
> like that.
Your comment was not inflammatory at all. It was your opinion expressed in a friendly and factual manner. IMO.

But it seems to me that esp. in the FOSS community quite a few people simply can't stand critigue, however constructive or well intentioned or politely formulated it may be. They seem to experience critigue as an aggression and not as a chance for improvement. And I consider that a major weakness and an obstacle to success.
Comment 25 imaginator 2022-10-02 13:34:48 UTC
This "bug" or missing key feature, as I see it, is obviously really bad and at this point of time quite shocking. Two days ago I was about switching to Plasma-Wayland because I had such a favorable impression of it. Until I discovered this thing.

I don't know whether this situation is due to a lack of provision in the Wayland-design or an inability of developers to focus on what really matters. But if the Plasma devs could solve this on their own, I'd strongly suggest they drop any other Wayland related work *NOW* and start working like hell on resolving this issue.

Because this is so detrimental to Plasma's and KDE's reputation that they may not recover from it. IMO.
Comment 26 Nate Graham 2022-10-17 20:06:11 UTC
*** Bug 460567 has been marked as a duplicate of this bug. ***
Comment 27 Andreas Hartmann 2022-11-27 14:48:53 UTC
Same problem here with leap 15.4. Would be really nice to get it fixed ... .
Comment 28 ticonzero 2022-12-09 09:14:13 UTC
Hi all, 

same problem here does anyone know if the bug has been fixed?

thanks
Andrea
Comment 29 imaginator 2022-12-09 11:43:07 UTC
(In reply to ticonzero from comment #28)
> Hi all, 
> 
> same problem here does anyone know if the bug has been fixed?
> 
If it had been fixed, the status would have changed. 
With the "Importance" downgraded to "normal", I don't expect it to be fixed before Plasma 6.
Comment 30 ticonzero 2022-12-09 16:43:15 UTC
ok, thanks for the clarification, I will be moving back to Xubuntu 20.04 LTS, since I make big use of this feature
Comment 31 imaginator 2022-12-09 17:41:44 UTC
(In reply to ticonzero from comment #30)
> ok, thanks for the clarification, I will be moving back to Xubuntu 20.04
> LTS, since I make big use of this feature

I'd say that 99 % of the users make use of this feature. The rest either don't know that it exists or never log out because they are incurably addicted to Plasma-Wayland. ;)
Comment 32 Andreas Hartmann 2022-12-09 17:56:30 UTC
I don't think there are so many Wayland users out there because Wayland has so many restrictions and bugs so far (and I don't see any solution).
Comment 33 Ed Tomlinson 2022-12-11 19:54:02 UTC
Created attachment 154513 [details]
attachment-25640-0.html

Andreas, I would respectfully disagree.  I switched to wayland once multi
monitor support started working and have not looked back.  Here, at least,
the color is more vivid using wayland (eg X looks washed out).  Aside from
a few irritating bugs like this one, it works well.

On Fri, Dec 9, 2022 at 12:56 PM Andreas Hartmann <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=436318
>
> --- Comment #32 from Andreas Hartmann <andihartmann@freenet.de> ---
> I don't think there are so many Wayland users out there because Wayland
> has so
> many restrictions and bugs so far (and I don't see any solution).
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
Comment 34 Shmerl 2022-12-11 19:55:56 UTC
(In reply to Andreas Hartmann from comment #32)
> I don't think there are so many Wayland users out there because Wayland has
> so many restrictions and bugs so far (and I don't see any solution).

Just as a reference point, Wayland session usage is shown gradually growing here:
https://www.gamingonlinux.com/index.php?module=statistics&view=trends#SessionType-top
Comment 35 ticonzero 2022-12-11 20:19:51 UTC
Created attachment 154515 [details]
attachment-30227-0.html

Well I do like it, in fact I'm sticking with it, but I do miss being able
to restore the old session, for me it means not having to reopen dozen of
pdfs in different okular instances on different desktops

On Sun, 11 Dec 2022, 20:54 Ed Tomlinson, <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=436318
>
> --- Comment #33 from Ed Tomlinson <edtoml@gmail.com> ---
> Andreas, I would respectfully disagree.  I switched to wayland once multi
> monitor support started working and have not looked back.  Here, at least,
> the color is more vivid using wayland (eg X looks washed out).  Aside from
> a few irritating bugs like this one, it works well.
>
> On Fri, Dec 9, 2022 at 12:56 PM Andreas Hartmann <bugzilla_noreply@kde.org
> >
> wrote:
>
> > https://bugs.kde.org/show_bug.cgi?id=436318
> >
> > --- Comment #32 from Andreas Hartmann <andihartmann@freenet.de> ---
> > I don't think there are so many Wayland users out there because Wayland
> > has so
> > many restrictions and bugs so far (and I don't see any solution).
> >
> > --
> > You are receiving this mail because:
> > You are on the CC list for the bug.
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
Comment 36 ticonzero 2022-12-11 20:21:13 UTC
Created attachment 154516 [details]
attachment-30617-0.html

You were not replying to me I guess ...

On Sun, 11 Dec 2022, 21:19 ti conzero, <ticonzero2010@gmail.com> wrote:

> Well I do like it, in fact I'm sticking with it, but I do miss being able
> to restore the old session, for me it means not having to reopen dozen of
> pdfs in different okular instances on different desktops
>
> On Sun, 11 Dec 2022, 20:54 Ed Tomlinson, <bugzilla_noreply@kde.org> wrote:
>
>> https://bugs.kde.org/show_bug.cgi?id=436318
>>
>> --- Comment #33 from Ed Tomlinson <edtoml@gmail.com> ---
>> Andreas, I would respectfully disagree.  I switched to wayland once multi
>> monitor support started working and have not looked back.  Here, at least,
>> the color is more vivid using wayland (eg X looks washed out).  Aside from
>> a few irritating bugs like this one, it works well.
>>
>> On Fri, Dec 9, 2022 at 12:56 PM Andreas Hartmann <
>> bugzilla_noreply@kde.org>
>> wrote:
>>
>> > https://bugs.kde.org/show_bug.cgi?id=436318
>> >
>> > --- Comment #32 from Andreas Hartmann <andihartmann@freenet.de> ---
>> > I don't think there are so many Wayland users out there because Wayland
>> > has so
>> > many restrictions and bugs so far (and I don't see any solution).
>> >
>> > --
>> > You are receiving this mail because:
>> > You are on the CC list for the bug.
>>
>> --
>> You are receiving this mail because:
>> You are on the CC list for the bug.
>
>
Comment 37 Francisco Cribari 2022-12-11 20:33:59 UTC
(In reply to ticonzero from comment #35)

> Well I do like it, in fact I'm sticking with it, but I do miss being able
> to restore the old session, for me it means not having to reopen dozen of
> pdfs in different okular instances on different desktops

Same here. This bug is the only reason why I am not running Wayland. I usually have about a dozen PDF (okular) and over twenty text (kate) files open. It is too much work to open each of these files again every time I restart the computer.
Comment 38 Mauro Molinari 2022-12-11 21:21:12 UTC
(In reply to Francisco Cribari from comment #37)
> It is too much work to open each of these files again every time I
> restart the computer.

Ever heard about sleep and hibernation? ;-)
Comment 39 Francisco Cribari 2022-12-11 21:27:43 UTC
(In reply to Mauro Molinari from comment #38)

> Ever heard about sleep and hibernation? ;-)

Sure. I use them daily. I'm on Arch Linux which is not shy in updates. Several updates (kernel (zen), etc.) require a reboot.
Comment 40 John E 2022-12-12 00:03:59 UTC
(In reply to Francisco Cribari from comment #37)
> (In reply to ticonzero from comment #35)
> 
> > Well I do like it, in fact I'm sticking with it, but I do miss being able
> > to restore the old session, for me it means not having to reopen dozen of
> > pdfs in different okular instances on different desktops
> 
> Same here. This bug is the only reason why I am not running Wayland. I
> usually have about a dozen PDF (okular) and over twenty text (kate) files
> open. It is too much work to open each of these files again every time I
> restart the computer.

If your windows don't change too much you can find a workaround on my dup: https://bugs.kde.org/show_bug.cgi?id=455900
Comment 41 ticonzero 2022-12-12 03:33:04 UTC
Created attachment 154521 [details]
attachment-13297-0.html

It wouldn't work for me, I need to switch between different OSs and need to
restart

On Sun, 11 Dec 2022, 22:21 Mauro Molinari, <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=436318
>
> --- Comment #38 from Mauro Molinari <mauromol@tiscali.it> ---
> (In reply to Francisco Cribari from comment #37)
> > It is too much work to open each of these files again every time I
> > restart the computer.
>
> Ever heard about sleep and hibernation? ;-)
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
Comment 42 imaginator 2022-12-12 09:10:02 UTC
(In reply to John E from comment #40)
> (In reply to Francisco Cribari from comment #37)
> > (In reply to ticonzero from comment #35)
> > 
> > > Well I do like it, in fact I'm sticking with it, but I do miss being able
> > > to restore the old session, for me it means not having to reopen dozen of
> > > pdfs in different okular instances on different desktops
> > 
> > Same here. This bug is the only reason why I am not running Wayland. I
> > usually have about a dozen PDF (okular) and over twenty text (kate) files
> > open. It is too much work to open each of these files again every time I
> > restart the computer.
> 
> If your windows don't change too much you can find a workaround on my dup:
> https://bugs.kde.org/show_bug.cgi?id=455900

In my view, the most obvious and promising "workaround" for an ordinary user is to continue enjoying Plasma-X11 until all major issues in Plasma-Wayland are fixed and it's ready for productive use. ;)
Comment 43 ticonzero 2022-12-12 09:29:14 UTC
Created attachment 154527 [details]
attachment-19101-0.html

I installed kubuntu 22.04LTS, that came with Wayland, how can I get back to
X11-Plasma, without returning to 18.04LTS ?

On Mon, 12 Dec 2022, 10:10 , <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=436318
>
> --- Comment #42 from imaginator@mailbox.org ---
> (In reply to John E from comment #40)
> > (In reply to Francisco Cribari from comment #37)
> > > (In reply to ticonzero from comment #35)
> > >
> > > > Well I do like it, in fact I'm sticking with it, but I do miss being
> able
> > > > to restore the old session, for me it means not having to reopen
> dozen of
> > > > pdfs in different okular instances on different desktops
> > >
> > > Same here. This bug is the only reason why I am not running Wayland. I
> > > usually have about a dozen PDF (okular) and over twenty text (kate)
> files
> > > open. It is too much work to open each of these files again every time
> I
> > > restart the computer.
> >
> > If your windows don't change too much you can find a workaround on my
> dup:
> > https://bugs.kde.org/show_bug.cgi?id=455900
>
> In my view, the most obvious and promising "workaround" for an ordinary
> user is
> to continue enjoying Plasma-X11 until all major issues in Plasma-Wayland
> are
> fixed and it's ready for productive use. ;)
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
Comment 44 imaginator 2022-12-12 09:41:35 UTC
(In reply to ticonzero from comment #43)
> Created attachment 154527 [details]
> attachment-19101-0.html
> 
> I installed kubuntu 22.04LTS, that came with Wayland, how can I get back to
> X11-Plasma, without returning to 18.04LTS ?
I think that's a question for the kbuntu support forum / mailing list.
Comment 45 ticonzero 2022-12-12 10:01:59 UTC
Created attachment 154528 [details]
attachment-23823-0.html

Thanks!

On Mon, 12 Dec 2022, 10:41 , <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=436318
>
> --- Comment #44 from imaginator@mailbox.org ---
> (In reply to ticonzero from comment #43)
> > Created attachment 154527 [details]
> > attachment-19101-0.html
> >
> > I installed kubuntu 22.04LTS, that came with Wayland, how can I get back
> to
> > X11-Plasma, without returning to 18.04LTS ?
> I think that's a question for the kbuntu support forum / mailing list.
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
Comment 46 John E 2022-12-13 01:07:29 UTC
(In reply to imaginator from comment #42)
> (In reply to John E from comment #40)
> > (In reply to Francisco Cribari from comment #37)
> > > (In reply to ticonzero from comment #35)
> > > 
> > > > Well I do like it, in fact I'm sticking with it, but I do miss being able
> > > > to restore the old session, for me it means not having to reopen dozen of
> > > > pdfs in different okular instances on different desktops
> > > 
> > > Same here. This bug is the only reason why I am not running Wayland. I
> > > usually have about a dozen PDF (okular) and over twenty text (kate) files
> > > open. It is too much work to open each of these files again every time I
> > > restart the computer.
> > 
> > If your windows don't change too much you can find a workaround on my dup:
> > https://bugs.kde.org/show_bug.cgi?id=455900
> 
> In my view, the most obvious and promising "workaround" for an ordinary user
> is to continue enjoying Plasma-X11 until all major issues in Plasma-Wayland
> are fixed and it's ready for productive use. ;)

That's what I do as well, but it's not really what I would call a workaround.
Comment 47 Andreas Hartmann 2023-01-22 17:44:26 UTC
Exactly same problem can be seen even if KDE is run in wayland mode ... .
Comment 48 Andreas Hartmann 2023-01-22 17:45:45 UTC
Please ignore my last entry - wrong ticket :-).
Comment 49 Bruno Friedmann 2023-03-05 14:40:39 UTC
I've been "forced" to move now to wayland to get the per screen scale factor as it will never be implemented on X11. But loosing restore session is a pain.
It seems we miss a global review on plasma development, with clear objectives for each release, to make all users (and developers) happy.
Comment 50 imaginator 2023-03-05 15:02:11 UTC
(In reply to Bruno Friedmann from comment #49)
> I've been "forced" to move now to wayland to get the per screen scale factor
> as it will never be implemented on X11. But loosing restore session is a
> pain.
> It seems we miss a global review on plasma development, with clear
> objectives for each release, to make all users (and developers) happy.

I'm sure it holds the top position on their priority list for Plasma 6. 
But: who knows? ;)
Comment 51 postix 2023-03-05 18:47:55 UTC
(In reply to Bernie Innocenti from comment #21)
> I would like to know what's making this difficult. X11 had a session
> management protocol; does Wayland define something equivalent? 

Let me loosely quote the wiki [1]
> Session restoring does not include Wayland native windows (...). 
> Our sessions management recover engine is based on the X Session Management Protocol
> and there is apparently currently no generic concept to do it on Wayland.
> But on Qt it's plugin-able and GNOME has had their own implementation for some time. [2]

Regarding opened discussions, there's an issue in the kwin repo, see "Goal 2: Session restore" [3]

[1] https://community.kde.org/Plasma/Wayland_Showstoppers
[2] https://wiki.gnome.org/Projects/SessionManagement/GnomeSession
[3] https://invent.kde.org/plasma/kwin/-/issues/113#note_500909
Comment 52 postix 2023-03-05 18:55:34 UTC
See also the MR linked in the issue above: "Draft: wayland: Add support for xdg-session-v1" [1]

[1] https://invent.kde.org/plasma/kwin/-/merge_requests/3024
Comment 53 devsk 2023-06-24 16:13:55 UTC
Looks like some work was started 3 months ago and then, it stopped.

I tried to use wayland again to see if the experience is any better and went back to x11 after an hour of frustration. I have 4 different desktops for various projects and just restoring all my konsole windows (about 9 of them) and their tabs, and placing them in their respective places on each boot is a big pain. Let's not even talk about putting other apps where I am used to seeing them. 

How does a serious dev use wayland at all? I am just curious.
Comment 54 Patrick O'Callaghan 2023-06-24 21:23:29 UTC
(In reply to devsk from comment #53)
> Looks like some work was started 3 months ago and then, it stopped.
> 
> I tried to use wayland again to see if the experience is any better and went
> back to x11 after an hour of frustration. I have 4 different desktops for
> various projects and just restoring all my konsole windows (about 9 of them)
> and their tabs, and placing them in their respective places on each boot is
> a big pain. Let's not even talk about putting other apps where I am used to
> seeing them. 
> 
> How does a serious dev use wayland at all? I am just curious.

My thoughts exactly. I've no doubt that serious devs *do* use Wayland, but I've no idea what their workflow is like. For me, session restore is an absolute requirement, so I keep feeling I must be missing something.
Comment 55 imaginator 2023-06-25 09:58:40 UTC
(In reply to Patrick O'Callaghan from comment #54)
> (In reply to devsk from comment #53)
> > Looks like some work was started 3 months ago and then, it stopped.
> > 
> > I tried to use wayland again to see if the experience is any better and went
> > back to x11 after an hour of frustration. I have 4 different desktops for
> > various projects and just restoring all my konsole windows (about 9 of them)
> > and their tabs, and placing them in their respective places on each boot is
> > a big pain. Let's not even talk about putting other apps where I am used to
> > seeing them. 
> > 
> > How does a serious dev use wayland at all? I am just curious.
> 
> My thoughts exactly. I've no doubt that serious devs *do* use Wayland, but
> I've no idea what their workflow is like. For me, session restore is an
> absolute requirement, so I keep feeling I must be missing something.

Session restore is such a basic feature nowadays that it seems crazy to even have to waste one thought on it.  It *has* to be there.  Like wheels on a car.  If not, something went seriously wrong somewhere.

My way to deal with that - IMO disappointing - Wayland-show is that I simply don't care any more.  To me it doesn't offer any benefit.  And as long as there's a Plasma-X11 I'm happy.
Comment 56 Eric 2023-07-25 18:11:32 UTC
Are there any reasonable workarounds? Say a script that reads all window positions, sizes, etc., and saves the information, and then another script that can read this info and open and arrange the windows?
Comment 57 Patrick O'Callaghan 2023-07-25 21:05:59 UTC
For a while I used a script based on:

https://github.com/zepalmer/script-vdr

but it's for Python-2 and X11 and I haven't tried to bring it up to date. It's based around wmctrl, which AFAIK is not supported on Wayland, but there might be something useful there. Note that it's designed to save/restore the windows belonging to one process, e.g. your browser, not the full user session.
Comment 58 wdmlist 2023-08-06 20:40:53 UTC
Still an issue on Kubuntu 22.04, going to switch back to X until it is fixed.
Comment 59 Eric 2023-10-05 20:05:01 UTC
According to the plasma/wayland showstoppers page, session restore is a priority:
https://community.kde.org/Plasma/Wayland_Showstoppers

However, on the plasma 6 development page there is no mention of session restore:
https://community.kde.org/Plasma/Plasma_6

Does anyone know if session restore is supposed to be in plasma 6?
Comment 60 postix 2023-10-05 21:11:49 UTC
> Does anyone know if session restore is supposed to be in plasma 6?
The plan is to solve all Wayland Showstoppers - including session restore - until Plasma 6.0 is released [1]

[1] https://pointieststick.com/2023/09/06/september-plasma-6-update/#comment-37811
Comment 61 ilovekiruna 2023-11-11 16:04:38 UTC
from my understanding the issue was downgraded to a non-showstopper anymore. At least this is shown now in the wiki page (https://community.kde.org/Plasma/Wayland_Showstoppers). I hope that Qt-pluginable option will still be provided on plasma 6. Is there  any update about when it will be integrated?
Comment 62 Nate Graham 2023-11-11 16:22:05 UTC
The plan right now is as follows:
- For Plasma 6.0, implement a sort of fake session restore that on login, simply re-opens apps that were open on last logout, and count on apps that have state worth saving doing the saving themselves (and many apps already do; for example Firefox, Discord, Dolphin, Kate, Kile, Elisa...).
- For a later Plasma 6 version, implement real session restore that's governed by a new Wayland protocol (one is in progress) and make KDE apps opt into it.
- After that, keep the fake session restore and use it for apps that don't opt into the real session restore.

This should ultimately produce a better UX than on X11, where many apps never opted into session restore and so it was semi-random as to which apps got launched on login.
Comment 63 Charles Dennett 2023-11-11 16:38:01 UTC
Will what is planned for KDE 6 take into account multiple monitors and multiple virtual desktops so that apps start in the desired monitor/virtual desktop?
Comment 64 ticonzero 2023-11-11 17:01:06 UTC
That is crucial!

On 11/11/23 17:38, Charles Dennett wrote:
> https://bugs.kde.org/show_bug.cgi?id=436318
>
> --- Comment #63 from Charles Dennett <cdennett@gmail.com> ---
> Will what is planned for KDE 6 take into account multiple monitors and multiple
> virtual desktops so that apps start in the desired monitor/virtual desktop?
>
Comment 65 Nate Graham 2023-11-11 17:08:11 UTC
For the fake session restore, I can't make any promises about that. I've talked to the fellow doing the work and he wants to take those into consideration, but it becomes more technically challenging, so the first version might not. But I do expect those to *eventually* work in the fake session restore.
Comment 66 Oleg Girko 2023-11-11 18:59:52 UTC
(In reply to Charles Dennett from comment #63)
> Will what is planned for KDE 6 take into account multiple monitors and
> multiple virtual desktops so that apps start in the desired monitor/virtual
> desktop?

And please don't forget about activities!
I'm tired of moving Firefox windows to different activities manually each time after login even on KDE 5 X11 session.
Comment 67 Armin 2023-11-25 11:52:18 UTC
(In reply to Nate Graham from comment #62)

> - For Plasma 6.0, implement a sort of fake session restore that on login,
> simply re-opens apps that were open on last logout, […]

Wow, that sounds great! I mean, real session restore would be a fantastic feature to have, but the “fake” option is already a great improvement to what we have at the moment (i.e. nothing).

I got already worried this was dropped entirely when I saw the change in the showstopper bug list. This is after all by far the biggest pain point I have with KDE Wayland.
Comment 68 Patrick O'Callaghan 2023-11-25 12:11:45 UTC
(In reply to Nate Graham from comment #62)
> The plan right now is as follows:
> - For Plasma 6.0, implement a sort of fake session restore that on login,
> simply re-opens apps that were open on last logout, and count on apps that
> have state worth saving doing the saving themselves (and many apps already
> do; for example Firefox, Discord, Dolphin, Kate, Kile, Elisa...).

Aside from the virtual desktop issue already mentioned by several people, it's worth noting that Dolphin does not currently restore its state correctly even under X11. Briefly, if you have more than one Dolphin window, some with the Terminal open and some not, the restored Dolphin will have all windows showing the Terminal in the same state, either open or closed, apparently at random.

I reported this over a year ago (see https://bugs.kde.org/show_bug.cgi?id=455324) but never saw a reply.
Comment 69 Mihai Sorin Dobrescu 2023-11-26 14:07:38 UTC
Indeed, Dolphin lost a lot of its session features, like restoring at the original position.

For me, being an Nvidia user (didn't know the drawbacks at the time and Plasma looked to work good enough with x11 and Nvidia), has become more and more unlikely I would move to the next Plasma at all. This combination that makes any input unusable, the mouse pointer or the keyboard signals being sent to Plasma after 30 secs or so, but also lacking session, are unacceptable. I understand some features are  ~ maybe ~ difficult to implement, but basic features like these are a must. I can't expect from a user to rather change a laptop just because he would use a DE, sorry.
Comment 70 nkwkelvin 2023-12-01 21:12:14 UTC
(In reply to Nate Graham from comment #62)
> The plan right now is as follows:
> - For Plasma 6.0, implement a sort of fake session restore that on login,
> simply re-opens apps that were open on last logout, and count on apps that
> have state worth saving doing the saving themselves (and many apps already
> do; for example Firefox, Discord, Dolphin, Kate, Kile, Elisa...).
> - For a later Plasma 6 version, implement real session restore that's
> governed by a new Wayland protocol (one is in progress) and make KDE apps
> opt into it.
> - After that, keep the fake session restore and use it for apps that don't
> opt into the real session restore.
> 
> This should ultimately produce a better UX than on X11, where many apps
> never opted into session restore and so it was semi-random as to which apps
> got launched on login.

Does Konsole save session (the windows and tabs and the current directory of each tab) by itself? My experience is that it does not, but given that things like Kate does, why can't Konsole, which is also a KDE app, do that? Am I missing something?
Comment 71 Bruno Friedmann 2023-12-02 08:36:44 UTC
> Does Konsole save session (the windows and tabs and the current directory of each tab) by itself? My experience is that it does not, but given that things like Kate does, why can't Konsole, which is also a KDE app, do that?
> Am I missing something?

Yes my experience proove it, I usually have 10 tabs opened in konsole, most of them are dedicated to a relative work, and as such the directory in which the last session was run, and is restored on the right desktop.
That IS the most reason I don't use (yet) Wayland.
Comment 72 ilovekiruna 2023-12-08 13:53:20 UTC
(In reply to Bruno Friedmann from comment #71)
> > Does Konsole save session (the windows and tabs and the current directory of each tab) by itself? My experience is that it does not, but given that things like Kate does, why can't Konsole, which is also a KDE app, do that?
> > Am I missing something?
> 
> Yes my experience proove it, I usually have 10 tabs opened in konsole, most
> of them are dedicated to a relative work, and as such the directory in which
> the last session was run, and is restored on the right desktop.
> That IS the most reason I don't use (yet) Wayland.

One workaround for Konsole exists on Stack-Exchange: https://unix.stackexchange.com/a/593779 It also works on Wayland. However, I believe this should be possible with built-in functionality.
Comment 73 ticonzero 2023-12-11 08:54:38 UTC
the same here.

On 02/12/23 09:36, Bruno Friedmann wrote:
> https://bugs.kde.org/show_bug.cgi?id=436318
>
> --- Comment #71 from Bruno Friedmann <bruno@ioda-net.ch> ---
>> Does Konsole save session (the windows and tabs and the current directory of each tab) by itself? My experience is that it does not, but given that things like Kate does, why can't Konsole, which is also a KDE app, do that?
>> Am I missing something?
> Yes my experience proove it, I usually have 10 tabs opened in konsole, most of
> them are dedicated to a relative work, and as such the directory in which the
> last session was run, and is restored on the right desktop.
> That IS the most reason I don't use (yet) Wayland.
>
Comment 74 imaginator 2023-12-11 18:59:16 UTC
(In reply to Nate Graham from comment #62)
> The plan right now is as follows:
> - For Plasma 6.0, implement a sort of fake session restore that on login,
> simply re-opens apps that were open on last logout, and count on apps that
> have state worth saving doing the saving themselves (and many apps already
> do; for example Firefox, Discord, Dolphin, Kate, Kile, Elisa...).
> - For a later Plasma 6 version, implement real session restore that's
> governed by a new Wayland protocol (one is in progress) and make KDE apps
> opt into it.
> - After that, keep the fake session restore and use it for apps that don't
> opt into the real session restore.
> 
> This should ultimately produce a better UX than on X11, where many apps
> never opted into session restore and so it was semi-random as to which apps
> got launched on login.
Does that plan also apply to Plasma-6-X11 or will session restore there just keep working like in Plasma-5-X11?  Thanks.
Comment 75 nkwkelvin 2023-12-11 19:21:41 UTC
I have made two scripts (heavily modified from scripts that I found somewhere else) to help session restore semi-automatically:

https://github.com/Kelvin-Ng/konsole-session-restore:
This script saves and reopens the Konsole windows with original tabs and directories.

https://github.com/Kelvin-Ng/kde-window-status-restore:
This script saves and restores the statuses of the windows, currently only activity and desktop. Note that it does not reopen the windows. The windows will have to be first reopened before running the restore script.

Hope these scripts are helpful.
Comment 76 imaginator 2023-12-19 09:07:47 UTC
(In reply to Nate Graham from comment #62)
> The plan right now is as follows:
> - For Plasma 6.0, implement a sort of fake session restore that on login,
> simply re-opens apps that were open on last logout, and count on apps that
> have state worth saving doing the saving themselves (and many apps already
> do; for example Firefox, Discord, Dolphin, Kate, Kile, Elisa...).
> - For a later Plasma 6 version, implement real session restore that's
> governed by a new Wayland protocol (one is in progress) and make KDE apps
> opt into it.
> - After that, keep the fake session restore and use it for apps that don't
> opt into the real session restore.
> 
> This should ultimately produce a better UX than on X11, where many apps
> never opted into session restore and so it was semi-random as to which apps
> got launched on login.

Alright, maybe my question was a bit too difficult to understand.  So I rephrase it a bit: will session restore in Plasma-6-X11 work _right from the start_ as it does in Plasma-5-X11 or not?  Some people don't give a damn about Wayland but do care about reliable and complete session restore.
Comment 77 ticonzero 2023-12-19 10:46:08 UTC
Created attachment 164287 [details]
attachment-2084366-0.html

Count me among those who need reliable session restore, I'm stuck with
xubuntu 20.4 and will stay there until session restore will work properly

On Tue, 19 Dec 2023, 10:07 , <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=436318
>
> --- Comment #76 from imaginator@mailbox.org ---
> (In reply to Nate Graham from comment #62)
> > The plan right now is as follows:
> > - For Plasma 6.0, implement a sort of fake session restore that on login,
> > simply re-opens apps that were open on last logout, and count on apps
> that
> > have state worth saving doing the saving themselves (and many apps
> already
> > do; for example Firefox, Discord, Dolphin, Kate, Kile, Elisa...).
> > - For a later Plasma 6 version, implement real session restore that's
> > governed by a new Wayland protocol (one is in progress) and make KDE apps
> > opt into it.
> > - After that, keep the fake session restore and use it for apps that
> don't
> > opt into the real session restore.
> >
> > This should ultimately produce a better UX than on X11, where many apps
> > never opted into session restore and so it was semi-random as to which
> apps
> > got launched on login.
>
> Alright, maybe my question was a bit too difficult to understand.  So I
> rephrase it a bit: will session restore in Plasma-6-X11 work _right from
> the
> start_ as it does in Plasma-5-X11 or not?  Some people don't give a damn
> about
> Wayland but do care about reliable and complete session restore.
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
Comment 78 Nate Graham 2023-12-20 18:16:44 UTC
(In reply to imaginator from comment #76)
> Alright, maybe my question was a bit too difficult to understand.  So I
> rephrase it a bit: will session restore in Plasma-6-X11 work _right from the
> start_ as it does in Plasma-5-X11 or not?  Some people don't give a damn
> about Wayland but do care about reliable and complete session restore.

On X11? No changes have been made to session restore on X11 there so I would expect so. However I can't personally guarantee no regressions, as I'm not personally using X11 anymore and therefore not testing for regressions there. Someone else will need to step in for that.
Comment 79 imaginator 2023-12-20 21:17:12 UTC
(In reply to Nate Graham from comment #78)
> (In reply to imaginator from comment #76)
> > Alright, maybe my question was a bit too difficult to understand.  So I
> > rephrase it a bit: will session restore in Plasma-6-X11 work _right from the
> > start_ as it does in Plasma-5-X11 or not?  Some people don't give a damn
> > about Wayland but do care about reliable and complete session restore.
> 
> On X11? No changes have been made to session restore on X11 there so I would
> expect so. However I can't personally guarantee no regressions, as I'm not
> personally using X11 anymore and therefore not testing for regressions
> there. Someone else will need to step in for that.

Thanks for clarifying this.
Comment 80 Andrey 2024-01-12 16:12:32 UTC
*** Bug 476831 has been marked as a duplicate of this bug. ***
Comment 81 fanzhuyifan 2024-02-24 05:37:23 UTC
*** Bug 481745 has been marked as a duplicate of this bug. ***
Comment 82 Nate Graham 2024-03-04 19:26:29 UTC
Promoting this to be a 15-minute bug since it's Wayland-only and the Wayland-session is the default in Plasma 6 now.
Comment 83 Nate Graham 2024-03-06 15:40:33 UTC
*** Bug 479886 has been marked as a duplicate of this bug. ***
Comment 84 David Edmundson 2024-03-08 09:06:53 UTC
We've introduced a fallback. plasma-fallback-session-save which provides something.

It's not perfect. It just sees which apps were open and then reopens them. The application has no mechanism to save any state. 
There's definitely room for improvement, but that involves upstream and updating all  applications(!) which isn't worth us tracking in our bug tracker.
Comment 85 David Edmundson 2024-03-08 09:17:19 UTC
Git commit 804976c5ecec1fbf5f6e7e09970a8269bdf748d2 by David Edmundson.
Committed on 08/03/2024 at 09:17.
Pushed by davidedmundson into branch 'master'.

Migrate manual session saving to plasma-shutdown

This allows the wayland fallback session saving to run too and removes
more ksmserver logic from our library code.

session-restore is patched to also run when the configuration file is
set to restore the manually saved session.

M  +0    -3    libkworkspace/CMakeLists.txt
M  +2    -3    libkworkspace/sessionmanagement.cpp
M  +1    -0    startkde/plasma-shutdown/org.kde.Shutdown.xml
M  +24   -2    startkde/plasma-shutdown/shutdown.cpp
M  +1    -0    startkde/plasma-shutdown/shutdown.h
M  +1    -1    startkde/session-restore/restore.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/804976c5ecec1fbf5f6e7e09970a8269bdf748d2
Comment 86 Laurent Bonnaud 2024-03-08 09:27:33 UTC
> We've introduced a fallback. plasma-fallback-session-save which provides something.

Thanks!

> It's not perfect. It just sees which apps were open and then reopens them. The application has no mechanism to save any state. 

Let's take Konsole as an example.  Does this mean that Konsole will not save its current directory?
Comment 87 Nate Graham 2024-03-09 00:09:58 UTC
Correct. Because real session restore is not implemented on Wayland yet, at the moment this manual session restore hooks into the "real fake session restore" mechanism that will be used until we get real session restore.
Comment 88 Patrick O'Callaghan 2024-03-09 10:26:02 UTC
(In reply to Nate Graham from comment #87)
> Correct. Because real session restore is not implemented on Wayland yet, at
> the moment this manual session restore hooks into the "real fake session
> restore" mechanism that will be used until we get real session restore.

Any idea on when real session-restore might be coming?
Comment 89 Nate Graham 2024-03-10 03:18:43 UTC
Once the proposed Wayland protocol gets approved and merged, support in Plasma will likely arrive quickly. I don't know if it's helpful to speculate as to when the protocol might get approved. It could be tomorrow and it could be in two years. Obviously we all would prefer the former over the latter. :)
Comment 90 Laurent Bonnaud 2024-03-10 09:01:05 UTC
How about using this piece of software?

https://github.com/Vladimir-csp/uwsm
Comment 91 Piotr Mierzwinski 2024-03-15 00:19:20 UTC
Session is restored in strange way. Firstly starts applications, so we have black screen and starting apps. and at end starts plasmashell.
Second thing is that session in konsole is not restored, but in IceWm its working well.
Comment 92 Niklas Sombert 2024-03-15 22:00:11 UTC
(In reply to Piotr Mierzwinski from comment #91)
> Session is restored in strange way. Firstly starts applications, so we have
> black screen and starting apps. and at end starts plasmashell.
> Second thing is that session in konsole is not restored, but in IceWm its
> working well.

Applications also start in front of a black screen for me as well in 5.27 on X (and have in 5.24 as well).
Comment 93 David Edmundson 2024-03-15 22:55:48 UTC
>How about using this piece of software?

That's not what's missing, that's a replacement for what we call "startkde"
Comment 94 Patrick O'Callaghan 2024-04-25 11:13:05 UTC
(In reply to Nate Graham from comment #62)
> The plan right now is as follows:
> - For Plasma 6.0, implement a sort of fake session restore that on login,
> simply re-opens apps that were open on last logout, and count on apps that
> have state worth saving doing the saving themselves (and many apps already
> do; for example Firefox, Discord, Dolphin, Kate, Kile, Elisa...).
> - For a later Plasma 6 version, implement real session restore that's
> governed by a new Wayland protocol (one is in progress) and make KDE apps
> opt into it.
> - After that, keep the fake session restore and use it for apps that don't
> opt into the real session restore.
> 
> This should ultimately produce a better UX than on X11, where many apps
> never opted into session restore and so it was semi-random as to which apps
> got launched on login.

I've just installed Fedora 40 with Plasma 6 on Wayland. I'm sorry to say the "fake session restore" simply doesn't work. The only app that re-opens on login is (ironically) Firefox, which isn't even a Plasma app. Both Konsole and Dolphin fail to appear and have to be started manually every time.

Needless to say, this is a considerable inconvenience.
Comment 95 postix 2024-04-25 11:15:54 UTC
As you just quoted "The plan right now is as follows:" this was the plan back in 2023. If you look at the "Version Fixed in" on the top right, it says 6.1. You have to wait til June or so. :)
Comment 96 Patrick O'Callaghan 2024-04-25 11:55:28 UTC
(In reply to postix from comment #95)
> As you just quoted "The plan right now is as follows:" this was the plan
> back in 2023. If you look at the "Version Fixed in" on the top right, it
> says 6.1. You have to wait til June or so. :)

In a post from January, Neil said he hoped to have this working for F40:

https://lists.fedoraproject.org/archives/list/kde@lists.fedoraproject.org/thread/PMAYGU3UJ6RXEOBGQJD6ZPKBLXEYLNJ2/

(you'll have to scroll down. The current list archive system doesn't seem to offer links to a specific message).
Comment 97 Bernd Steinhauser 2024-04-25 12:16:27 UTC
(In reply to Patrick O'Callaghan from comment #96)
> 
> (you'll have to scroll down. The current list archive system doesn't seem to
> offer links to a specific message).

Click on the link symbol in the upper right corner of the message.

https://lists.fedoraproject.org/archives/list/kde@lists.fedoraproject.org/message/HP26SLPOXK264324MAJMVC24MDEMOXQ7/
Comment 98 Patrick O'Callaghan 2024-04-25 12:36:01 UTC
(In reply to Bernd Steinhauser from comment #97)
> (In reply to Patrick O'Callaghan from comment #96)
> > 
> > (you'll have to scroll down. The current list archive system doesn't seem to
> > offer links to a specific message).
> 
> Click on the link symbol in the upper right corner of the message.
> 
> https://lists.fedoraproject.org/archives/list/kde@lists.fedoraproject.org/
> message/HP26SLPOXK264324MAJMVC24MDEMOXQ7/

Thanks. The reference is:

https://lists.fedoraproject.org/archives/list/kde@lists.fedoraproject.org/message/XSBZENY3VQCY57W3GXGCL7RMFZDANLTO/
Comment 99 devsk 2024-06-06 05:55:03 UTC
This is marked RESOLVED as FIXED for a while now.

Do people have experience with the new session restore in Plasma 6? How good is it working with X11 and wayland?
Comment 100 Eugene Shalygin 2024-06-06 06:32:49 UTC
No signs of session restore as of 6.0.90
Comment 101 David Edmundson 2024-06-06 06:35:03 UTC
The hack is definitely there. 
It follows the systemsettings -> desktop session -> session restore settings
Comment 102 Eugene Shalygin 2024-06-06 06:54:44 UTC
It is set to "On last logout" here, but nothing gets launched on the next log in.
Comment 103 Cruz Enrique 2024-06-06 07:14:06 UTC
Same here using Gentoo.
Comment 104 Eugene Shalygin 2024-06-06 09:04:01 UTC
Oh, I'm on Gentoo as well. Maybe it is our packaging that disables this feature? 

David, could you, please, point out the implementation location so I can try to figure out why it does not work?
Comment 105 Cruz Enrique 2024-06-06 09:26:33 UTC
Could be related, could be not but I am "loosing" configurations set in system settings since a couple of versions. Not sure when this starts to happen but sure after the release of the first "stable" version. For example, I am lousing manual file association that I have configured, the landing page of system settings is no longer showing me the last used configurations pages and the restored session is not working. These are the ones I have noticed. But the theme is correctly saved and restored, for example. Could be that these configs are stored in places that gentoo eats or has set the wrong permissions? Any log file I could check for this kind of errors? 

The key point is that I have recently switched to wayland. The FIRST log in, these things were working (so I have correct file associations, a correct restored session and the used last used config pages) but as soon as I reboot / log off (not sure what was the action), I lost all of them. In any case, the problem with file association and landing page of system settings is also happening on xorg (but not the restored session, that is working fine on xorg). 

Should I file a different bug report or do you think it could be the same problem? Should I fill this in gentoo bugtracker or here?
Comment 106 Patrick O'Callaghan 2024-06-06 10:34:16 UTC
(In reply to Cruz Enrique from comment #105)
> Could be related, could be not but I am "loosing" configurations set in
> system settings since a couple of versions. Not sure when this starts to
> happen but sure after the release of the first "stable" version. For
> example, I am lousing manual file association that I have configured, the
> landing page of system settings is no longer showing me the last used
> configurations pages and the restored session is not working. These are the
> ones I have noticed. But the theme is correctly saved and restored, for
> example. Could be that these configs are stored in places that gentoo eats
> or has set the wrong permissions? Any log file I could check for this kind
> of errors? 
> 
> The key point is that I have recently switched to wayland. The FIRST log in,
> these things were working (so I have correct file associations, a correct
> restored session and the used last used config pages) but as soon as I
> reboot / log off (not sure what was the action), I lost all of them. In any
> case, the problem with file association and landing page of system settings
> is also happening on xorg (but not the restored session, that is working
> fine on xorg). 
> 
> Should I file a different bug report or do you think it could be the same
> problem? Should I fill this in gentoo bugtracker or here?

Please file a separate bug report. I don't think this is related.

(By the way, the word you're looking for is "losing", not "loosing". Two different things. No offence but this is a common mistake).
Comment 107 Patrick O'Callaghan 2024-06-06 10:38:28 UTC
(In reply to Cruz Enrique from comment #105)
> Could be related, could be not but I am "loosing" configurations set in
> system settings since a couple of versions. Not sure when this starts to
> happen but sure after the release of the first "stable" version. For
> example, I am lousing manual file association that I have configured, the
> landing page of system settings is no longer showing me the last used
> configurations pages and the restored session is not working. These are the
> ones I have noticed. But the theme is correctly saved and restored, for
> example. Could be that these configs are stored in places that gentoo eats
> or has set the wrong permissions? Any log file I could check for this kind
> of errors? 
> 
> The key point is that I have recently switched to wayland. The FIRST log in,
> these things were working (so I have correct file associations, a correct
> restored session and the used last used config pages) but as soon as I
> reboot / log off (not sure what was the action), I lost all of them. In any
> case, the problem with file association and landing page of system settings
> is also happening on xorg (but not the restored session, that is working
> fine on xorg). 
> 
> Should I file a different bug report or do you think it could be the same
> problem? Should I fill this in gentoo bugtracker or here?

Please file a separate bug report. I don't think this is related.

(By the way, the word you're looking for is "losing", not "loosing". Two different things. No offence but this is a common mistake).(In reply to devsk from comment #99)
> This is marked RESOLVED as FIXED for a while now.
> 
> Do people have experience with the new session restore in Plasma 6? How good
> is it working with X11 and wayland?

Not as yet on Fedora 40, Plasma 6.0.5. I think 6.1 is expected soon and hopefully Fake Session Restore will be part of it.
Comment 108 Armin 2024-06-06 10:40:13 UTC
The fake session restore is part of plasma 6.1 and not available in 6.0 as far as I can tell. However, as stated in the link in Comment 98, Fedora has backported the session restore to their plasma packages (version 6.0) for Fedora 40.

Hope this clears up that confusion.
Comment 109 Armin 2024-06-06 10:43:50 UTC
Here the link to the commit for the Fedora 40 package: https://src.fedoraproject.org/rpms/plasma-workspace/c/d03958da910f3ba08c531e7569ff40c19ca2f045?branch=f40
Comment 110 Patrick O'Callaghan 2024-06-06 10:46:00 UTC
(In reply to Armin from comment #109)
> Here the link to the commit for the Fedora 40 package:
> https://src.fedoraproject.org/rpms/plasma-workspace/c/
> d03958da910f3ba08c531e7569ff40c19ca2f045?branch=f40

Note that this is not yet available in the Fedora repos, so probably better to wait.
Comment 111 Armin 2024-06-06 10:54:54 UTC
Regarding the actual session restore functionality, I have just switched to Fedora 40 and tested this a bit. So far, the fake session restore was not useful at all since it only launches the applications, but those apparently are not capable of remembering their previous state.

For instance, I rebooted my machine with 1 Kate, 2 Okular and 2 Konsole instances open, and while Kate, 2 Okular and 2 Konsole windows opened after the restart, none of those opened the previously open document or changed to the directory they previously were at. Back in X11, the session restore would not only reopen the applications, but also restore the actual documents (e.g. reopen the PDF file in Okular, change to the directory in Konsole, or restore a session in Kate).

As such, the current session restore doesn't add any value, since I need to manually open the documents/session anyway myself.
Comment 112 Armin 2024-06-06 11:04:32 UTC
(In reply to Patrick O'Callaghan from comment #110)
> (In reply to Armin from comment #109)
> > Here the link to the commit for the Fedora 40 package:
> > https://src.fedoraproject.org/rpms/plasma-workspace/c/
> > d03958da910f3ba08c531e7569ff40c19ca2f045?branch=f40
> 
> Note that this is not yet available in the Fedora repos, so probably better
> to wait.

Ok, what makes you think it is not? As far as I can tell, the F40 spec file contains the patch: https://src.fedoraproject.org/rpms/plasma-workspace/blob/f40/f/plasma-workspace.spec#_33
Comment 113 ticonzero 2024-06-06 12:24:01 UTC
Created attachment 170201 [details]
attachment-3317129-0.html

here I have Kubuntu 20.04 and plasmashell 5.18.8 works (almost) perfectly:

- it reopens okular, konsoles, kate, thunderbird and multiple firefoxes 
in the same Desktops, same location, on the same files or webpage

- it reopens Tekstudio in the wrong desktop with the same files open

- it reopens gvim and Paraview with no file open


I'm stuck with Kubuntu 20.04 because I just need this feature


On 06/06/24 12:54, Armin wrote:
> https://bugs.kde.org/show_bug.cgi?id=436318
>
> --- Comment #111 from Armin<dkxls23@gmail.com>  ---
> Regarding the actual session restore functionality, I have just switched to
> Fedora 40 and tested this a bit. So far, the fake session restore was not
> useful at all since it only launches the applications, but those apparently are
> not capable of remembering their previous state.
>
> For instance, I rebooted my machine with 1 Kate, 2 Okular and 2 Konsole
> instances open, and while Kate, 2 Okular and 2 Konsole windows opened after the
> restart, none of those opened the previously open document or changed to the
> directory they previously were at. Back in X11, the session restore would not
> only reopen the applications, but also restore the actual documents (e.g.
> reopen the PDF file in Okular, change to the directory in Konsole, or restore a
> session in Kate).
>
> As such, the current session restore doesn't add any value, since I need to
> manually open the documents/session anyway myself.
>
Comment 114 Patrick O'Callaghan 2024-06-06 12:31:32 UTC
(In reply to Armin from comment #112)
> (In reply to Patrick O'Callaghan from comment #110)
> > (In reply to Armin from comment #109)
> > > Here the link to the commit for the Fedora 40 package:
> > > https://src.fedoraproject.org/rpms/plasma-workspace/c/
> > > d03958da910f3ba08c531e7569ff40c19ca2f045?branch=f40
> > 
> > Note that this is not yet available in the Fedora repos, so probably better
> > to wait.
> 
> Ok, what makes you think it is not? As far as I can tell, the F40 spec file
> contains the patch:
> https://src.fedoraproject.org/rpms/plasma-workspace/blob/f40/f/plasma-
> workspace.spec#_33

Because of:

https://lists.fedoraproject.org/archives/list/kde@lists.fedoraproject.org/message/HP26SLPOXK264324MAJMVC24MDEMOXQ7/

which mentions 6.1 "due out in June". I know we're in June now, but 6.1 is not out yet, at least in stable Fedora repos.
Comment 115 imaginator 2024-06-06 13:27:39 UTC
(In reply to Armin from comment #111)
> Regarding the actual session restore functionality, I have just switched to
> Fedora 40 and tested this a bit. So far, the fake session restore was not
> useful at all since it only launches the applications, but those apparently
> are not capable of remembering their previous state.
> 
> For instance, I rebooted my machine with 1 Kate, 2 Okular and 2 Konsole
> instances open, and while Kate, 2 Okular and 2 Konsole windows opened after
> the restart, none of those opened the previously open document or changed to
> the directory they previously were at. Back in X11, the session restore
> would not only reopen the applications, but also restore the actual
> documents (e.g. reopen the PDF file in Okular, change to the directory in
> Konsole, or restore a session in Kate).
> 
> As such, the current session restore doesn't add any value, since I need to
> manually open the documents/session anyway myself.

"If things don't come easy, there is no premium on effort." (Branch Rickey).  So why don't you just dump Plasma-Wayland and use Plasma-X11 until this essential (but nowadays rather trivial) feature is _fully_ implemented?  At least from a productivity point of view a masochistic adherence to Wayland doesn't make sense.
Comment 116 imaginator 2024-06-06 13:36:33 UTC
(In reply to Patrick O'Callaghan from comment #114)
> (In reply to Armin from comment #112)
> > (In reply to Patrick O'Callaghan from comment #110)
> > > (In reply to Armin from comment #109)
> > > > Here the link to the commit for the Fedora 40 package:
> > > > https://src.fedoraproject.org/rpms/plasma-workspace/c/
> > > > d03958da910f3ba08c531e7569ff40c19ca2f045?branch=f40
> > > 
> > > Note that this is not yet available in the Fedora repos, so probably better
> > > to wait.
> > 
> > Ok, what makes you think it is not? As far as I can tell, the F40 spec file
> > contains the patch:
> > https://src.fedoraproject.org/rpms/plasma-workspace/blob/f40/f/plasma-
> > workspace.spec#_33
> 
> Because of:
> 
> https://lists.fedoraproject.org/archives/list/kde@lists.fedoraproject.org/
> message/HP26SLPOXK264324MAJMVC24MDEMOXQ7/
> 
> which mentions 6.1 "due out in June". I know we're in June now, but 6.1 is
> not out yet, at least in stable Fedora repos.

What's mentioned there as "rudimentary support" for 6.1 seems to be what's described in comment 84.  For me that wouldn't be enough.
Comment 117 Niklas Sombert 2024-06-06 14:29:16 UTC
(In reply to ticonzero from comment #113)
> Created attachment 170201 [details]
> attachment-3317129-0.html
> 
> here I have Kubuntu 20.04 and plasmashell 5.18.8 works (almost) perfectly:
> 
> - it reopens okular, konsoles, kate, thunderbird and multiple firefoxes 
> in the same Desktops, same location, on the same files or webpage
> 
> - it reopens Tekstudio in the wrong desktop with the same files open
> 
> - it reopens gvim and Paraview with no file open
> 
> 
> I'm stuck with Kubuntu 20.04 because I just need this feature

You're not stuck there. Session restore (still) works on the X11 session on Plasma 5.24 (Kubuntu 22.04) and Plasma 5.27 (Kubuntu 24.04).
Comment 118 ticonzero 2024-06-06 14:31:02 UTC
thanks, I will give it a try

On 06/06/24 16:29, Niklas Sombert wrote:
> https://bugs.kde.org/show_bug.cgi?id=436318
>
> --- Comment #117 from Niklas Sombert <niklas@ytvwld.de> ---
> (In reply to ticonzero from comment #113)
>> Created attachment 170201 [details]
>> attachment-3317129-0.html
>>
>> here I have Kubuntu 20.04 and plasmashell 5.18.8 works (almost) perfectly:
>>
>> - it reopens okular, konsoles, kate, thunderbird and multiple firefoxes
>> in the same Desktops, same location, on the same files or webpage
>>
>> - it reopens Tekstudio in the wrong desktop with the same files open
>>
>> - it reopens gvim and Paraview with no file open
>>
>>
>> I'm stuck with Kubuntu 20.04 because I just need this feature
> You're not stuck there. Session restore (still) works on the X11 session on
> Plasma 5.24 (Kubuntu 22.04) and Plasma 5.27 (Kubuntu 24.04).
>
Comment 119 devsk 2024-06-09 07:19:32 UTC
So, after reading the comments, it looks like it is still the "same old same old". Sticking with plasma 5 then!
Comment 120 Patrick O'Callaghan 2024-06-20 10:06:09 UTC
Just a heads-up to note that Plasma 6.1 is now available. I have installed it on Fedora 40 (via the normal dnf upgrade system) and look forward to testing it.
Comment 121 undoIT 2024-06-21 04:50:13 UTC
Updated Arch with Plasma 6.1, rebooted, didn't work. Then, switched setting to: "When session was manually saved" and rebooted. Don't remember seeing a button to "Save Session" but it worked same as setting: "On last logout". Switched back to "On last logout" and it is still working. Very pleased! Thanks to everyone who put in the hard work to make this happen for Plasma 6.
Comment 122 devsk 2024-06-21 06:50:06 UTC
> Switched back to "On last logout" and it is still working. Very pleased! Thanks to everyone who put in the hard work to make this happen for Plasma 6.

What you are saying is that switching away and the switching back to this option made the session restore work properly for you with 6.1. 

Can you please confirm what all works? Does it put all your console windows with their tabs in their respective desktops? How about firefox windows? 

What else did you try to restore?
Comment 123 ticonzero 2024-06-21 07:23:16 UTC
restoring okular is also important for me

On 21/06/24 08:50, devsk wrote:
> https://bugs.kde.org/show_bug.cgi?id=436318
>
> --- Comment #122 from devsk <funtoos@yahoo.com> ---
>> Switched back to "On last logout" and it is still working. Very pleased! Thanks to everyone who put in the hard work to make this happen for Plasma 6.
> What you are saying is that switching away and the switching back to this
> option made the session restore work properly for you with 6.1.
>
> Can you please confirm what all works? Does it put all your console windows
> with their tabs in their respective desktops? How about firefox windows?
>
> What else did you try to restore?
>
Comment 124 Patrick O'Callaghan 2024-06-21 09:34:46 UTC
(In reply to Patrick O'Callaghan from comment #120)
> Just a heads-up to note that Plasma 6.1 is now available. I have installed
> it on Fedora 40 (via the normal dnf upgrade system) and look forward to
> testing it.

Here's my experience after brief testing:

* Apps are restored, including non-KDE ones such as Firefox and Evolution, but Yakuake does not restore.

* They all appear on the first desktop and have to be manually repositioned. Window sizes are correct but window positioning within the desktop is arbitrary.

* AFAIK each app is responsible for its own internal state. Konsole does not preserve tabs. Dolphin does not preserve terminal open/closed state independently for each window (though all windows are present) and instead of 3 windows in different directories they are all copies of each other (probably a Dolphin problem).

* Shortcut for normal interactive logout doesn't work consistently, not does the Logout menu selection. The shortcut for immediate logout (Shift-Ctrl-Alt-Del) does work.

Login/logout is very fast compared to 6.0 on Wayland.
Comment 125 imaginator 2024-06-21 11:10:48 UTC
(In reply to Patrick O'Callaghan from comment #124)
> (In reply to Patrick O'Callaghan from comment #120)
> > Just a heads-up to note that Plasma 6.1 is now available. I have installed
> > it on Fedora 40 (via the normal dnf upgrade system) and look forward to
> > testing it.
> 
> Here's my experience after brief testing:
> 
> * Apps are restored, including non-KDE ones such as Firefox and Evolution,
> but Yakuake does not restore.
> 
> * They all appear on the first desktop and have to be manually repositioned.
> Window sizes are correct but window positioning within the desktop is
> arbitrary.
> 
> * AFAIK each app is responsible for its own internal state. Konsole does not
> preserve tabs. Dolphin does not preserve terminal open/closed state
> independently for each window (though all windows are present) and instead
> of 3 windows in different directories they are all copies of each other
> (probably a Dolphin problem).

That's in line with comment 84.  So still no proper session-restore for Plasma-Wayland.  Clearly, this bug is not yet fixed and therefore should not be labelled as such.  

And to make Wayland the default for Plasma 6 with such a deficiency was a rather questionable decision which borders on self-sabotage, IMO.
Comment 126 Patrick O'Callaghan 2024-06-21 11:28:08 UTC
(In reply to imaginator from comment #125)
> (In reply to Patrick O'Callaghan from comment #124)
> > (In reply to Patrick O'Callaghan from comment #120)
> > > Just a heads-up to note that Plasma 6.1 is now available. I have installed
> > > it on Fedora 40 (via the normal dnf upgrade system) and look forward to
> > > testing it.
> > 
> > Here's my experience after brief testing:
> > 
> > * Apps are restored, including non-KDE ones such as Firefox and Evolution,
> > but Yakuake does not restore.
> > 
> > * They all appear on the first desktop and have to be manually repositioned.
> > Window sizes are correct but window positioning within the desktop is
> > arbitrary.
> > 
> > * AFAIK each app is responsible for its own internal state. Konsole does not
> > preserve tabs. Dolphin does not preserve terminal open/closed state
> > independently for each window (though all windows are present) and instead
> > of 3 windows in different directories they are all copies of each other
> > (probably a Dolphin problem).
> 
> That's in line with comment 84.  So still no proper session-restore for
> Plasma-Wayland.  Clearly, this bug is not yet fixed and therefore should not
> be labelled as such.  
> 
> And to make Wayland the default for Plasma 6 with such a deficiency was a
> rather questionable decision which borders on self-sabotage, IMO.

Plasma under X11 didn't do those things correctly for me either, except possibly the tabs in Konsole. I'm not sure because I always used Autostart, which I'm intentionally not doing now, so behaviour maybe be different.
Comment 127 imaginator 2024-06-21 11:57:43 UTC
(In reply to Patrick O'Callaghan from comment #126)
> (In reply to imaginator from comment #125)
> > (In reply to Patrick O'Callaghan from comment #124)
> > > (In reply to Patrick O'Callaghan from comment #120)
> > > > Just a heads-up to note that Plasma 6.1 is now available. I have installed
> > > > it on Fedora 40 (via the normal dnf upgrade system) and look forward to
> > > > testing it.
> > > 
> > > Here's my experience after brief testing:
> > > 
> > > * Apps are restored, including non-KDE ones such as Firefox and Evolution,
> > > but Yakuake does not restore.
> > > 
> > > * They all appear on the first desktop and have to be manually repositioned.
> > > Window sizes are correct but window positioning within the desktop is
> > > arbitrary.
> > > 
> > > * AFAIK each app is responsible for its own internal state. Konsole does not
> > > preserve tabs. Dolphin does not preserve terminal open/closed state
> > > independently for each window (though all windows are present) and instead
> > > of 3 windows in different directories they are all copies of each other
> > > (probably a Dolphin problem).
> > 
> > That's in line with comment 84.  So still no proper session-restore for
> > Plasma-Wayland.  Clearly, this bug is not yet fixed and therefore should not
> > be labelled as such.  
> > 
> > And to make Wayland the default for Plasma 6 with such a deficiency was a
> > rather questionable decision which borders on self-sabotage, IMO.
> 
> Plasma under X11 didn't do those things correctly for me either, except
> possibly the tabs in Konsole. I'm not sure because I always used Autostart,
> which I'm intentionally not doing now, so behaviour maybe be different.

If session-restore also doesn't work in Plasma-6-X11 (it's always been working flawlessly for me in Plasma-5-X11) the situation would be even worse as there would be no correctly functioning alternative.  For the sake of Plasma and KDE I hope that this is not the case.

To give you an impression: among other things and apart from quite a few tabs in Dolphin and several instances of Konsole, Okular and Gwenview, I currently have over 20 docs open in Kate.  That's not unusual for me.  And would I want to re-open all that stuff _manually_ each time I have updated the kernel, for instance?  In the year 2024!?  I wouldn't even dream of it!
Comment 128 Mustafa Kamran 2024-06-21 16:35:45 UTC
(In reply to undoIT from comment #121)
> Updated Arch with Plasma 6.1, rebooted, didn't work. Then, switched setting
> to: "When session was manually saved" and rebooted. Don't remember seeing a
> button to "Save Session" but it worked same as setting: "On last logout".
> Switched back to "On last logout" and it is still working. Very pleased!
> Thanks to everyone who put in the hard work to make this happen for Plasma 6.

I am on Fedora 40 and I pretty much had to go through the same steps to actually enable this feature. Also the manual option didn't make the "save session" button show up even after reboot.

System Info:
Operating System: Fedora Linux 40
KDE Plasma Version: 6.1.0
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.1
Kernel Version: 6.9.4-200.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-10510U CPU @ 1.80GHz
Memory: 31.0 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics
Manufacturer: LENOVO
Product Name: 20RD002RUS
System Version: ThinkPad E15
Comment 129 Reinier 2024-06-22 23:17:12 UTC
Fedora 40, KDE Plasma 6.1.0. When I login on a Wayland with my own account, I am greeted by a heap of 18 konsole and firefox windows, all stacked up on the first of my eight virtual desktops. I am the designated one to distribute and reposition them again, until next reboot. It's unusable like this. I can't use my own account under wayland, not even just for testing. 

The current state only really 'works' for one use case: you only have one desktop and all your windows are maximised. Granted, that's how most MS Windows users I know use their computer, so maybe it fills many people's needs. But it's not up to par with what a long time plasma/x11 user expects. 

Session management is very much _not_ fixed and because of this, plasma/wayland is still not ready for prime time in my workflow.
Comment 130 devsk 2024-06-24 08:36:39 UTC
Is there more work planned for plasma 6.2 to address the issues with session restore (via another bug)?

or do we need to reopen this bug and address the remaining issues via this bug?
Comment 131 Armin 2024-06-24 09:03:44 UTC
(In reply to imaginator from comment #115)
> So why don't you just dump Plasma-Wayland and use Plasma-X11 until this
> essential (but nowadays rather trivial) feature is _fully_ implemented?

Well, with modern laptops featuring extremely high resolution displays, and a multiscreen setup, X11 simply cannot handle such setups any more.

With Wayland, a bunch of X11-features that have been "sort of working" like X-forwarding, screen sharing (in Teams/Zoom), and session management stopped working, but a whole lot of pain points that I had to work through over the past two decades went away, such as the resolution issue mentioned above. Ever since I adopted Wayland, screen sharing has been fixed and X-forwarding can be replaced by alternatives like VNC, which leaves session management as the last big ticket item.

Regarding the fake session report, Fedora 40 has backported the patches to Plasma 6.0 a few months ago, so there was not really any change with the update to Plasma 6.1. I otherwise came to realise that the fake session restore is working exactly as advertised (cf. https://bugs.kde.org/show_bug.cgi?id=436318#c84 or the commit message at https://invent.kde.org/plasma/plasma-workspace/-/commit/660988b0e30ee8ccac98c0cf164b142d70709675).

So, got to wait until somebody with the necessary knowledge and skills implements true session management in KDE Plasma.
Comment 132 Patrick O'Callaghan 2024-06-24 09:38:01 UTC
(In reply to Armin from comment #131)
> (In reply to imaginator from comment #115)
> > So why don't you just dump Plasma-Wayland and use Plasma-X11 until this
> > essential (but nowadays rather trivial) feature is _fully_ implemented?
> 
> Well, with modern laptops featuring extremely high resolution displays, and
> a multiscreen setup, X11 simply cannot handle such setups any more.
> 
> With Wayland, a bunch of X11-features that have been "sort of working" like
> X-forwarding, screen sharing (in Teams/Zoom), and session management stopped
> working, but a whole lot of pain points that I had to work through over the
> past two decades went away, such as the resolution issue mentioned above.
> Ever since I adopted Wayland, screen sharing has been fixed and X-forwarding
> can be replaced by alternatives like VNC, which leaves session management as
> the last big ticket item.
> 
> Regarding the fake session report, Fedora 40 has backported the patches to
> Plasma 6.0 a few months ago, so there was not really any change with the
> update to Plasma 6.1. I otherwise came to realise that the fake session
> restore is working exactly as advertised (cf.
> https://bugs.kde.org/show_bug.cgi?id=436318#c84 or the commit message at
> https://invent.kde.org/plasma/plasma-workspace/-/commit/
> 660988b0e30ee8ccac98c0cf164b142d70709675).
> 
> So, got to wait until somebody with the necessary knowledge and skills
> implements true session management in KDE Plasma.

I generally agree, though I had hoped that the 6.1 version would be a little better and it really isn´t. What worries me is that apparently proper session restore is a missing feature in Wayland itself (Gnome has a non-standard workaround) so I don't know how long we are going to have to wait. This is not a good situation.

I would be much happier if we could at least have windows restored to their proper desktops and positions, but I don't know enough to guess how hard that is to do. Is there no way for the 'session save' action to interrogate the window manager (or Wayland server) and save this information?
Comment 133 Mustafa Kamran 2024-06-24 10:43:46 UTC
I am also in the camp that windows not remembering which desktops were in is a dealbreaker for me. I sometimes use multiple desktops in my workflow and this feature may be more tedious to deal with than having session restore disabled. I'd rather have the feature disabled and start over from each reboot than have to sort through lots of windows to their right desktops.
Comment 134 Patrick O'Callaghan 2024-06-24 10:57:05 UTC
(In reply to Mustafa Kamran from comment #133)
> I am also in the camp that windows not remembering which desktops were in is
> a dealbreaker for me. I sometimes use multiple desktops in my workflow and
> this feature may be more tedious to deal with than having session restore
> disabled. I'd rather have the feature disabled and start over from each
> reboot than have to sort through lots of windows to their right desktops.

I defined some shortcuts (Ctrl-<N> for "send window to desktop N") but it's still tedious to have to do it for every login.
Comment 135 imaginator 2024-06-24 11:50:26 UTC
(In reply to Patrick O'Callaghan from comment #132)
> (In reply to Armin from comment #131)
> > (In reply to imaginator from comment #115)
> > > So why don't you just dump Plasma-Wayland and use Plasma-X11 until this
> > > essential (but nowadays rather trivial) feature is _fully_ implemented?
> > 
> > Well, with modern laptops featuring extremely high resolution displays, and
> > a multiscreen setup, X11 simply cannot handle such setups any more.
> > 
> > With Wayland, a bunch of X11-features that have been "sort of working" like
> > X-forwarding, screen sharing (in Teams/Zoom), and session management stopped
> > working, but a whole lot of pain points that I had to work through over the
> > past two decades went away, such as the resolution issue mentioned above.
> > Ever since I adopted Wayland, screen sharing has been fixed and X-forwarding
> > can be replaced by alternatives like VNC, which leaves session management as
> > the last big ticket item.
> > 
> > Regarding the fake session report, Fedora 40 has backported the patches to
> > Plasma 6.0 a few months ago, so there was not really any change with the
> > update to Plasma 6.1. I otherwise came to realise that the fake session
> > restore is working exactly as advertised (cf.
> > https://bugs.kde.org/show_bug.cgi?id=436318#c84 or the commit message at
> > https://invent.kde.org/plasma/plasma-workspace/-/commit/
> > 660988b0e30ee8ccac98c0cf164b142d70709675).
> > 
> > So, got to wait until somebody with the necessary knowledge and skills
> > implements true session management in KDE Plasma.
> 
> I generally agree, though I had hoped that the 6.1 version would be a little
> better and it really isn´t. What worries me is that apparently proper
> session restore is a missing feature in Wayland itself (Gnome has a
> non-standard workaround) so I don't know how long we are going to have to
> wait. This is not a good situation.

In this respect perhaps "Failand" might be a more suitable name.  Anyway - in comment 25 I already pointed to the possibility of Wayland being the root-problem.  And I guess that KDE has been aware of it since long (comment 62).  But instead of using their clout as a leading Linux-DE and publicly pointing out and criticizing a glaring Wayland-deficiency they even chose Wayland as default for Plasma 6.  IMO, this was a major strategic error as it not only leaves Plasma-6-users with a bad and obviously hard to fix regression but also lifted the pressure off the Wayland-devs to finally (!) provide a basic feature of modern DEs.  

Now it seems that Plasma-6-users are at the mercy of the Wayland-devs (comment 89).
Comment 136 Armin 2024-06-24 14:55:14 UTC
(In reply to imaginator from comment #135)
> Now it seems that Plasma-6-users are at the mercy of the Wayland-devs
> (comment 89).

Well, not really. There is nothing stopping KDE devs to go ahead and implement the Wayland session management draft protocol. In fact, it would not be a bad thing at all to have an implementation of the protocol in order to identify any issues early on.

The Gnome devs did exactly that, and implemented the draft protocol in Mutter and GTK:
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3825
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/7370

Maybe this helps KDE devs to move things along for Plasma as well...
Comment 137 imaginator 2024-06-24 16:52:49 UTC
(In reply to Armin from comment #136)
> (In reply to imaginator from comment #135)
> > Now it seems that Plasma-6-users are at the mercy of the Wayland-devs
> > (comment 89).
> 
> Well, not really. There is nothing stopping KDE devs to go ahead and
> implement the Wayland session management draft protocol. In fact, it would
> not be a bad thing at all to have an implementation of the protocol in order
> to identify any issues early on.
> 
> The Gnome devs did exactly that, and implemented the draft protocol in
> Mutter and GTK:
> https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3825
> https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/7370
> 
> Maybe this helps KDE devs to move things along for Plasma as well...

Taking the initiative and going ahead may indeed be the right move.  Certainly better than wasting more time by waiting and hoping for a long overdue protocol to get approved (or not) at an unspecified point in time.
Comment 138 Lassi Väätämöinen 2024-06-28 18:18:30 UTC
(In reply to Nate Graham from comment #87)
> Correct. Because real session restore is not implemented on Wayland yet, at
> the moment this manual session restore hooks into the "real fake session
> restore" mechanism that will be used until we get real session restore.

It's a bit bad UX that this is not at least communicated to the user in the settings where this is selected. Quite frankly I cannot see why it was not hooked to the real session save which it at least attempts to do...
Comment 139 byelogurov 2024-07-06 13:52:47 UTC
Why was this bug marked resolved/fixed? It's still an issue under Wayland in plasma 6.1.1. Manually saving a session does not save all windows/apps and the ones that do reopen on the wrong desktops.

Simply putting the onus on wayland to "hopefully" fix it is not a solution.