Bug 490732

Summary: Resized panel popups lose resized dimensions after DPMS cycle
Product: [Plasma] plasmashell Reporter: zvova7890
Component: PanelAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: adam.m.fontenot+kde, conspibro, el, gigastarcraft2, kdedev, mikel5764, nate, niccolo.venerandi, noahadvs, xaver.hugl, yule2000
Priority: HI    
Version: 6.1.3   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 6.1.5
Sentry Crash Report:
Attachments: Journal during DPMS
Empty App Launcher

Description zvova7890 2024-07-23 22:19:00 UTC
SUMMARY
I'm using a resized App Launcher because I prefer it with my specified size. Unfortunately, Plasma 6 randomly resets manually specified sizes to its defaults almost on every reboot, Plasma restart, etc.

STEPS TO REPRODUCE
1. Resize App launcher
2. Use some time
3. Eventually sizes will be reset to default

OBSERVED RESULT
Randomly loses its specified size

EXPECTED RESULT
App Launcher permanently remember its size


SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.1.3
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2
Kernel Version: 6.6.40-2-lts (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 9 7940HS w/ Radeon 780M Graphics
Memory: 58.6 GiB of RAM
Graphics Processor: AMD Radeon 780M
Manufacturer: Micro Computer (HK) Tech Limited
Product Name: Venus series
Comment 1 Nate Graham 2024-07-24 19:04:21 UTC
Do you have multiple screens?
Comment 2 zvova7890 2024-07-24 23:13:03 UTC
No, only one screen. However, it might be related to the video driver. I previously had many crashes related to the App Launcher during DPMS or suspend/resume. I don't remember any crashes recently, so it might have been fixed. But a new annoying problem has appeared with the launcher size
Comment 3 zvova7890 2024-07-24 23:17:52 UTC
Created attachment 171969 [details]
Journal during DPMS
Comment 4 zvova7890 2024-07-24 23:18:26 UTC
I can constantly reproduce it at every DPMS cycle. Log attached
Comment 5 Nate Graham 2024-07-25 16:33:25 UTC
So is Plasma or anything else crashing during DPMS cycling?
Comment 6 zvova7890 2024-07-25 16:53:37 UTC
I had crashes before, but since some update, I don't remember any crashes in the last month. It's probably fixed. 
If your question is whether the sizes are not remembered because of crashes, then the answer is no
Comment 7 Nate Graham 2024-07-25 19:54:33 UTC
That was going to be my question, darn.

Are you by any chance not using the Plasma systemd integration?
Comment 8 zvova7890 2024-07-25 20:42:30 UTC
I think I'm using systemd integration as well. Also I recall that I had issues with DPMS, where the monitor would go to sleep but wake up again after ~10 seconds(100% repeatable). This happened on both X11 and Wayland sessions. Some time ago, it began to work with Wayland, but today I checked it on X11, and it still has the same broken DPMS behavior. I'm pretty sure the driver is doing something weird(like the output might be shown as disconnected during DPMS, but it shouldn't be, or something in this manner), because I don't have this behavior on another machine with the same monitor. Also, on the second machine, the App Launcher does not lose its sizes.

Maybe some extended logs could help, but I have no idea what exactly I should enable. If you could advise, I can check it out.

$ systemctl --user --all | grep plasma | awk '{print $1}'
app-org.kde.plasma\x2dfallback\x2dsession\x2drestore@autostart.service
●
plasma-gmenudbusmenuproxy.service
plasma-kactivitymanagerd.service
plasma-kcminit-phase1.service
plasma-kcminit.service
plasma-kded6.service
plasma-kglobalaccel.service
plasma-ksmserver.service
plasma-ksplash-ready.service
plasma-kwallet-pam.service
plasma-kwin_wayland.service
plasma-plasmashell.service
plasma-polkit-agent.service
plasma-powerdevil.service
plasma-restoresession.service
plasma-xdg-desktop-portal-kde.service
plasma-xembedsniproxy.service
plasma-core.target
plasma-workspace-wayland.target
plasma-workspace.target
Comment 9 zvova7890 2024-07-26 20:59:28 UTC
I've checked the logs on another machine, and yes, I don't see messages like that:
qt.qpa.wayland: Creating a fake screen in order for Qt not to crash

It means on my minipc the driver generates output disconnects during DPMS, but my desktop does not. They are fully identical systems, both have Radeon GPUs, connected to the same monitor, but the minipc has an integrated GPU that seems to behave differently.

While the GPU driver behavior is a separate issue, the main question is that even when all monitors are disconnected and then reconnected, the panels should not forget their sizes.
Comment 10 zvova7890 2024-07-27 17:25:45 UTC
=========== Begin monitor suspend =============
Jul 27 20:23:11 minipc kwin_wayland[630534]: kwin_wayland_drm: Received change event for monitored drm device "/dev/dri/card1"
Jul 27 20:23:11 minipc kwin_wayland[630534]: kwin_wayland_drm: Removing output KWin::DrmOutput(0x5fb26122f1e0, name="HDMI-A-2", geometry=QRect(0,0 1707x960), scale=1.5)
Jul 27 20:23:12 minipc kwin_wayland[630534]: kwin_wayland_drm: Received change event for monitored drm device "/dev/dri/card1"
Jul 27 20:23:12 minipc kwin_wayland[630534]: kwin_wayland_drm: New output on GPU /dev/dri/card1: Q24G2/ZQVP5HA000917
=========== monitor suspended =============

=========== Wakeup monitor =============
Jul 27 20:23:25 minipc kwin_wayland[630534]: kwin_wayland_drm: Received change event for monitored drm device "/dev/dri/card1"
Jul 27 20:23:25 minipc kwin_wayland[630534]: kwin_wayland_drm: Removing output KWin::DrmOutput(0x5fb26122f1e0, name="HDMI-A-2", geometry=QRect(0,0 1707x960), scale=1.5)
Jul 27 20:23:27 minipc kwin_wayland[630534]: kwin_wayland_drm: Received change event for monitored drm device "/dev/dri/card1"
Jul 27 20:23:27 minipc kwin_wayland[630534]: kwin_wayland_drm: New output on GPU /dev/dri/card1: Q24G2/ZQVP5HA000917
Comment 11 Nate Graham 2024-07-29 21:38:04 UTC
One more question: is only Kickoff's popup getting reset to its default size, or does this affect every panel popup?
Comment 12 zvova7890 2024-07-30 18:19:29 UTC
I checked the clipboard pop-up: After resizing it and performing a DPMS cycle, it also resets to its initial state
Comment 13 Zamundaaa 2024-07-30 19:27:29 UTC
Can confirm, this regularly happens on my setup too
Comment 14 Nate Graham 2024-07-31 16:29:01 UTC
*** Bug 489614 has been marked as a duplicate of this bug. ***
Comment 15 Nate Graham 2024-07-31 16:29:09 UTC
*** Bug 487968 has been marked as a duplicate of this bug. ***
Comment 16 zvova7890 2024-08-02 03:20:26 UTC
Also, I regularly have just empty frame instead of application list. It feels like all this problems has the same root. But I'm not sure, should I report another bug?
Comment 17 zvova7890 2024-08-02 03:20:57 UTC
Created attachment 172199 [details]
Empty App Launcher
Comment 18 zvova7890 2024-08-02 03:24:53 UTC
I can return content if I start typing something in the search input and then clear it to get back to the usual application list and categories. I often use the search functionality in the AppLauncher; maybe this information will be useful.
Comment 19 Nate Graham 2024-08-09 20:05:39 UTC
*** Bug 491455 has been marked as a duplicate of this bug. ***
Comment 20 Bug Janitor Service 2024-09-03 13:25:49 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libplasma/-/merge_requests/1192
Comment 21 Nate Graham 2024-09-03 14:46:56 UTC
*** Bug 490619 has been marked as a duplicate of this bug. ***
Comment 22 Nate Graham 2024-09-03 15:56:48 UTC
*** Bug 489481 has been marked as a duplicate of this bug. ***
Comment 23 Zamundaaa 2024-09-03 21:19:07 UTC
Git commit 1651df42d57a229eb2dde30978b646c3b0419a81 by Xaver Hugl.
Committed on 03/09/2024 at 13:28.
Pushed by zamundaaa into branch 'master'.

plasmaquick/appletpopup: don't resize in response to min/max size with invalid sizes

There's two cases where this can go wrong:
1. the current size is empty, because for example the full representation of an applet was never opened
This made AppletPopup::updateMinSize resize the window to the minimum size

2. the maximum size is empty
This made AppletPopup::updateMaxSize resize the window to be an empty size

In both cases, the applet popup would wrongly resize away from what the user configured

M  +6    -2    src/plasmaquick/appletpopup.cpp

https://invent.kde.org/plasma/libplasma/-/commit/1651df42d57a229eb2dde30978b646c3b0419a81
Comment 24 Zamundaaa 2024-09-03 21:22:57 UTC
Git commit b28856704e736482616963f19a889bcb6d7c4fc7 by Xaver Hugl.
Committed on 03/09/2024 at 21:19.
Pushed by zamundaaa into branch 'Plasma/6.1'.

plasmaquick/appletpopup: don't resize in response to min/max size with invalid sizes

There's two cases where this can go wrong:
1. the current size is empty, because for example the full representation of an applet was never opened
This made AppletPopup::updateMinSize resize the window to the minimum size

2. the maximum size is empty
This made AppletPopup::updateMaxSize resize the window to be an empty size

In both cases, the applet popup would wrongly resize away from what the user configured


(cherry picked from commit 1651df42d57a229eb2dde30978b646c3b0419a81)

Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com>

M  +6    -2    src/plasmaquick/appletpopup.cpp

https://invent.kde.org/plasma/libplasma/-/commit/b28856704e736482616963f19a889bcb6d7c4fc7
Comment 25 zvova7890 2024-09-04 03:22:09 UTC
Works for me! Thanks!