Bug 458916 - Manage Panels and Workspaces resets changes after the window is closed
Summary: Manage Panels and Workspaces resets changes after the window is closed
Status: RESOLVED WORKSFORME
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: 5.26.90
Platform: Debian testing Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-09 09:21 UTC by Alex
Modified: 2025-01-09 22:51 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex 2022-09-09 09:21:20 UTC
SUMMARY
When closing the manage panels and workspaces window, the made changes are reset.


STEPS TO REPRODUCE
1. Login to KDE and notice that some Desktops are swapped
2. Open the manage panels and workspaces window and swap them until they are correct (moving at least one to a currently not connected display)
3. Everything looks fine
4. Close the window
5. The changes are reverted or you get a completely different desktop on the screen you changed to the correct one


SOFTWARE/OS VERSIONS
Operating System: Debian GNU/Linux
KDE Plasma Version: 5.25.4
KDE Frameworks Version: 5.97.0
Qt Version: 5.15.4
Graphics Platform: X11
Comment 1 Alex 2022-09-09 09:22:12 UTC
After doing this 2-3 times, it finally stays as configured. I have no idea when the changes are saved and when not.
Comment 2 Alex 2022-09-09 09:26:31 UTC
The workspaces were also mixed up with another activity (but one only sees the current activity in the manage window). Changing it there, caused the other activity to be changed as well.
Comment 3 Alex 2022-09-09 15:45:10 UTC
It even seems (maybe only sometimes) that after closing the dialog and ending up with the wrong arrangement, you get the correct one in edit-mode and the wrong one again when leaving edit mode.
It looks like something is not correctly synced after changing things.
Comment 4 Nate Graham 2022-09-09 20:34:34 UTC
I can't reproduce this when I give it a try.
Comment 5 Alex 2022-09-09 21:06:13 UTC
I comment when I find more ways to reproduce it.
Maybe I try to manually cleanup my plasmashellrc again. I removed some lines, now my DVI-D-1-1 DIV-D-1-2, ... displays (from a DisplayLink adapter) are called "Unknown", so I guess I didn't remove everything.
On the other hand it is already annoying that my main displays (nvidia card) still get swapped from time to time. It may be that some of the monitor settings are applied (by the nvidia-settings tool?) after logon and that's causing it.
Comment 6 Alex 2022-09-13 16:42:07 UTC
Latest try to reproduce it:
- The workspaces are wrong after logon

- Click edit mode (context menu on the desktop)
- Open manage dialog (on HDMI-1), swap HDMI-0 (deactivated) with HDMI-1
- Wallpaper and plasmoids are swapped correctly
- Close the window
- The workspace is swapped back instantly

- Click edit mode (context menu on the desktop)
- The correct workspace is shown (with wallpaper and plasmoids) instantly
- Click manage panels and workspaces
- The manage window opens, the edit mode stops. The wallpaper and plasmoids are swapped back to the wrong workspace
- The manage window shows the correct arrangement
- Swap them back, close the window.
- Things stay as they are (The incorrect workspace is active)

- Open edit mode
- Nothing special happens
- Open manage panels and workspaces
- The window shows the wrong arrangement, but the workspace switches to the correct one
- Close the window (without changing anything)
- The workspace stays the correct one
Comment 7 Alex 2022-09-14 12:38:52 UTC
Two other ideas I am testing:

1) I've got a few non-existing screens. After I removed them in plasmashellrc they are even no longer named, but just "Unknown 1 (deactivated)" and cannot be removed. I tried to cleanup plasma-org.kde.plasma.desktop-appletsrc but ended with removing stuff from screens I still want to have, so I restored the backup (for now). Maybe the manage window should have an option to discard a workspace.
2) There could be a race condition, that changing workspaces before they (especially the workspaces in background on non-existing screens) are loaded completely causes the changed configuration to be reset.

I also have one disabled (non-existing screen connector) screen with a desktop icon containment and when I move it to an existing screen I do NOT get desktop icons on that screen. I had two screens in the manage window with desktop icons that behaved that way, after some more meddling one of them lost the icons and now only contains a background image.
Comment 8 Alex 2022-09-23 16:28:45 UTC
It also has something to do with the focus.

When I move the manage-window to the left screen and change what's on the right screen, it looks correct, when I move the mouse to the right screen and the window loses focus, it changes back to the wrong configuration.

And right now I had it being wrong when I closed the window and switching to the correct configuration half a minute later. I still believe there may be some kind of race condition, loading times for plasmoids (there is only a timer widget on the correct screen and one desktop icon on the wrong one) or similar things.
Comment 9 Alex 2022-10-11 09:26:22 UTC
I deleted the whole plasmashellrc and plasma-org.kde.plasma.desktop-appletsrc files and setup my applets and panels from scratch.
Now I don't have the orphaned screens in the config anymore, but the problem persists.

Config:
- Two active screens, one sometimes active
- Two activities (may be part of the problem?) which both have the problem on the second screen

New observation:
Clicking the workspace (seems not to work with folder view) after the problem changes it to the correct workspace. When it loses focus it changes back to the wrong one, but seems to revert to the correct one later. I still need to see when it switches back, as I only can reproduce after the next login until I've got it fixed somehow.
Comment 10 Alex 2022-10-11 09:27:03 UTC
> - Two active screens, one sometimes active

A *third* one, which is only sometimes active.
Comment 11 Alex 2022-10-11 09:43:31 UTC
Running plasmashell from a terminal window, I get the log message: requesting unexisting screen 1

Indeed, the problem seems to be fixed, when I activate the third screen. Afterward I get when switching activities several messages:
requesting unexisting screen 1
(...)
requesting unexisting screen 2

and even

requesting unexisting screen -1

But currently neither crashes nor wrong screens.
Comment 12 Alex 2022-10-11 10:00:52 UTC
I still get wrong screens, when I try to setup everything correctly.
And now it seems, that the screen order between different activities is coupled.
Comment 13 Alex 2023-03-04 21:08:28 UTC
I still have problems, but mostly I now rearrange workspaces when all relevant screens are on and then the problem is that when I turn on a third monitor, the second and third monitor are swapped.

This leads to two features that would be useful even when the bug here is not yet resolved:
- Allow to swap workspace and all panels between two screens instead of having to move them one by one. Currently I can drag and drop the workspace and it is switched (as a screen can have only one), but I need to move around all panels separately.
- Allow to remove disconnected screens completely. Currently one could possibly remove them from plasmashellrc but would need to take care not to leave orphaned PlasmaViews sections.
Comment 14 Nate Graham 2023-03-06 16:09:59 UTC
That's a different issue. Can you please try to keep this bug report on topic to the original issue? Are you able to reproduce the original issue in Plasma 5.27, on the upcoming Debian version?

If you have other issues, please submit new bug reports for them. Thanks!
Comment 15 Alex 2023-03-06 16:12:06 UTC
For me, the most important thing would be this issue, but it looks like I still need workarounds. That were suggestions and may be generally useful.

It's still a problem in debian testing.
Comment 16 Nate Graham 2023-03-06 18:17:13 UTC
Hmm, I'm afraid that doesn't make much sense. The steps in the description still reproduce the issue exactly with Plasma 5.27?
Comment 17 Alex 2023-03-06 18:52:26 UTC
I think I test it later completely new. I have reset the corresponding config, played with other monitor setups in the meantime and mostly used the workaround to move around desktops while the third screen is connected.

One thing I noticed: In the KDE monitor settings, the DVI-Device keeps the name of a previous device that was connected to the port. I wonder if KDE tries to identify devices by their name instead of the port. And from my current plasmashellrc:

[ScreenConnectors]
0=DP-3
1=HDMI-1
2=HDMI-0
3=HDMI-A-2
4=HDMI-A-1

My current graphics card has 2x DisplayPort and 2x HDMI and I use Displayport to HDMI cables and a HDMI to DVI cable. The device that I often remove is a graphics tablet with HDMI port.

In the old config there was more chaos as I had to use a DisplayLink adapter that creates a bunch of virtual video devices. When I now open up the dialog, I see six screens:

- DP-3 (primary)
- HDMI-
- disconnected screen 0 (grey box)
- disconnected screen 3 (background and panel)
- disconnected screen 4 (background only)
- disconnected screen 5 (grey box)

HDMI-1 and disconnected 3 sometimes swap places when activating an additional screen, but sometimes it may just be as it is when the display configuration changes. That's why I think it may be an idea to allow to swap everything (I may open a bug for that later, too) so one can just rearrrange the screens correctly.

I also use a Nvidia card and the configuration via nvidia-settings and KDE monitor settings do not always look completely the same. I wonder what tool I should prefer for arranging screens (as in where the mouse goes when I move it over the screen edge).
I guess there are a lot of places where the confustion about screen arrangements can come from.
Comment 18 Nate Graham 2023-03-07 15:26:28 UTC
Given such a complicated setup, with multiple output devices and adapters, I think trying with a clean config would make a lot of sense.

Some background information: in Plasma 5.27 we implemented a new system for mapping Plasma desktops and panels to screens that is fundamentally more correct by design, and as a result much more robust. We also added code to migrate old settings to this new system. Unfortunately, due to the non-determinism baked into the old system, the migration code works better the simpler your arrangement of screens, desktops, and panels was. Complex arrangements like yours sometimes ran into issues. So a clean config would be good to try.
Comment 19 Bug Janitor Service 2023-03-22 03:45:37 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 20 Alex 2023-03-22 09:34:45 UTC
(In reply to Nate Graham from comment #18)
> Given such a complicated setup, with multiple output devices and adapters, I
> think trying with a clean config would make a lot of sense.

I tried it some time ago and had the problem, that I didn't found all related configs. I've removed plasmashellrc and some plasma-related files in .config and .local/share made plasma forget the size of the panels, but not the overall arrangement.

What do I need to reset, to start with a clean plasmashell but keeping the rest of KDE like it is, so I can test in the usual environment that causes the problems for me?
Comment 21 Nate Graham 2023-03-27 18:16:29 UTC
You can temporarily move aside the following files and folders:
~/.local/share/kscreen
~/.config/plasmashellrc
- ~/.config/plasma-org.kde.plasma.desktop-appletsrc
Comment 22 Bug Janitor Service 2023-04-11 03:45:52 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 23 Alex 2023-04-11 08:37:45 UTC
Since when does KDE has this bot? I hate it in other bug trackers as well. Bugs do not resolve themself only because one didn't have the time for further tests, yet.
Comment 24 Nate Graham 2025-01-09 21:21:25 UTC
It's there to nudge people to give information when asked.

I still can't reproduce this with another round of tests in git master. Can I ask you to test again with Plasma 6.2.5 or later? Thanks!
Comment 25 Alex 2025-01-09 22:13:23 UTC
Yes, I can test now, Debian finally got around to Plasma 6, yay!

I think I cannot reproduce anymore.
KDE still shuffles around the desktops and panels when I connect more monitors, but I think I should write a detailed about this when I have time for it.
Comment 26 Nate Graham 2025-01-09 22:51:56 UTC
Thanks a lot for following up!