KDE/Plasma: after boot apps do not open on the right virtual deskopt anymore

I searched this forum, and elsewhere but I have found no relevant information, so I’m reaching out here:

I have 4 virtual desktops; I had/have set up things such that, after log in, at desktop 1 my internet browser opens, at desktop 2 my email client. Keeping 3 and 4 for other stuff.
I have set up Plasma such that after login it restores the apps/session that was/were active at logout/shut down.
That worked without problems up until a couple of week ago.

Now the apps are either not started at login, or if they are, they all appear on desktop 1.

I tried explicitly saving the session which I want to be restored after login.
But that does not work either,

Anyone else notice the same thing?|
Any suggestions as to how to get the session to be properly restored again?

If I need to provide more info, please let me know.

System:
  Host: vivobookEOS001 Kernel: 6.6.39-1-lts arch: x86_64 bits: 64
    compiler: gcc v: 14.1.1 clocksource: tsc avail: hpet,acpi_pm
    parameters: initrd=\21b5e525d98d4033ac2933bbccc6e69c\6.6.39-1-lts\initrd
    nvme_load=YES nowatchdog rw
    root=UUID=28f050a6-a6dc-4606-8a11-bd5d9946eccc
    systemd.machine_id=21b5e525d98d4033ac2933bbccc6e69c
  Desktop: KDE Plasma v: 6.1.2 tk: Qt v: N/A info: frameworks v: 6.3.0
    wm: kwin_wayland vt: 1 dm: SDDM Distro: EndeavourOS base: Arch Linux
Machine:
  Type: Laptop System: ASUSTeK product: Vivobook_ASUSLaptop M1605YA_M1605YA
    v: 1.0 serial: <superuser required>
  Mobo: ASUSTeK model: M1605YA v: 1.0 serial: <superuser required>
    uuid: <superuser required> UEFI: American Megatrends LLC. v: M1605YA.302
    date: 03/02/2023
Battery:
  ID-1: BAT0 charge: 9.2 Wh (21.3%) condition: 43.1/42.1 Wh (102.5%)
    power: 4.8 W volts: 11.1 min: 11.8 model: ASUSTeK ASUS Battery type: Li-ion
    serial: N/A status: discharging cycles: 38
CPU:
  Info: 8-core AMD Ryzen 7 5825U with Radeon Graphics [MT MCP] arch: Zen 3
    speed (MHz): avg: 524 min/max: 400/4546
Graphics:
  Device-1: AMD Barcelo vendor: ASUSTeK driver: amdgpu v: kernel arch: GCN-5
    code: Vega process: GF 14nm built: 2017-20 pcie: gen: 3 speed: 8 GT/s
    lanes: 16 link-max: gen: 4 speed: 16 GT/s ports: active: eDP-1
    empty: HDMI-A-1 bus-ID: 03:00.0 chip-ID: 1002:15e7 class-ID: 0300
    temp: 33.0 C
  Device-2: ShineTech USB2.0 HD UVC WebCam driver: uvcvideo type: USB
    rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-3:3 chip-ID: 3277:0036
    class-ID: fe01 serial: 0x0001
  Display: wayland server: X.org v: 1.21.1.13 with: Xwayland v: 24.1.1
    compositor: kwin_wayland driver: X: loaded: amdgpu unloaded: modesetting
    alternate: fbdev,vesa dri: radeonsi gpu: amdgpu resolution: 1920x1200
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.1.3-arch1.1
    glx-v: 1.4 direct-render: yes renderer: AMD Radeon Graphics (radeonsi
    renoir LLVM 18.1.8 DRM 3.54 6.6.39-1-lts) device-ID: 1002:15e7
    memory: 500 MiB unified: no display-ID: :1.0
Network:
  Device-1: Realtek RTL8821CE 802.11ac PCIe Wireless Network Adapter
    vendor: AzureWave driver: rtw_8821ce v: N/A modules: rtw88_8821ce pcie:
    gen: 1 speed: 2.5 GT/s lanes: 1 port: f000 bus-ID: 01:00.0
    chip-ID: 10ec:c821 class-ID: 0280
Drives:
  Local Storage: total: 953.87 GiB used: 57.67 GiB (6.0%)
Info:
  Memory: total: 16 GiB note: est. available: 15.03 GiB used: 4 GiB (26.6%)
  Processes: 316 Power: uptime: 14m states: freeze,mem,disk suspend: s2idle
    wakeups: 0 hibernate: platform avail: shutdown, reboot, suspend, test_resume
    image: 6 GiB services: org_kde_powerdevil, power-profiles-daemon, upowerd
    Init: systemd v: 256 default: graphical tool: systemctl
  Packages: pm: pacman pkgs: 1325 libs: 296 tools: yay Compilers:
    clang: 18.1.8 gcc: 14.1.1 Shell: Bash v: 5.2.26 running-in: yakuake
    inxi: 3.3.35

Did you switch to Wayland? Wayland has only limited support that I believe. Although, to be honest, I don’t think I have ever had saved applications from a session open on the original desktops/screens even on X.

Either way, you can create window rules for those applications so they open on certain desktops/screens.

@dalto, thanks for helping me!

I am on Wayland, and have been for a long time - so far it just worked the way I described “even” under Wayland :wink: .
I did not knowingly change anything.

I’ll do some more digging on the world wide interwebs thingy to see if people reported similar behavior. I’ll also have a look at bugs.kde.org.

Any pointers, ideas or suggestions are welcome.

My suggestion is to use window rules to solve that problem.

I’ll look into window rules, would be nice if they could resolve the issue.

But so far I could do without window rules, so I’ll also do some more digging.

@dalto, confirmed: Wayland has known issues with restoring windows after loging in[1].
There are several bug reports about it, some very old, but no resolution it seems.

What bugs me is that up until last week or so it did work on my Wayland-setup.

So I tried X11, but under X11 the three-finger en four-finger swipes (touchpad) don’t seem to work, which breaks my workflow.

I’ll have to see if window-rules can resolve my issue.
Thanks for the suggestion.

[1] https://community.kde.org/Plasma/Wayland_Known_Significant_Issues

Session-restored XWayland windows go on the wrong screens and virtual desktops: https://bugs.kde.org/show_bug.cgi?id=468252 + https://bugs.kde.org/show_bug.cgi?id=421870

You might be able to fix this with libinput-gestures (which I used for Plasma with X11), touchegg or a few other tools: https://wiki.archlinux.org/title/Libinput#Gestures, https://wiki.archlinux.org/title/Touchegg.

Thanks, I’ll have a look, but for now I’m back on Wayland, stubbornly trying to find a solution that works :wink:

1 Like

I use window rules to get all my applications to open on the correct desktop and screen so that should work with minimal effort.

2 Likes

Window rules are awesome, made a huge difference to how I use my PC

1 Like

Sorry, for not responding for a few days.

I’ll look into window rules this weekend.

Got things sorted with Windows rules.
Thanks, @dalto and others.

1 Like

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