Plasma Session Restore with Wayland

I was very excited about the release of 6.7 as it was ment to have ‘proper’ implementation of Session restore protocol that X11 has. However I am dissapointed that there is no difference in that respect.

When I logout / login in X11, all the application that supports the protocol starts and appears in their last location on the screen and desktop. With Wayland the session restores all windows to the same desktop (the one I was in when I logout). Some application like okular does not load the file it was showing before logout and dolphin does not show the tabs that I opened when I logout.

Session restore in Wayland is not complete or I don’t know how to make it work!

Is there some special setting I need to toggle to get this working in Wayland? It works perfectly in X11.

1 Like

Just a general reply from me, as I’m not across all the details…Plasma 6.7 did introduce support for the Wayland session restore protocol, but applications also need to support it and this doesn’t yet mean that it will have “feature parity” with the X11 implementation. Likewise, restoring open documents in Okular or tabs in Dolphin depends on those applications implementing session restoration correctly, so still WIP…

2 Likes

I became also curious how the support will grow for such software functionality. :thinking:

Also waiting for session restore.

I tried to change to Wayland using the KDE Sytems Settings, “Login Screem (SDDM)” but doing that I see the settings crashing. The Crash Handler pops up but I see the report do not show why but instead another problem

Using host libthread_db library "/lib64/libthread_db.so.1".
0x00007f76456a4252 in __syscall_cancel_arch () from /lib64/libc.so.6
python sentry-sdk not installed :(
Traceback (most recent call last):
  File "/usr/share/drkonqi/gdb/python/gdb_preamble/preamble.py", line 667, in print_preamble
    print_preamble_internal()
    ~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/share/drkonqi/gdb/python/gdb_preamble/preamble.py", line 641, in print_preamble_internal
    resolve_modules()
    ~~~~~~~~~~~~~~~^^
  File "/usr/share/drkonqi/gdb/python/gdb_preamble/preamble.py", line 621, in resolve_modules
    raise RuntimeError("No corefile found. Cannot resolve modules.")

Seems to me that is because no coredump is generated:

# sudo coredumpctl list
No coredumps found.

core dumps are enabled:

# ulimit -c
unlimited

I know I can change to wayland using something like /etc/sddm.conf.d/10-wayland.conf, SDDM#Wayland, will probably try that but would also like to get the way that System settings working.

Why so complicated? Simply click in the SDDM login screen on the Wayland session. Done.

1 Like

I thought that since kwayland has session restore implemented all the application that has this ability on X11 will translate automatically in Wayland and work as expected. Looks like this has to be implemented again for Wayland.

When will that be…I wonder.

That is what I tried first:

Just realized that I could start it from the command line and I see:

> systemsettings
org.kde.libkbolt: Failed to connect to Bolt manager DBus interface: 
qt.qpa.services: Failed to register with host portal QDBusError("org.freedesktop.portal.Error.Failed", "Could not register app ID: Connection already associated with an application ID")
qt.multimedia.ffmpeg: Using Qt multimedia with FFmpeg version 8.1.1 GPL version 3 or later
libva info: VA-API version 1.23.0
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_23
libva info: va_openDriver() returns 0
libva info: VA-API version 1.23.0
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_23
libva info: va_openDriver() returns 0
spaVisitChoice: parse error "Object: size 136, type Spa:Pod:Object:Param:Format (262147), id Spa:Enum:ParamId:EnumFormat (3)" "  Prop: key Spa:Pod:Object:Param:Format:mediaType (1), flags 00000000" "    Id 1        (Spa:Enum:MediaType:audio)" "  Prop: key Spa:Pod:Object:Param:Format:mediaSubtype (2), flags 00000000" "    Id 1        (Spa:Enum:MediaSubtype:raw)" "  Prop: key Spa:Pod:Object:Param:Format:Audio:format (65537), flags 00000000" "    Id 518      (Spa:Enum:AudioFormat:F32P)" "  Prop: key Spa:Pod:Object:Param:Format:Audio:channels (65540), flags 00000000" "    Int 1" "  Prop: key Spa:Pod:Object:Param:Format:Audio:position (65541), flags 00000000" "    Array: child.size 4, child.type Spa:Id" "      Id 2        (Spa:Enum:AudioChannel:MONO)"
Failed to compile shader: 
Source was:
#version 150

struct buf
{
    mat4 matrix;
    float opacity;
};
...

Could be that that is because I did change a SDDM config file but not that nice to crash instead of reporting an error indicating parsing which file triggered the problem.

Other functionality of the System Settings work as expected.

I would follow the upstream discussions at

I posted the SDDM problem and the fix.

System Settings SDDM Theme Crashes - Plasma 6.7.0

NOTE: Installing the old System Settings KCM fixes this issue.

sudo zypper in --oldpackage https://download-repositories.opensuse.org/history/20260616/tumbleweed/repo/oss/x86_64/sddm-kcm6-6.6.5-1.1.x86_64.rpm

1 Like

I just discovered a KWin script called “Remember Windows Positions” that works very well!

Plasma wayland session can now restore all my opened windows on login! Yay! I guess this is good for now until native full feature session restoration for wayland is implemented at the application level.

Those who are interested can find the package in the repository.

I.e. this Kwin script:

The only thing it doesn’t do is restore the contents of the application windows. I suppose that is for the application to be able to do that on Wayland.

I wonder why KDE application can’t restore content in Wayland session…after all it is suppose to work in synchronous right?

For the same reason that it needs to be implemented within the application concerned.

Yes, only the first step to implement session restore generic has been made.

My interest is Konsole and some searching did reveal that problem is already solved long time ago, not generic solution, but with a Konsole specific script

Yes, this shows it should be not that difficult to implement this in a generic way, let’s see how long that takes.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.