Bug 483405

Summary: Top bar gets rendered at the wrong window after screen being turned off
Product: [Plasma] kwin Reporter: Nico <dr460nf1r3>
Component: multi-screenAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: contact, iwaters1023, nate
Priority: NOR Keywords: multiscreen
Version: 6.0.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Screenshot
Screenshot Relocate

Description Nico 2024-03-13 07:12:01 UTC
SUMMARY
Since KDE 6, whenever the device starts with multiple screens active, one of the top bars gets rendered at the wrong monitor (rendered below the actual one). 
When right-clicking and trying to move the location, one can notice that the bar seems to be assigned to the correct monitor, since one can't select the location to move the bar to. Instead, moving it to where it is currently being rendered is possible. After that, it is possible to move it to the actual location.

Also, see https://forum.garudalinux.org/t/garuda-default-top-panel-not-showing-on-primary-monitor-after-restart/35407 for context, this seems to be a common bug right now. 

STEPS TO REPRODUCE
1. Use 2 monitors
2. Create a top bar (possibly using this layout preset https://gitlab.com/garuda-linux/themes-and-settings/settings/garuda-dr460nized/-/blob/main/usr/share/plasma/layout-templates/org.garuda.desktop.defaultPanel/contents/layout.js?ref_type=heads) via plasma-interactiveconsole
3. Reboot

OBSERVED RESULT
The second top bar gets rendered on the wrong monitor, below the other one.


EXPECTED RESULT
The top bar gets rendered at the correct monitor.

SOFTWARE/OS VERSIONS
Kernel Version: 6.7.8-2-cachyos (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 4800U with Radeon Graphics
Memory: 15,0 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Manufacturer: LENOVO
Product Name: 82A2
System Version: Yoga Slim 7 14ARE05

ADDITIONAL INFORMATION
Comment 1 Nico 2024-03-13 09:22:38 UTC
Created attachment 167087 [details]
Screenshot
Comment 2 Nico 2024-03-13 09:24:58 UTC
Created attachment 167088 [details]
Screenshot Relocate
Comment 3 h2o 2024-03-14 02:23:21 UTC
This appears to also be happening in 6.0.2-3 (at least for me)
Comment 4 Nate Graham 2024-03-14 16:38:29 UTC
Thanks for the bug report. A few questions:

1. Does it also happen on X11, or only on Wayland
2. Does it also happen if you lock the screen with Meta+L and then unlock, or only on screen sleep/wake?
3. If you create a new clean user account and replicate by hand the same panel setup there, does the bug still happen? Or no?
Comment 5 Nate Graham 2024-03-14 16:45:45 UTC
Oh and one more too:

4. When this happens, can you make the issue go away by restarting plasmashell with `systemctl restart --user plasma-plasmashell.service` (assuming you're using the systemd boot; if not, try `plasmashell --replace`)?
Comment 6 h2o 2024-03-14 17:55:18 UTC
(In reply to Nate Graham from comment #5)
> Oh and one more too:
> 
> 4. When this happens, can you make the issue go away by restarting
> plasmashell with `systemctl restart --user plasma-plasmashell.service`
> (assuming you're using the systemd boot; if not, try `plasmashell
> --replace`)?

1. It only happens on Wayland for me. Logging in with X11 (after fixing the panels) results in no issue.
2. This issue does not happen when locking/unlocking. Only when logging in.
3. I haven't personally tried this. I can try this later though.
4. Restarting plasma via cli does not resolve this.

It's strange because if I go into edit mode, I can open the Manage Display/Panel settings, and it shows the second panel is on the right monitor, but it's not...
Comment 7 Nate Graham 2024-03-14 19:35:17 UTC
Ok, thanks. That's enough for me to see that it's the exact same issue reported in Bug 483102. Marking it as a duplicate, and we'll continue there.

*** This bug has been marked as a duplicate of bug 483102 ***
Comment 8 h2o 2024-03-15 23:56:17 UTC
(In reply to Nate Graham from comment #7)
> Ok, thanks. That's enough for me to see that it's the exact same issue
> reported in Bug 483102. Marking it as a duplicate, and we'll continue there.
> 
> *** This bug has been marked as a duplicate of bug 483102 ***

Thanks Nate! I'll keep an eye on the referenced bug.