Bug 492540 - With "Vivid Dark" and other third-party Plasma themes applied, notification pop-ups blink/flicker and Plasma freezes
Summary: With "Vivid Dark" and other third-party Plasma themes applied, notification p...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-performance (other bugs)
Version First Reported In: 6.1.90
Platform: openSUSE Linux
: VHI major
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: regression
: 493041 493236 493662 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-09-02 11:19 UTC by Robby Engelmann
Modified: 2024-10-02 09:45 UTC (History)
13 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.2.0
Sentry Crash Report:


Attachments
screenshot when hanging (440.82 KB, image/jpeg)
2024-09-05 06:13 UTC, Robby Engelmann
Details
kwin info (6.42 KB, text/plain)
2024-09-05 06:13 UTC, Robby Engelmann
Details
journal.txt (399.75 KB, text/plain)
2024-09-13 09:04 UTC, Robby Engelmann
Details
Screencast showing the flickering behavior when notifications popup (2.97 MB, video/mp4)
2024-09-29 03:15 UTC, Geraldo Simião
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robby Engelmann 2024-09-02 11:19:26 UTC
Using the Vivid Color+Plasma+SDDM+Icon theme, I get some strange freezing and or crashing of kwin_wayland since last weekend.
It either freezes the desktop when showing notification pop-ups or crashes kwin_wayland bringing one back to the SDDM-Login Screen. I have now switched to standard breeze theme for plasma and up to now, the system seems to be stable.
I have to idea, how to analyze this issue any further.


Operating System: openSUSE Tumbleweed 20240901
KDE Plasma Version: 6.1.80
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2
Kernel Version: 6.10.7-1-default (64-bit)
Graphics Platform: Wayland
Processors: 20 × 13th Gen Intel® Core™ i7-13700H
Memory: 62.5 GiB of RAM
Graphics Processor: Mesa Intel® Graphics
Manufacturer: TUXEDO
Product Name: TUXEDO InfinityBook Pro Gen8 (MK1)
Comment 1 Justin Zobel 2024-09-02 12:18:46 UTC
If something crashed, we need a backtrace of it so we can figure out what's going on. Can you please attach a backtrace of the crash using the coredumpctl command-line program, as detailed in https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports#Retrieving_a_backtrace_using_coredumpctl?
Thanks!
Comment 2 Robby Engelmann 2024-09-02 18:41:30 UTC
Not sure what triggered the kwin crash; just forget about it.

What remains is the unresponsiveness of the plasma desktop using custom plasma themes (e.g.: https://www.pling.com/p/2110196/) if some notification pop-ups are shown.
This very custom theme worked here for a long time and started to be problematic since 2-4 days.
Could anybody reproduce issues like this in recent plasma master?
Comment 3 Akseli Lahtinen 2024-09-04 13:25:19 UTC
Can't reproduce this freezing issue with notifications using the same plasma style.

Operating System: Fedora Linux 40
KDE Plasma Version: 6.1.80
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2
Kernel Version: 6.10.6-200.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 15.5 GiB of RAM
Graphics Processor: AMD Radeon RX 6600

Do you know what notification causes it? Or is it just any notification, even one done with following command: notify-send test
Comment 4 Akseli Lahtinen 2024-09-04 13:25:32 UTC
.
Comment 5 Robby Engelmann 2024-09-05 06:12:45 UTC
I tried it again and still the desktop hangs directly after starting. Perhaps it is not the notification, not absolutely sure about what triggers this behavior, is more a feeling.
I attached a screenshot showing how the desktop looks like..
-kwin_wayland and plasmashell are consuming a lot of CPU.
-If I kill plasmashell, nothing happens
-If I kill kwin_wayland, the desktop comes back showing notification popups and again hanging
-If I then remove the Vivid plasma theme and kill kwin_wayland again, the desktop comes back with the standard breeze plasma theme without hanging and fully normal usable.

I do not know, how to analyze this in more depth. I also attached the kwin infos. I am using a 150% scaling factor, that also quite often caused trouble in the past.

Hope that helps...
Comment 6 Robby Engelmann 2024-09-05 06:13:15 UTC
Created attachment 173335 [details]
screenshot when hanging
Comment 7 Robby Engelmann 2024-09-05 06:13:35 UTC
Created attachment 173336 [details]
kwin info
Comment 8 Akseli Lahtinen 2024-09-05 13:33:42 UTC
Thanks, this should help a bit to chase down the freeze!

It might be Intel graphics driver issue though. Do you have integrated GPU or dedicated GPU?
Comment 9 Nate Graham 2024-09-05 16:15:22 UTC
The next time it happens and kwin_wayland crashes and boots you back to the login screen, can you do two things?
1. Save the output of `journalctl --boot -0` to  file and attach it (scrubbing any personal information you find in there first)
2. Get a backtrace of the kwin_wayland crash using the instructions that Justin provided. If `coredumpctl` does not show any kwin_wayland crashes, that is also useful information; it would mean that it's exiting or being terminated by the OOM killer. So monitoring the memory pressure on your system would be helpful as well.
Comment 10 Robby Engelmann 2024-09-13 09:04:26 UTC
to be clear: there is no crash (was perhaps one a one-time coincidence) but the plasma desktop hangs. If I try to logout by STRG+ALT+DEL then a dialog appears stating that plasma desktop does not react and whether I want to close it anyways.
Using the standard Breeze Plasma theme works OK, only with different (I usually test with the Vivid theme) it causes a hang mostly when notifications are shown. Sometimes, a restart after having applied the custom theme is necessary. After testing I remove the plasma theme by >rm -r ./.local/share/plasma/desktoptheme/Vivid-Dark-Plasma/
Being back @ Breeze after restart.

I now attached the output of `journalctl --boot -0`.
Comment 11 Robby Engelmann 2024-09-13 09:04:57 UTC
Created attachment 173614 [details]
journal.txt
Comment 12 Nate Graham 2024-09-16 15:59:57 UTC
Thanks. If it only happens with a custom theme, I would be inclined to blame the theme, though it would be good to figure out why this causes  a freeze. A theme — even a buggy one — ideally shouldn't be able to cause that.
Comment 13 Nate Graham 2024-09-16 16:03:33 UTC
I see that you also have some 3rd-party widgets. Are you able to reproduce the issue with none of the 3rd-party widgets present, or in a new clean user account that the Vivid Dark Plasma theme applied as its only customization?
Comment 14 Robby Engelmann 2024-09-16 19:26:06 UTC
still using latest git master snapshot from openSUSE Tumbleweed...
-I created a new user
-I logged into the new user
-I installed the Vivid dark plasma theme
-I restarted the notebook and logged into the new user again
-I triggered a notification via kdialog
--> plasmashell does nothing (still able to come to yakuake via F12)
Comment 15 Nate Graham 2024-09-17 16:47:08 UTC
OK great. And now, if you go back to the default Breeze Plasma theme in that account, does the issue go away?
Comment 16 Robby Engelmann 2024-09-17 18:17:49 UTC
Tested and yes, after removal of the Vivid Dark Plasma theme + logout + login + kdialog --> everything works fine again
Comment 17 Nate Graham 2024-09-17 22:21:34 UTC
Thanks! I can reproduce the issue with the Vivid Dark Plasma theme applied. Notifications seem to vibrate forever and Plasma freezes. While it's frozen, I can still switch themes in System Settings, and switching to a different theme un-freezes Plasma.

Fascinating. Any ideas, Niccolò?
Comment 18 Bug Janitor Service 2024-09-18 17:22:26 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4722
Comment 19 Nate Graham 2024-09-18 20:58:21 UTC
*** Bug 493041 has been marked as a duplicate of this bug. ***
Comment 20 Robby Engelmann 2024-09-20 12:19:14 UTC
The issue is still present.
Did i get it right, that the commit is not yet merged, is it?
Comment 21 Akseli Lahtinen 2024-09-20 12:43:22 UTC
Yeah it's not merged yet. If it gets finished in time, it should be released with plasma 6.2.0. (others correct me if im wrong here)
Comment 22 Justin Zobel 2024-09-20 12:47:45 UTC
Niccolò marked it as a cherry-pick to 6.2.0 so hopefully it will go in.
Comment 23 Robby Engelmann 2024-09-20 13:49:08 UTC
I would also be happy to test in master builds... :-)
Comment 24 Robby Engelmann 2024-09-26 09:04:04 UTC
The issue is still present. Not yet landed in master?
Comment 25 Justin Zobel 2024-09-26 10:43:53 UTC
No, see the comment up further that says "A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4722". This is a link to the code change, it is still open and yet to be merged.
Comment 26 Nate Graham 2024-09-26 16:54:19 UTC
*** Bug 493662 has been marked as a duplicate of this bug. ***
Comment 27 Nate Graham 2024-09-28 02:14:19 UTC
*** Bug 493236 has been marked as a duplicate of this bug. ***
Comment 28 Geraldo Simião 2024-09-29 03:06:01 UTC
I'm experiencing a bug like this too (added a comment at bug#492326 but now its marked as duplicate so I will proceed here).
I changed theme to the default fedora breeze twilight, and tested with breeze clear too, on both the flickering still there.

Operating System: Fedora Linux 41
KDE Plasma Version: 6.1.90
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2
Kernel Version: 6.11.0-63.fc41.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-3632QM CPU @ 2.20GHz
Memory: 15.4 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 4000

Display (24B1W1G5): 1920x1080 @ 60 Hz in 24″ [External]
Display (LGD0230): 1366x768 @ 60 Hz in 16″ [Built-in] *

WM: KWin (Wayland)
WM Theme: Breeze
Theme: Breeze (Light) [Qt], Breeze [GTK3/4]
Icons: breeze [Qt], breeze [GTK3/4]
Font: Noto Sans (10pt) [Qt], Noto Sans (10pt) [GTK3/4]
Cursor: breeze (24px)

I tried a build that Alessandro Astone made to test, reverting these commits here https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4598 and the flickering stops.

I'll add a screencast from what I'm seing here.
Note that if I start the overview effect (I use it with a hotcorner so just drag the mouse to the up right monitor corner to activet it), if I activate the overview the flicker stops and the panel turns responsible again. 
I don't get any crash and no strange log at journalctl -f while the problem is happening.
Comment 29 Geraldo Simião 2024-09-29 03:15:14 UTC
Created attachment 174184 [details]
Screencast showing the flickering behavior when notifications popup

libkworkspace6-6.1.90-2.fc41.x86_64

Operating System: Fedora Linux 41
KDE Plasma Version: 6.1.90
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2
Comment 30 Geraldo Simião 2024-09-29 03:44:21 UTC
(In reply to Geraldo Simião from comment #28)
> I'm experiencing a bug like this too (added a comment at bug#492326 but now
> its marked as duplicate so I will proceed here).


Sorry, the bug marked as duplicate was bug#493236
Comment 31 Bug Janitor Service 2024-09-30 12:32:48 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4770
Comment 32 Geraldo Simião 2024-09-30 15:36:55 UTC
I checked here at my installation creating a brand new user, and bug was not there. Them I checked all things related to themes I have in my install and found that this icon theme here https://store.kde.org/p/1477945 (Fluent icon theme) was affecting this issue (even if it was not in use, just installed). So I removed it completly and now the notifications are fine again.
Comment 33 Robby Engelmann 2024-09-30 21:17:09 UTC
I branched and patched the openSUSE plasma-workspace package using the latest merge request. It seems to fix the bug for me.
Comment 34 Robby Engelmann 2024-10-01 07:40:27 UTC
It seemed to fix it only; today it appeared again during "new email" notification, with high cpu usage for plasmashell and kwin + unresponsive plasma.
Comment 35 Marco Martin 2024-10-01 08:36:28 UTC
(In reply to Robby Engelmann from comment #34)
> It seemed to fix it only; today it appeared again during "new email"
> notification, with high cpu usage for plasmashell and kwin + unresponsive
> plasma.

I think is possibly a different issue with same symptoms.

another possible patch that could make this go away is https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4772
Comment 36 Robby Engelmann 2024-10-01 08:48:00 UTC
> another possible patch that could make this go away is
> https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4772

Will test ASAP
Comment 37 Robby Engelmann 2024-10-01 10:04:05 UTC
(In reply to Robby Engelmann from comment #36)
> > another possible patch that could make this go away is
> > https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4772
> 
> Will test ASAP

Looks good so far; no freezing now for 1-2h working
Comment 38 Nate Graham 2024-10-01 14:04:40 UTC
Git commit 2299a7db4ad205431f13d7d2e80681eacc072e0f by Marco Martin.
Committed on 01/10/2024 at 09:10.
Pushed by mart into branch 'master'.

applets/notifications: Fixes for popup width

* Only consider the size hint of the buttons to eventually enlarge the
  popup
* Make the buttons implicit width surface to the popup via item
  Layout.preferredWidth
* Give the popup Dialog a fixed unresizable width with
  Layout.minimum/maximumWidth to the Dialog main item
Related: bug 493842

M  +6    -0    applets/notifications/package/contents/ui/NotificationItem.qml
M  +6    -2    applets/notifications/package/contents/ui/NotificationPopup.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/2299a7db4ad205431f13d7d2e80681eacc072e0f
Comment 39 Marco Martin 2024-10-02 08:38:40 UTC
Git commit f0475b8a2bf76ac9afb346e7fda2ce911d2a69d5 by Marco Martin.
Committed on 02/10/2024 at 08:38.
Pushed by mart into branch 'master'.

applets/notifications: Different workaround for layout bugs

Don't set a preferred width which may cause an infinite resize loop.
Invoking a particular undocumented slot will force the layout
to be reevaluated and all items resized again, making fillWidth
actually work
Related: bug 487533

M  +7    -3    applets/notifications/package/contents/ui/NotificationItem.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/f0475b8a2bf76ac9afb346e7fda2ce911d2a69d5
Comment 40 Marco Martin 2024-10-02 09:45:43 UTC
Git commit 19eba9a220022bc2303ce4b89b929a2f4ca3c603 by Marco Martin.
Committed on 02/10/2024 at 09:24.
Pushed by mart into branch 'Plasma/6.2'.

applets/notifications: Different workaround for layout bugs

Don't set a preferred width which may cause an infinite resize loop.
Invoking a particular undocumented slot will force the layout
to be reevaluated and all items resized again, making fillWidth
actually work
Related: bug 487533


(cherry picked from commit f0475b8a2bf76ac9afb346e7fda2ce911d2a69d5)

05440835 applets/notification: Different workaround for layout bugs

Co-authored-by: Marco Martin <notmart@gmail.com>

M  +7    -3    applets/notifications/package/contents/ui/NotificationItem.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/19eba9a220022bc2303ce4b89b929a2f4ca3c603