Bug 451840 - Plasmashell sluggish after waking from sleep on Wayland
Summary: Plasmashell sluggish after waking from sleep on Wayland
Status: RESOLVED DUPLICATE of bug 454379
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-performance (show other bugs)
Version: 5.24.3
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-24 00:15 UTC by Matt
Modified: 2022-09-01 14:24 UTC (History)
5 users (show)

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


Attachments
Demonstration of Kickoff being slow (2.32 MB, video/mp4)
2022-03-24 00:15 UTC, Matt
Details
Journal log during slowdowns (5.12 KB, text/plain)
2022-03-30 01:07 UTC, Simon Vogl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt 2022-03-24 00:15:30 UTC
Created attachment 147693 [details]
Demonstration of Kickoff being slow

SUMMARY
After waking from sleep (not hibernate) on Wayland, pressing the Super key to open Kickoff will cause it to appear but be unresponsive for a few seconds. Any input that is typed into Kickoff won't appear immediately but instead after it becomes responsive again.
Also, switching virtual desktops causes the panel to freeze (which is why this is not marked as a Kickoff bug exclusively) so this is possibly related to https://bugs.kde.org/show_bug.cgi?id=451631
After a certain amount of time woken from sleep Kickoff and the panel return to normal.
I'm not sure if this bug occurs EVERY time after suspend but it has happened enough that it's noticeable. Has happened to me on both openSUSE Tumbleweed on an AMD GPU and Fedora 35 on an Intel GPU.
AFAIK does not happen on X11.

STEPS TO REPRODUCE
1. Start a Plasma Wayland session
2. Suspend the computer
3. Wake the computer
4. Attempt to use Kickoff or switch virtual desktops

OBSERVED RESULT
Kickoff and the panel are slow and unresponsive

EXPECTED RESULT
Kickoff and the panel respond as normal

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 35
KDE Plasma Version: 5.24.3
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.2
Kernel Version: 5.16.16-200.fc35.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × Intel® Core™ i7-8750H CPU @ 2.20GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 630
Comment 1 Simon Vogl 2022-03-25 01:28:04 UTC
Can confirm this on my openSUSE Tumbleweed desktop with NVIDIA, except that it happens immediately there without even needing to hibernate xD (NVIDIA Wayland drivers as we all love them.....). Kinda hard to reproduce, though... Didn't manage to reproduce on my KDE Wayland intel laptop yet even after multiple sleeps.
Comment 2 Nate Graham 2022-03-27 16:43:42 UTC
Cannot reproduce with current git master everything built on top of Fedora 35 with Intel UHD Graphics 620 graphics.
Comment 3 Simon Vogl 2022-03-30 01:07:27 UTC
Created attachment 147832 [details]
Journal log during slowdowns

I managed to capture a journal log of the slowdowns happening.
It also seems somewhat linked to plasmashellrc as getting rid of the [Updates] section inside of plasmashellrc fixes the bug temporarily for me....
Again, it is very hard to reproduce for me, I only managed to sporadically reproduce on NVIDIA so far, still no luck on Intel Iris Xe.
Comment 4 Firlaev-Hans 2022-03-31 20:02:25 UTC
(In reply to Simon Vogl from comment #3)
> Created attachment 147832 [details]
> Journal log during slowdowns
> 
> I managed to capture a journal log of the slowdowns happening.
> It also seems somewhat linked to plasmashellrc as getting rid of the
> [Updates] section inside of plasmashellrc fixes the bug temporarily for
> me....
> Again, it is very hard to reproduce for me, I only managed to sporadically
> reproduce on NVIDIA so far, still no luck on Intel Iris Xe.

That journal log is interesting, because
>plasmashell[17830]: QWaylandDataOffer: timeout reading from pipe
>plasmashell[17830]: QWaylandDataOffer: error reading data for mimeType application/x-kde-cutselection 
is exactly the same as what I saw in my likely related issue (Bug 451631) that Matt linked. It sure seems suspicious and sounds like it's related to the clipboard somehow (???)
If you search for QWaylandDataOffer on Bugzilla you find several other bugs that are in some way related to plasmashell hanging or crashing as well. No idea what this error means specifically but it's worth investigating IMO.
Comment 5 0x10c961 2022-05-31 12:27:38 UTC
I'm encountering similar sluggish behavior with plasma.

Of note, when plasma is being sluggish, I'm noticing that there might be some kind of memory leak-- I see the plasmashell process slowly fill up all available memory (not sure what the trigger is),  Plasmashell goes from its standard 500-700MB to 20GB+, and eventually it causes the whole system to grind to a halt when it runs out (this happens over the course of several hours), and I have to kill the plasmashell process and restart it.
I do recall seeing something like this
> QWaylandDataOffer: timeout reading from pipe
> QWaylandDataOffer: error reading data for mimeType application/x-kde-cutselection 
in the output when I restart plasmashell through a terminal.

When it starts happening again I'll see about grabbing some logs and giving a more detailed reproduction of the issue.
Comment 6 Firlaev-Hans 2022-06-25 09:22:37 UTC
If you still get this issue, can you test if it happens specifically when Plasma was started with a full clipboard history and stops happening when the clipboard is cleared?
Because that turned out to be the cause of my issue (read the latest comments on Bug 451631), and it would be interesting to see if these are indeed two symptoms of the same root cause.
Comment 7 0x10c961 2022-06-25 12:37:21 UTC
(In reply to Firlaev-Hans from comment #6)
> If you still get this issue, can you test if it happens specifically when
> Plasma was started with a full clipboard history and stops happening when
> the clipboard is cleared?
> Because that turned out to be the cause of my issue (read the latest
> comments on Bug 451631), and it would be interesting to see if these are
> indeed two symptoms of the same root cause.

I can confirm the issue seems to only happen when there is something, anything at all, in the clipboard history. I’ve been using the computer for a lot of transcoding lately which means moving lots of video files around and making heavy use of the clipboard to do that, and I’ve been very regularly clearing the clipboard contents and noticed that ever since doing this, the sluggish behavior seems to have disappeared, and the memory leak I mentioned above is occurring at a much slower, or otherwise unnoticeable pace. 

To be honest I’m not sure if the memory leak is related to the issue, but I thought I should mention it in case anyone notices it too. When I have time to do a more in depth (read: scientific, with steps and manipulating different variables separately to try and deliberately cause the issue to happen), I’ll post my findings if someone else doesn’t discover the root cause before then.
Comment 8 0x10c961 2022-09-01 04:43:36 UTC
One of the system updates within the past few weeks seems to have fixed the sluggish behavior tied to the clipboard that I was experiencing before. I can't reproduce the bug anymore.

KDE Plasma Version: 5.25.4
KDE Frameworks Version: 5.97.0
QT Version: 5.15.5
Kernel Version: 5.19.5-1-Manjaro
Graphics Platform: Wayland

Unknown what was causing the issue exactly, but it seems to be fixed now.
Comment 9 Nate Graham 2022-09-01 14:24:43 UTC
Ah I bet it was Bug 454379.

*** This bug has been marked as a duplicate of bug 454379 ***