Bug 468863 - Plasma automatically switching from unoccupied desktops to occupied desktops
Summary: Plasma automatically switching from unoccupied desktops to occupied desktops
Status: RESOLVED UNMAINTAINED
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 5.27.4
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-23 14:21 UTC by Alex
Modified: 2025-02-27 23:09 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex 2023-04-23 14:21:15 UTC
SUMMARY
Hi, I'm running into a really specific issue with plasma that's appeared within the last month or so. I'm running Plasma 5.26.5 w/ i3 instead of kwin. This combination was working perfectly for me up until recently.

When I jump to a workspace, if the workspace I'm jumping to is empty, the workspace I'm jumping from is nonempty, and there's at least one non-empty workspace with a greater number than the one I just switched to, plasma automatically jumps me to the lowest-numbered nonempty workspace greater than the one i tried to jump to a split second before jumping to the highest numbered one.

For example, i have workspaces 2, 3, and 7, nonempty right now. if i run i3-msg workspace 1, plasma would jump me to workspace 2 directly after workspace 1 loads and then it would jump to workspace 7 a split second after that. However, jumping to workspace 2, 3, 7, 8, and 9 work fine. As another example, if workspaces 2, 4, and 7 were occupied and i tried to visit workspace 3, it'd go 3 -> 4 -> 7.

This error goes away if i stop the plasmashell service, but comes back when i start it back up again. I think plasmashell or one of its dependencies must be setting  _NET_CURRENT_DESKTOP since that's the only way I could think of that plasma be causing issues with i3.
  
If there's any more information I can provide or any potential files that I might be able to screw around with in order to work around this issue for the time being, let me know. 


STEPS TO REPRODUCE
1. Mask the kwin process in systemd and start i3 instead, closing the kde window that displays the desktop
2. Put windows in workspaces 2, 3, and 7
3. Visit workspace 7
4. Try to visit workspace 1

OBSERVED RESULT
1. Workspace 1 is active for a tenth of a second or so
2. Plasmashell automatically switches the current workspace to workspace 2
3. Another tenth of a second later, plasmashell switches the current workspace to workspace 7

EXPECTED RESULT
- Workspace 1 should stay active

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: NixOS 22.11
KDE Plasma Version: 5.26.5 (tried several other versions, but nixos annoyingly doesn't let me downgrade any further than a few months ago)
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.7

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2023-04-24 18:59:01 UTC
Does the issue appear in Plasma 5.27? Also in that release you may be able to configure the behavior; check out System Settings > Window Management > Window Behavior > Advanced tab > Virtual Desktop behavior
Comment 2 Alex 2023-04-25 11:41:10 UTC
(In reply to Nate Graham from comment #1)
> Does the issue appear in Plasma 5.27? Also in that release you may be able
> to configure the behavior; check out System Settings > Window Management >
> Window Behavior > Advanced tab > Virtual Desktop behavior

Thanks for the quick reply! I tried upgrading to Plasma settings and switching the setting you mentioned, as well as some other settings in the Window Behavior section. Unfortunately, it didn't change anything.
Comment 3 Nate Graham 2023-04-25 15:46:59 UTC
Ok, thanks for the info.
Comment 4 Natalie Clarius 2023-04-25 16:48:15 UTC
Are you using multiple screens? Maybe it is some strange interaction with screen focus, as workspaces are tied to screens on i3, right?
Comment 5 Alex 2023-04-25 21:53:51 UTC
(In reply to Natalie Clarius from comment #4)
> Are you using multiple screens? Maybe it is some strange interaction with
> screen focus, as workspaces are tied to screens on i3, right?

Thanks for the help! I'm just using my laptop screen. I double checked the output of xrandr and it reports that everything other than eDP-1 is disconnected.
Comment 6 Alex 2023-04-30 10:10:57 UTC
If it helps solve the issue, the Kwin process isn't running.
Comment 7 Alex 2023-12-12 04:47:36 UTC
Hi, I switched to Arch Linux and the issue disappeared for a while, but now it's back. I manage my home directory with nix home-manager and my /etc directory and others with aconfmgr, so I was able to roll back the vast majority of my files to before the issue happened as well as delete and regenerate all my ~/.config/*rc files, but none of those things made the issue go away. I noticed before the issue started happening 24/7 that it would only happen if I set a splash screen on kde (which doesn't play nicely with i3). Setting splash screen to "None" repeatedly made the issue go away (although unfortunately that doesn't work anymore for some reason). Interestingly, even after the splash screen disappeared, the issue persisted until I logged out and back in again. Not sure what the deal is there. I figured maybe there was an urgent window or something, but I dumped the whole x window tree and I don't see anything marked as urgent. I also tried running plasmashell through x11trace and I'm seeing some extra stuff happen with _NET_CURRENT_DESKTOP when I try to switch to an empty workspace, although I couldn't get much useful information beyond that. I'm willing to put a lot more effort into debugging this further, but I'm just not sure where to look next. Does anyone have any ideas?
Comment 8 Nate Graham 2025-01-15 18:52:17 UTC
I doubt it; your setup is so heavily customized that there are likely to be 0 developers familiar with all the non-standard moving parts. If it's still happening in Plasma 6.2.5 or later, I don't think we'll be able to fix it and support this use case unless you can do enough debugging to find the exact problem.
Comment 9 Alex 2025-02-27 01:43:17 UTC
(In reply to Nate Graham from comment #8)
> I doubt it; your setup is so heavily customized that there are likely to be
> 0 developers familiar with all the non-standard moving parts. If it's still
> happening in Plasma 6.2.5 or later, I don't think we'll be able to fix it
> and support this use case unless you can do enough debugging to find the
> exact problem.

No problem! I figured out how to get a similar KDE+Tiling WM setup going on Wayland with a different compositor. It wasn't easy, but now that it works, its 100x better and I haven't had a single issue!
Comment 10 Nate Graham 2025-02-27 23:09:00 UTC
I'm happy to hear it!