Bug 450435 - Panels missing after unlocking screen when screens have gone to sleep and woken up until plasmashell is restarted
Summary: Panels missing after unlocking screen when screens have gone to sleep and wok...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Desktop Containment (show other bugs)
Version: 5.27.5
Platform: Ubuntu Linux
: HI normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: multiscreen
: 469954 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-02-17 09:35 UTC by Alex
Modified: 2023-12-12 22:24 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0


Attachments
no bar in the bottom of the screen (12.21 KB, image/png)
2023-04-26 08:10 UTC, Alex
Details
The bar on the other screen (26.61 KB, image/png)
2023-04-26 08:10 UTC, Alex
Details
"Manage Desktops and Panels" window (115.26 KB, image/png)
2023-04-27 06:13 UTC, Alex
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex 2022-02-17 09:35:11 UTC
SUMMARY
***
I have two 4K monitors, on the primary I've the default panel on the bottom, on the second I created a simple panel with just the task manager.
***

When I relogin in my locked desktop after the PC goes to sleep, usually one or even both of panels are missing.

So need to kill plasmashell and reload it to make them reappear.

Another problem I have is that all apps are moved in the same monitor so I suspect it has something to do with the system believing that monitors have been detached while in fact they went to sleep mode
Comment 1 Nate Graham 2022-02-17 23:11:33 UTC
1. Is this on X11 or Wayland?
2. Are you using the PLASMA_USE_QT_SCALING environment variable?
3. Are any of them DisplayPort monitors?
Comment 2 Alex 2022-02-18 07:41:18 UTC
1) X11
2) no, I don't know what PLASMA_USE_QT_SCALING is
3) yes, both monitors use DisplayPort in order to be able to use the VSync capability
Comment 3 Alex 2022-02-18 22:13:48 UTC
I meant FreeSync, not VSync, sorry
Comment 4 Nate Graham 2022-02-21 21:42:34 UTC
Thanks!
Comment 5 Alex 2022-02-22 16:26:24 UTC
The bug is so annoying, making my desktop almost unusable, since everytime I unlock my desktop I need to
* move by hand all apps from one monitor to the other where they was before screenlocking
* kill plasmashell and re-run it
Comment 6 Nate Graham 2022-02-22 16:30:01 UTC
Ah, this should have been fixed with the fix for Bug 438114.

*** This bug has been marked as a duplicate of bug 438114 ***
Comment 7 Alex 2022-02-25 08:30:23 UTC
I just updated to 5.24.2 and unfortunately the bug is still present.

Everytime I unlock the screen I need to kill plasmashell and re-launch it
Comment 8 Nate Graham 2022-02-28 21:40:05 UTC
Oh, this should finally finally be fixed with a big multimonitor panel robustness fix that was backported to Plasma 5.24.3. Can you please try again with that version once it's released in about a week? Thanks!

And if you still hit it there, we'll try again for 5.24.4 lol
Comment 9 Bug Janitor Service 2022-03-15 04:35:21 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 10 Bug Janitor Service 2022-03-30 04:35:30 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now 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

Thank you for helping us make KDE software even better for everyone!
Comment 11 Alex 2022-03-30 08:03:10 UTC
I upgraded to version 5.24.3 and unfortunately the problem is still there.

Each time my PC turns off the monitors after a few minutes of screen saver and I login again everything is on the wrong side of the screen.

Sometimes even the panel: I have two panels on the primary screen (one overlapped to the other) and no panel on secondary screen.

Really, really annoying.
Comment 12 maringrly69 2022-04-24 03:10:34 UTC
This till happens on v5.24.4
Comment 13 MartinG 2022-06-13 12:26:06 UTC
I'm on 5.24.4-1.fc34.x86_64 and see similar behavior: When I connect my docking station (Thunderbolt), the monitors are often messed up showing partial screens and the panels are gone or shown on the wrong screen. When I disconnect the docking (and thereby the external monitors), I sometimes are left with no panel on my single laptop screen.
Comment 14 Nate Graham 2023-04-21 15:05:54 UTC
An enormous amount of multimonitor fixes went into Plasma 5.27; any chance you could check to see if this is still an issue in Plasma 5.27.4 or newer? Thanks!
Comment 15 Alex 2023-04-21 15:23:13 UTC
This problem didn't came back until now, but plasmashell sometimes locks up and I need to kill it and re-launch it.

Another (bigger) problem I now have is that when the screens power off there is no way to make them on again and I need to hard-reset my PC :-|

Anyway, the situation is much improved on the original bug, and I will open a new bug after the release of Ubuntu 23.04
Comment 16 Nate Graham 2023-04-21 15:29:38 UTC
Great!
Comment 17 Alex 2023-04-23 18:27:16 UTC
I upgraded to ubuntu 23.04 with KDE 5.27.4 and framework 22.12.3 and unfortunately the problem is still there: if the PC goes to sleep after I wake it up I have no panels.

So I have to kill plasmashell and launch it again.
Comment 18 Nate Graham 2023-04-24 17:04:47 UTC
Dang. Ok, troubleshooting time.

Can you attach a screenshot of what your desktop looks like when this happens? I want to get a sense of what exactly is missing; it might be more than just the panels.
Comment 19 Alex 2023-04-26 08:09:02 UTC
There is not really something special: what happened just now for example is that the panel on the right screen is missing, and you can see the desktop or the maximized windows (screenshot of the detail attached).

The other monitor is fine (second detail screenshot).

(I'm using wayland right now)
Comment 20 Alex 2023-04-26 08:10:03 UTC
Created attachment 158435 [details]
no bar in the bottom of the screen
Comment 21 Alex 2023-04-26 08:10:27 UTC
Created attachment 158436 [details]
The bar on the other screen
Comment 22 Nate Graham 2023-04-26 16:37:17 UTC
Could you attach full-screen screenshots? It's hard to get context from those screenshots that only show tiny strips of the screen.
Comment 23 Alex 2023-04-26 17:33:12 UTC
What do you want to see exactly? I don't get it.
What I have it's simply a screen without a panel.

In this moment for example (I just unlocked my PC), both panels are missing: if I minimize the windows I just see two completely black screens: no usual background image either.

I can't attach a full screen screenshot for privacy reasons, but I can assure you there is really nothing strange, except the missing panels and no background/desktop.
Comment 24 Nate Graham 2023-04-26 20:41:50 UTC
(In reply to Alex from comment #23)
> What do you want to see exactly? I don't get it.
Because...

> In this moment for example (I just unlocked my PC), both panels are missing:
> if I minimize the windows I just see two completely black screens: no usual
> background image either.
That's what I was hoping the screenshots showed (or didn't show).

I was asking because if the wallpaper is missing too, then the issue isn't actually that your panels went missing; the issue is that the entire desktop containments that the panels live on went missing!

So 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; ths idea was to prevent this from happening anymore. 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. For complex arrangements, we've seen a few reports that sometimes panels or desktops are swapped or missing, as a result of the old settings being in an inconsistent state at the moment of migration. We do have a UI to recover them in the form of the "Manage Desktops and Panels" window, which should let you manually restore your old setup. You can access it like so:

Right-click on desktop > click on "Enter Edit Mode" > a toolbar pops down from the top of the screen > click on "Manage Desktops and Panels"

Can you use this to recover your missing desktops and panels?
Comment 25 Alex 2023-04-27 06:13:06 UTC
wow, so many hidden gems in KDE :o

I opened the "Manage Desktops and Panels" and I fond 6 screens instead of the two I expected: 4 more than the two in use.
I was able to delete 2, but not the other two: I attach the screenshot  where you can see the "Disconnected screen 3" and 4 that I don't know why are there.

Since my KDE desktop upgraded all the way through a very old installation it's possible there was some problem during the migration of the config, as you expect.

Maybe I can fix by hand what's wrong?
Comment 26 Alex 2023-04-27 06:13:48 UTC
Created attachment 158475 [details]
"Manage Desktops and Panels" window
Comment 27 Nate Graham 2023-04-27 15:15:57 UTC
"Disconnected screens" show the desktop and panel that Plasma thinks should be on that screen the next time it's connected.

Yes, you should hopefully be able to use this window to manually recover, by dragging your desktops and panels back to the intended screens. After you do this, then please try to reboot, put the computer to sleep, wake it up again, and see if the problem is still happening.
Comment 28 Alex 2023-04-27 15:29:54 UTC
> ""Disconnected screens" show the desktop and panel that Plasma thinks should be on that screen the next time it's connected."

But I don't have other screens: I tried to delete all the disconnected screen but it doesn't let me: actually it tells me that the desktop has been deleted but in the GUI there is no change of any sort.

> "Yes, you should hopefully be able to use this window to manually recover"

Do you mean that I should be able to access this dialog when plasma crashes? Because if I remember correctly, I can't (I will verify this).

Anyway, maybe the best thing is to delete the settings somewhere in order to be able to start from scratch?
Comment 29 Nate Graham 2023-04-27 15:35:38 UTC
Then Plasma is indeed very confused, because I thinks you do have multiple screens, or at least, that you did in the past. Did you ever?

You should be able to at least delete panels from the hamburger menu that appears over the panel in the little preview image.
Comment 30 Alex 2023-04-27 16:10:42 UTC
I did not have any other screens, and no, plasma doesn't let me delete inactive panels and desktops from the hamburger menu :-(
Comment 31 Nate Graham 2023-04-27 18:26:23 UTC
Ok, then a fresh set of settings might make things better, if you can stand reconfiguring all your Plasma settings from scratch. You'll want to move aside the following files/folders:

~/.local/share/kscreen
~/.config/plasmashellrc
~/.config/plasma-org.kde.plasma.desktop-appletsrc

Move them somewhere else, don't delete them. That way, if anything goes horribly wrong, you can at least get back to your old settings.

After yo do this and set up your desktops and panels the way you like them, put the system to sleep again and see if the originally-reported problem still happens. Hopefully it doesn't!
Comment 32 Bug Janitor Service 2023-05-12 03:46:04 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 33 Alex 2023-05-18 17:15:24 UTC
(In reply to Nate Graham from comment #31)
> Ok, then a fresh set of settings might make things better, if you can stand
> reconfiguring all your Plasma settings from scratch. You'll want to move
> aside the following files/folders:
> 
> ~/.local/share/kscreen
> ~/.config/plasmashellrc
> ~/.config/plasma-org.kde.plasma.desktop-appletsrc
> 
> Move them somewhere else, don't delete them. That way, if anything goes
> horribly wrong, you can at least get back to your old settings.
> 
> After yo do this and set up your desktops and panels the way you like them,
> put the system to sleep again and see if the originally-reported problem
> still happens. Hopefully it doesn't!

Thanks very much for the hint: I didn't know so many files were involved :-)
Btw: is there some kind of central documentation where I can learn each file what is used for?
That would enable me to fix things when something goes wrong without deleting the whole profile.

I deleted all the three files/folder, and unfortunately the problem is still there: I need to restart plasmashell by hand after my pc goes to sleep and shuts down the monitors :-(
Comment 34 Nate Graham 2023-05-19 17:11:53 UTC
Darn, sorry to hear that.
Comment 35 Alex 2023-05-19 17:48:25 UTC
I updated to latest kf5 version 5.106.0-0ubuntu1~ubuntu23.04~ppa1 without any notable changes, same behavior
Comment 36 Nate Graham 2023-05-19 19:45:23 UTC
*** Bug 469954 has been marked as a duplicate of this bug. ***
Comment 37 Nate Graham 2023-12-01 06:13:45 UTC
Is there any chance you can test on Plasma 6 Wayland? I've started using a multimonitor setup regularly on Plasma 6 Wayland and I have never encountered this issue after my screens wake up.

See https://community.kde.org/Plasma/Plasma_6#How_to_use/test_it
Comment 38 Alex 2023-12-01 08:05:11 UTC
Not until it's packaged for ubuntu (or backports), sorry
Comment 39 Nate Graham 2023-12-01 14:36:30 UTC
Well that'll be about a year, unfortunately.
Comment 40 Alex 2023-12-01 15:36:27 UTC
That's too bad!
Is there any (easy!) way to test it in kubuntu before an official release by Canonical?
Comment 41 Nate Graham 2023-12-04 21:16:08 UTC
You could compile it yourself; see https://community.kde.org/Get_Involved/development#The_main_way_to_develop_KDE_software:_kdesrc-build.

Other than that, not really. There are other environments you could try, like a VM, but nothing else in Kubuntu itself.
Comment 42 Alex 2023-12-05 07:28:26 UTC
What about https://neon.kde.org/ ?
Comment 43 Nate Graham 2023-12-12 22:24:37 UTC
Neon Unstable is another option. Either installed on bare metal, or in a VM. Anyway let's call it fixed for now in the absence of any evidence that it still happens in Plasma 6, since a *lot* of multimonitor improvements have gone into Plasma 6.