Bug 451631 - [Wayland] Plasmashell freezes briefly after focusing the desktop if it was started with a non-empty clipboard history
Summary: [Wayland] Plasmashell freezes briefly after focusing the desktop if it was st...
Status: RESOLVED DUPLICATE of bug 454379
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-performance (show other bugs)
Version: 5.24.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: wayland
Depends on:
Blocks:
 
Reported: 2022-03-17 18:20 UTC by Firlaev-Hans
Modified: 2023-04-13 18:34 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Firlaev-Hans 2022-03-17 18:20:25 UTC
SUMMARY
When you switch to a different VD, the panel (and other plasmashell components) will visually freeze for about two seconds or so.
It doesn't happen all the time, but when it does happen, it happens throughout the entire session (or until the session is suspended and resumed).
plasmashell --replace does NOT fix this when it happens
It's not terribly rare, it happens about 50% of the time for me. I've seen this on multiple different systems on Wayland now (not confirmed on X11).

STEPS TO REPRODUCE
1. Be on Wayland with multiple virtual desktops
2. ??? (If it doesn't happen on the first try, restart your session until it does
3. Switch to a different VD (doesn't matter which method)
4. Look at the panel (e. g. the VD pager or a clock showing seconds to see it freeze)

OBSERVED RESULT
The panel won't update for a second or two / will appear visually frozen

EXPECTED RESULT
The panel should just update normally

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.24.3
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3
Kernel Version: 5.16.14-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Comment 1 Firlaev-Hans 2022-03-18 15:12:17 UTC
One important detail I forgot to mention in my original report is that this only happens when switching from a desktop with a focused window to an empty desktop, not when switching between empty desktops or between desktops that both have windows on them.
In fact, it doesn't seem to be related to switching desktops directly at all. The same thing happens when you have a window focused and then click on the desktop to un-focus the window. I updated the title accordingly.

So in general, it happens when switching from having a window focused to having no window focused.

But still, it's inconsistent / doesn't happen in every session, so that's always fun to debug.

Here's some possibly (but maybe not at all) related info from journalctl:
QWaylandDataOffer: timeout reading from pipe
QWaylandDataOffer: error reading data for mimeType application/x-kde-cutselection
Comment 2 Nate Graham 2022-03-26 03:29:03 UTC
Cannot reproduce on Wayland when switching from a desktop with a focused window to an empty window. You said that the panel and other Plasma components freeze, and then you also said, "it happens throughout the entire session". Can you clarify? Does just the panel freeze, or does everything freeze? Are apps also frozen? Or just the Plasma panel and other Plasma components? During this freeze, can you open KRunner with Alt+Space?
Comment 3 Firlaev-Hans 2022-03-26 08:41:16 UTC
(In reply to Nate Graham from comment #2)
> Does just the panel freeze, or does everything
> freeze? Are apps also frozen? Or just the Plasma panel and other Plasma
> components? During this freeze, can you open KRunner with Alt+Space?
Just the Panels and other Plasma components, such as visible notifications. Application windows don't freeze, nor does KRunner.
I can't test if Plasmoids on the desktop are affected too because while I get this bug right now I can't add widgets right now because of Bug 439159.
> "it happens throughout the entire session". Can you clarify?
By that I meant that when I do encounter this bug, I can consistently reproduce it until the session ends or is suspended.
However I just realized that this isn't entirely true, I was able to consistently reproduce just a moment ago but now it's been a few minutes and even though I'm still in the same session and did nothing special it suddenly stopped happening.

So it doesn't surprise me that you couldn't reproduce it on first try, since it only happens some of the time. Frustratingly I don't know how to reproduce this reliably, it just randomly seems to happen some of the time.

But I have encountered this bug many times on multiple different computers, so I'd be surprised if nobody else besides me (and Bug 451840 ?) is ever able to reproduce this.
Comment 4 Nate Graham 2022-03-31 19:16:31 UTC
Thanks for the info.
Comment 5 Firlaev-Hans 2022-06-21 09:08:03 UTC
I have now found a reliable way to reproduce this issue:

1. Completely fill up your Klipper history with anything
2. Either restart plasmashell yourself or reboot / log out and back in
3. Focus a window, then focus the desktop
4. Clear the clipboard history, then repeat step 3

After step 3 you will notice this brief freeze. After step 4, you won't.
This is still reproducible on Plasma 5.25.0 / Frameworks 5.95.0 on Arch.

This journal log is definitely related as it is printed every time the freeze happens:

>plasmashell[5515]: QWaylandDataOffer: timeout reading from pipe
>plasmashell[5515]: QWaylandDataOffer: error reading data for mimeType application/x-kde-cutselection
Comment 6 Firlaev-Hans 2022-06-21 19:58:40 UTC
Minor correction, the clipboard doesn't need to be full, it just needs to be *not* empty when plasmashell (re)starts for this bug to trigger
Comment 7 Yannick 2022-07-07 12:11:03 UTC
Same issue here, on Archlinux and Plasma 5.25.2 on wayland (no issue on X11).
I've got the same messages in the journal log when the freeze happens.

However on my end it only seems to happen when there's a document in the clipboard, it doesn't happen with text selection in the clipboard.
Comment 8 Firlaev-Hans 2022-07-07 12:15:12 UTC
(In reply to Yannick from comment #7)
> Same issue here, on Archlinux and Plasma 5.25.2 on wayland (no issue on X11).
> I've got the same messages in the journal log when the freeze happens.
> 
> However on my end it only seems to happen when there's a document in the
> clipboard, it doesn't happen with text selection in the clipboard.

Yes, you're right. It only happens when your clipboard contains files rather than just text.
Comment 9 sn1128231220jd 2022-07-17 05:33:41 UTC
Same on Tumbleweed (Plasma 5.25.3) when using Wayland. It happens whenever there are some non-text items in the clipboard history.
Comment 10 Firlaev-Hans 2022-08-05 09:38:42 UTC
But 454379 appears to be the same issue and has some more information (basically, it also happens when instead of restarting plasmashell you close dolphin after copying a file).
Also, I have found the criteria for reproducing this bug is not only that you need to have non-text items like files in your clipboard, these items must also be the top most item in the clipboard history. i. e. if you have a file in your clipboard but also copied text after that, the issue doesn't happen / stops happening.
Comment 11 Bacteria 2022-08-05 09:41:44 UTC

*** This bug has been marked as a duplicate of bug 454379 ***
Comment 12 Strahinja Kustudic 2023-04-12 12:02:17 UTC Comment hidden (spam)
Comment 13 Nate Graham 2023-04-13 18:34:09 UTC Comment hidden (spam)