Bug 474740 - Panel popups sometimes appear at the center of the screen after (un)plugging external display until plasmashell is restarted
Summary: Panel popups sometimes appear at the center of the screen after (un)plugging ...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (show other bugs)
Version: master
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2023-09-20 16:15 UTC by hexchain
Modified: 2023-11-16 22:22 UTC (History)
5 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 hexchain 2023-09-20 16:15:35 UTC
SUMMARY
Laptop connects to a monitor through DP, with the following configuration:

Internal: 2880x1800, 1.75x, primary, disabled when the external screen is present
External: 3840x2160, 1.5x, primary

There is a panel on the bottom edge of the screen and a Kickoff applet on the panel at the leftmost position. Normally, the menu would open at the bottom left corner. However, after plugging or unplugging the cable, the menu will appear at the center of the screen. Restarting plasmashell restores its position.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.27.80
KDE Frameworks Version: 5.240.0
Qt Version: 6.6.0 (beta 4)
Kernel Version: 6.5.3-arch1-1 (64-bit)
Graphics Platform: Wayland
Comment 1 Nate Graham 2023-09-20 18:22:46 UTC
Cannot reproduce with 4k@200% internal screen and 1080p@100% external HDMI screen. When making them use fractional scale factors, I encounter other glitches that make testing impossible, unfortunately.
Comment 2 Nate Graham 2023-09-20 18:23:10 UTC
What this happens, do any other panel pop-ups appear in the wrong place too, or just Kickoff?
Comment 3 hexchain 2023-09-22 05:10:16 UTC
I can reproduce this on another similar configuration:

Internal: 2880x1800, 1.75x, primary, disabled when the external screen is present
External: 1920x1080, 1x, primary

And yes, when this happens it seems all panel popups appear in the center of the screen. I've tested Sticky Note and everything inside Status and Notifications.
Comment 4 Nate Graham 2023-09-25 19:14:06 UTC
I've periodically started to see this with my single-screen 200% scale setup, but I haven't found a reliable way to reproduce it yet.
Comment 5 Nate Graham 2023-10-14 03:42:18 UTC
Is this still reproducible for you with current git master? There have been a lot of changes to how Plasma panel pop-ups work. It's stopped happening for me completely.
Comment 6 hexchain 2023-10-15 10:20:03 UTC
Now I "can't" reproduce, because plasmashell crashes every time when I plug/unplug the external monitor...

Backtrace: https://fars.ee/-O4y
Comment 7 Nate Graham 2023-10-16 14:14:59 UTC
Hmm, this looks related:

#9  0x00007ff8f51a7186 in QWindow::height() const (this=<optimized out>) at /usr/include/qt6/QtGui/qwindow.h:206
#10 PlasmaQuick::PopupPlasmaWindowPrivate::updatePosition() (this=0x555d8cc94360) at /home/hexchain/kde/src/plasma-framework/src/plasmaquick/popupplasmawindow.cpp:89
#11 0x00007ff8f51a781f in PlasmaQuick::PopupPlasmaWindow::event(QEvent*) (this=0x555d8cc19a40, event=0x7ffc7dc63330) at /home/hexchain/kde/src/plasma-framework/src/plasmaquick/popupplasmawindow.cpp:308

Perhaps the same underlying issue that cause the mis-positioning has now, with the new code, resulted in a crash instead.
Comment 8 hexchain 2023-11-12 05:53:20 UTC
I can't reproduce the original panel positioning issue anymore, and plasmashell crashes a lot less when connecting/disconnecting an external monitor.

When it does crash, the stack trace also looks very different: https://fars.ee/OO0f
Comment 9 Nate Graham 2023-11-16 22:22:35 UTC
Ok, sounds like the original issue is fixed, then. If you can still reproduce that crash, please submit it in a new bug report. Thanks!