Bug 485313 - Plasma containment (plus panel) misplaced after interrupting and resuming power to screen (by turning it off or back on again, or unplugging and replugging a USB-C charging cable connected to the hosting laptop/dock
Summary: Plasma containment (plus panel) misplaced after interrupting and resuming pow...
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: 6.0.3
Platform: Arch Linux Linux
: NOR major
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: multiscreen
: 483825 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-04-10 09:03 UTC by Daniel Schmitz
Modified: 2024-04-26 12:25 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Schmitz 2024-04-10 09:03:31 UTC
SUMMARY

Panel gone after turning screen off and on again

STEPS TO REPRODUCE
1. turn screen off
2. turn screen on

OBSERVED RESULT

Panel gone.

EXPECTED RESULT

Panel not gone.


SOFTWARE/OS VERSIONS

Operating System: Arch Linux 
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.3
Kernel Version: 6.8.4-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 12 × 12th Gen Intel® Core™ i7-1265U
Memory: 62,5 GiB of RAM
Graphics Processor: Mesa Intel® Graphics
Manufacturer: LENOVO
Product Name: 21C1CTO1WW
System Version: ThinkPad L14 Gen 3


ADDITIONAL INFORMATION

I you have 2:45 minutes to spare, this demonstration video shows the problem:

https://www.youtube.com/watch?v=PZqI5IB7ULM&t=88s
Comment 1 Nate Graham 2024-04-10 16:24:07 UTC
I did have 2:45, thanks. :) The video was helpful.

Is this a setup where you have a docked laptop with the lid closed and are exclusively using the external screen?

When I see the issue happening, it's not just the panel that's gone, your desktop is gone too. This would be the case if:
1. Plasma crashed or quit and didn't restart automatically
2. Plasma is still running, but it misplaced your desktop.

So the next time it happens, please check to see if Plasma is still running with `ps -e | grep -i plasmashell`.

If it's not running, check for crash logs using `coredumpctl --reverse` and attach the latest one; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports#Retrieving_a_backtrace_using_coredumpctl to learn how to do this if it's not a familiar process.

If there are no crash logs then attaching the log of journalctl --reverst for the past minute or so will be sufficient.

If Plasma *is* still running, then it's case #2 and we'll have to do some deeper debugging.
Comment 2 Daniel Schmitz 2024-04-11 13:53:28 UTC
It's just the panel, that vanishes. 
I turned the screen off and on. Panel is gone, plasmashell is still running:
```
ps -e | grep -i plasmashell
   2238 ?        00:01:18 plasmashell
```
Comment 3 Nate Graham 2024-04-11 22:03:31 UTC
Ok, then in that case plasma misplaced the whole containment rather than crashing or something.

Is this a setup where you have a docked laptop with the lid closed and are exclusively using the external screen?
Comment 4 Daniel Schmitz 2024-04-11 22:32:10 UTC
(In reply to Nate Graham from comment #3)
> Ok, then in that case plasma misplaced the whole containment rather than
> crashing or something.
> 
> Is this a setup where you have a docked laptop with the lid closed and are
> exclusively using the external screen?

Yes, that's correct. The laptop screen is closed.
Comment 5 Nate Graham 2024-04-12 17:10:41 UTC
I can reproduce this issue 100%, but in a slightly different way than you did. I suspect the same underlying thing is happening though. Steps to reproduce:

1. Have a setup with a laptop, an external HDMI screen, and a 3rd-party USB-C dock.
2. Plug the dock into the laptop
3. Plug the power cable into the dock's USB-C port, feeding the laptop with power through the dock
4. Plug the HDMI screen into the dock's HDMI port, creating a dual-screen setup
5. Close the laptop lid. The primary containment moves to the external screen as expected
6. Unplug the USB-C charging cable from the dock

At this point the external monitor goes all black for a second or two and then the picture returns. When this has happens, the Plasma containment previously bound to it has disappeared. If I plug the power cord in again, the containment returns. Note that I cannot reproduce the issue when no USB-C dock is involved; if the HDMI cable and power cord are plugged directly into the laptop, unplugging the power cord does not trigger the issue. I also cannot reproduce the issue when I unplug the HDMI cable.

When you experience the bug on your system by turning the screen off and back on again, it's probably causing the same kind of brief interruption to power (but not signal) that triggers the same issue.

Moving to KWin for further triage as I think while there may be a Plasma issue here as well, the fact that it's reproducible by triggering power events makes me suspect KWin might be mishandling things at a deeper level.
Comment 6 Nate Graham 2024-04-12 20:41:29 UTC
*** Bug 483825 has been marked as a duplicate of this bug. ***
Comment 7 Zamundaaa 2024-04-16 23:35:16 UTC
I've just had this happen after monitor standby on my desktop. It doesn't seem as simple as Plasma just misplacing things, as
- opening kickoff with Meta still works, and it's placed in the correct spot
- notifications still pop up, but in the top left corner, instead of the top right where I configured them to be

There's no panel and no desktop window, not even misplaced, and WAYLAND_DEBUG output of plasmashell when triggering this seems fine; it has a weird amount of output changes, especially output description changes for some reason, but the values are all okay.
Given that, it's definitely a bug in plasmashell. My best guess would be that it gets confused about the tons of output changes happening in a short time.