Bug 489086 - When system is under heavy load, panel in Fit Content mode is too small at startup until something causes it to re-evaluate its size (e.g. entering edit mode)
Summary: When system is under heavy load, panel in Fit Content mode is too small at st...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (show other bugs)
Version: 6.2.3
Platform: Arch Linux Linux
: HI normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: regression
: 480421 484077 486059 488956 491781 492269 494386 495210 495972 496541 496562 496583 496862 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-06-24 04:31 UTC by Naxdy
Modified: 2024-12-05 17:43 UTC (History)
28 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.3.0
Sentry Crash Report:


Attachments
panel with missing icons (19.71 KB, image/png)
2024-06-24 04:31 UTC, Naxdy
Details
panel with icons (what it should look like) (149.25 KB, image/png)
2024-06-24 04:32 UTC, Naxdy
Details
panels shrinking (539.83 KB, video/mp4)
2024-11-08 20:46 UTC, Luis Bocanegra
Details
panel settings (130.01 KB, image/png)
2024-11-08 20:47 UTC, Luis Bocanegra
Details
panel settings (61.89 KB, image/png)
2024-11-18 17:04 UTC, leo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Naxdy 2024-06-24 04:31:37 UTC
Created attachment 170892 [details]
panel with missing icons

SUMMARY
After (re-)starting plasmashell, icons are missing from the icons-only task manager until a new task is added or removed. Note that an entry has to actually be removed or added, so e.g. opening/closing a pinned application is not enough, since the amount of icons in the task manager won't change.

STEPS TO REPRODUCE
0. Have a floating panel with an icons-only task manager with its width set to "fit content"
1. Start a clean plasmashell (e.g. using plasmashell --replace)

OBSERVED RESULT
The icons are missing from the icons-only task manager until a new task is added or removed

EXPECTED RESULT
Icons are always visible.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: NixOS
(available in About System)
KDE Plasma Version: 6.1.0
KDE Frameworks Version: 6.3.0 
Qt Version: 6.7.1

ADDITIONAL INFORMATION
This was present since at least 6.0.3 on my system.
Comment 1 Naxdy 2024-06-24 04:32:07 UTC
Created attachment 170893 [details]
panel with icons (what it should look like)
Comment 2 Marco Martin 2024-06-25 11:45:24 UTC
I changed the description as the problem isn't actually the icons missing but is purely a sizing issue, is an old known problem which was supposed to be fixed in 6.1, apparently is not
Comment 3 Naxdy 2024-06-25 11:56:46 UTC
Got it. The weird thing is that this happened for me starting with 6.0, the same panel in 5.x didn't have this issue.

If the problem is known, I'll go ahead and mark this as confirmed. If there's already a bug report out there also feel free to mark this as a duplicate.
Comment 4 Nate Graham 2024-06-25 14:24:06 UTC
Seems similar to Bug 477317, but in this one, the panel is floating and there's no Digital Clock widget on the panel.
Comment 5 Naxdy 2024-06-25 15:47:44 UTC
Ah, forgot to mention, the entries also assume correct size once edit mode is activated. So the fix is, either change entry contents by opening or closing a new app, or activate edit mode.
Comment 6 Nate Graham 2024-06-25 20:15:50 UTC
*** Bug 488956 has been marked as a duplicate of this bug. ***
Comment 7 Ismael Asensio 2024-06-27 20:34:06 UTC
I think this might have got fixed by https://invent.kde.org/plasma/plasma-desktop/-/commit/800b9c47936acc3e29f60754639884a8263be831, which is available on 6.1.1
Comment 8 Nate Graham 2024-06-28 13:21:07 UTC
Can anyone confirm that?
Comment 9 Naxdy 2024-06-29 16:20:40 UTC
I'm running 6.1.1 now, but still have this issue.
Comment 10 Nate Graham 2024-07-19 14:38:53 UTC
Needs some Qt changes to proceed: https://bugreports.qt.io/browse/QTBUG-126746
Comment 11 Nate Graham 2024-07-30 17:39:20 UTC
*** Bug 486059 has been marked as a duplicate of this bug. ***
Comment 12 TraceyC 2024-08-15 17:26:32 UTC
*** Bug 480421 has been marked as a duplicate of this bug. ***
Comment 13 Nate Graham 2024-08-16 15:12:49 UTC
*** Bug 491781 has been marked as a duplicate of this bug. ***
Comment 14 Nate Graham 2024-08-20 21:18:38 UTC
*** Bug 491781 has been marked as a duplicate of this bug. ***
Comment 15 Nate Graham 2024-08-27 19:12:24 UTC
*** Bug 492269 has been marked as a duplicate of this bug. ***
Comment 16 Nate Graham 2024-08-28 19:51:45 UTC
*** Bug 484077 has been marked as a duplicate of this bug. ***
Comment 17 Nate Graham 2024-09-04 13:14:21 UTC
*** Bug 488956 has been marked as a duplicate of this bug. ***
Comment 18 thecaptain 2024-09-21 17:48:15 UTC
Ah, I've been waiting for someone to post about this issue, as I've been fiddling with it for quite a while now. The case where I run into it is with an auto-hide panel which consists of an application launcher, and icons added by clicking "Add to panel (Widget)". The panels I've tried are always "fit to content" sized.

For a panel such as this, when the monitors wake up, and sometimes just randomly, only the first icon in the panel will actually become un-hidden when mousing over, and the location of the hidden first item must be the spot to mouse over for it to appear at all. The shadow of the offscreen icons will show when mousing over the one icon.

I resolve this by right clicking and entering the Panel/Desktop configuration mode, which makes it appear, although the extra icons on the panel will still frequently lag behind the un-hiding of the first item in the panel.

Things I have tried:
- Panel on the bottom
- Panel on the left side
- Panel centered
- Panel weighted toward the left side of the screen (when in bottom mode)
- Panel floating and non-floating
- Removing the panel and recreating it
- Moving the Application launcher icon to somewhere other than the first position (in this case, the first app-launcher widget will be the one icon to un-hide)
- Adding additional small widgets to the panel, that aren't "Add to panel (Widget)"-from-the-application-launcher derived icons

Very frustrating :/ It's been present for at least a few months, and I'm now running KDE 6.1.5
Comment 20 Nate Graham 2024-10-10 20:38:42 UTC
*** Bug 494386 has been marked as a duplicate of this bug. ***
Comment 21 Yannick Bruneau 2024-10-15 22:46:20 UTC
Hi all, I'm facing the same issue since 6.1.x series (I hadn't changed anything before updating from 6.0.5 to 6.1.1).
My top panel has the following settings :
- position=top / alignment=center / width=fit to content
- visibility=always visible / opacity=translucent / style=fixed (not floating)
It is organized in 3 zones :
- top-left : application menu + activities manager + spacer with flexible sizing
- top-middle : window title + global menu + spacer with flexible sizing
- top-right :  system tray + 4 lock/logout widgets + digital clock
That panel fits all the screen width because of the spacers, as expected.

I also have a panel at the bottom of the screen as well, at the center, with a fit to content width, and it only contains the icons task manager.

Well, I figured out that when I log into my session (under Wayland), the panels are sizing themselves with a stuttering animation and no icons are clickable, the plasma desktop is not operational until the panels are set/ready/sized/drawn.

If I change the top panel width setting for fill width then the next time I login the panel is there as expcted, and there is no resizing animation.
I think the issue/bug is in the "fit to content" option : it doesn't remind the size and/or position of each element/widget within the panel. So, at each time we login it recalculates the size of the panel and draws it.
This is wrong, because when we logout, we won't change the panel content/size, so the session should store somewhere / remind the size of the panel and/or its content, and should restore/load it when we login again (just like the other panel options that don't have trouble to be drawn as soon as we login).
Comment 22 Yannick Bruneau 2024-10-15 22:51:59 UTC
(In reply to Yannick Bruneau from comment #21)
> Hi all, I'm facing the same issue since 6.1.x series (I hadn't changed
> anything before updating from 6.0.5 to 6.1.1).
> My top panel has the following settings :
> - position=top / alignment=center / width=fit to content
> - visibility=always visible / opacity=translucent / style=fixed (not
> floating)
> It is organized in 3 zones :
> - top-left : application menu + activities manager + spacer with flexible
> sizing
> - top-middle : window title + global menu + spacer with flexible sizing
> - top-right :  system tray + 4 lock/logout widgets + digital clock
> That panel fits all the screen width because of the spacers, as expected.
> 
> I also have a panel at the bottom of the screen as well, at the center, with
> a fit to content width, and it only contains the icons task manager.
> 
> Well, I figured out that when I log into my session (under Wayland), the
> panels are sizing themselves with a stuttering animation and no icons are
> clickable, the plasma desktop is not operational until the panels are
> set/ready/sized/drawn.
> 
> If I change the top panel width setting for fill width then the next time I
> login the panel is there as expcted, and there is no resizing animation.
> I think the issue/bug is in the "fit to content" option : it doesn't remind
> the size and/or position of each element/widget within the panel. So, at
> each time we login it recalculates the size of the panel and draws it.
> This is wrong, because when we logout, we won't change the panel
> content/size, so the session should store somewhere / remind the size of the
> panel and/or its content, and should restore/load it when we login again
> (just like the other panel options that don't have trouble to be drawn as
> soon as we login).

Either it's the width "fit to content" that causes the issue, and/or the spacers with flexible size. To me, it should have the same behavior than the other options. It should store/remind the size and/or content of the panel, and only recalculate its size whenever we add/remove contents or widgets.
Comment 23 Nate Graham 2024-11-08 15:41:23 UTC
I'm completely unable to reproduce this at all on current git master. It's possible that https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2611 might have helped, in conjunction with other panel changed scheduled to land in Plasma 6.3. Is anyone who was previously able to reproduce the issue capable of testing it out with current git master somehow to verify this? That would be super helpful. Thanks!
Comment 24 TraceyC 2024-11-08 17:56:36 UTC
*** Bug 495972 has been marked as a duplicate of this bug. ***
Comment 25 Luis Bocanegra 2024-11-08 18:25:33 UTC
I'm still able to reproduce, built from master minutes ago. Doing a clean build just in case, but is going to take a bit

Also, in my case I can produce no matter which widget is on the panel, it appears to load properly then after around half a second (maybe when things finish loading) the panel shrinks.


SOFTWARE/OS VERSIONS

Operating System: Arch Linux 
KDE Plasma Version: 6.2.80
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.0
Kernel Version: 6.11.6-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 12 × Intel® Core™ i7-9750H CPU @ 2.60GHz
Memory: 31.2 GiB of RAM
Graphics Processor: Intel® UHD Graphics 630
Comment 26 Nate Graham 2024-11-08 18:36:32 UTC
Darn. Can you explain in precise detail what exactly your panel settings are?
Comment 27 Nate Graham 2024-11-08 18:36:45 UTC
And a screen recording would help too.
Comment 28 linux.admin 2024-11-08 19:50:44 UTC
I also can reproduce, every boot I press prntscr to see any icons. They are not small, they are just like 1px vertical bars
Comment 29 Luis Bocanegra 2024-11-08 20:25:51 UTC
Here's my panel config, just two audio volume widgets, I have a feeling this might be caused by the panel taking longer to load, is that possible?

1. Renamed ~/.config/plasma-org.kde.plasma.desktop-appletsrc
2. I added a lot of widgets to the panels while
3. Also having a cpu stress test running in the background just to force everything to load slower
4. Restarted plasmashell and was able to reproduce with a new appletsrc config with four panels.

{
  "wallpaperPlugin": "org.kde.image",
  "locked": false,
  "type": "org.kde.panel",
  "formFactor": "horizontal",
  "widgetIds": [
    2207,
    2208
  ],
  "screen": 0,
  "version": "",
  "type": "org.kde.panel",
  "formFactor": "horizontal",
  "widgetIds": [
    2207,
    2208
  ],
  "location": "bottom",
  "id": 1675,
  "locked": false,
  "alignment": "center",
  "offset": 0,
  "lengthMode": "fit",
  "length": 124,
  "minimumLength": 1920,
  "maximumLength": 1920,
  "height": 58,
  "hiding": "none",
  "floating": false,
  "opacity": "adaptive"
}
Comment 30 Luis Bocanegra 2024-11-08 20:46:08 UTC
Created attachment 175659 [details]
panels shrinking
Comment 31 Luis Bocanegra 2024-11-08 20:47:40 UTC
Created attachment 175660 [details]
panel settings
Comment 32 Nate Graham 2024-11-12 17:18:21 UTC
Yup, I can still reproduce that with those exact conditions:
1. 58px thick fit-content panel with two Audio Volume widgets on it
2. all cores pegged at 100% from doing a clean build of KWin
3. Restart plasma

Boom, the issue happens. It does indeed seem to be some kind of race condition you can trigger by making Plasma load slowly.
Comment 33 linux.admin 2024-11-12 22:23:50 UTC
Why only heavy load? For me it happens every time plasma starts. always
Comment 34 Nate Graham 2024-11-12 22:27:18 UTC
If you're not running git master, you have the old code before there were *any* fixes.

Anyway, that's the way I can reproduce it, which is probably going to be the key for other developer reproducing it too, and hence fixing it. It indicates that the panel layout code is sensitive to the system's performance, which will make it trigger for different people in different ways based on how they have it configured and what hardware the system is running on.
Comment 35 thecaptain 2024-11-12 23:19:16 UTC
I'm on 6.2.3, and it happens 75% of the time when my two connected TV's have fully turned off for a bit, and I turn them back on. Both when set to mirror each other, or so side-by-side. I doubt it's performance related, as I run an Intel i9-13900k with Nvidia RTX 3090.

I get a wide variety of different visual glitch types before it settles into only showing the application launcher icon, and not showing any of the app launcher widgets added per my instructions above (starting with a new panel that is just an application launcher icon, and then right clicking and creating widgets from within the application launcher menu).

It resolves immediately when going into panel configuration mode for a sec. (Until the next time I need to turn on my two connected screens, which are both LG OLED TVs, a B2 and a C2.) But, yeah, haven't been able to tinker my way out of it in 5 months of trying :/
Comment 36 leo 2024-11-18 17:04:38 UTC
Created attachment 175924 [details]
panel settings

I´m on 6.2.3 and have this issue ~80% of boots with my Icon-Only Task Manager. I fix it with FN + F7 (brightness down). No external devices connected.
Comment 37 Nate Graham 2024-11-20 17:59:32 UTC
*** Bug 495210 has been marked as a duplicate of this bug. ***
Comment 38 Bug Janitor Service 2024-11-21 09:49:45 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6810
Comment 39 Nate Graham 2024-11-21 17:38:30 UTC
*** Bug 496541 has been marked as a duplicate of this bug. ***
Comment 40 Vlad Zahorodnii 2024-11-22 14:49:44 UTC
Git commit 8363bd7ba39e37fcea0f120a31b7f627435c6953 by Vlad Zahorodnii.
Committed on 22/11/2024 at 14:33.
Pushed by vladz into branch 'master'.

Handle multiple configure events before configure aknowledgment

If multiple moveResize is called multiple times before its
configure event is acknowledged, new configure events will now
be sent instead of waiting for acknowledgement of the first.

Co-authored-by: Niccolo Venerandi <niccolo@venerandi.com>

M  +23   -3    src/layershellv1window.cpp
M  +8    -0    src/layershellv1window.h

https://invent.kde.org/plasma/kwin/-/commit/8363bd7ba39e37fcea0f120a31b7f627435c6953
Comment 41 Nate Graham 2024-11-25 20:39:08 UTC
*** Bug 496562 has been marked as a duplicate of this bug. ***
Comment 42 Nate Graham 2024-11-25 20:41:19 UTC
*** Bug 496583 has been marked as a duplicate of this bug. ***
Comment 43 Niccolò Venerandi 2024-12-05 17:43:16 UTC
*** Bug 496862 has been marked as a duplicate of this bug. ***