Bug 360262 - Plasmashell and krunner stop responding after copying large text/images to clipboard on X11
Summary: Plasmashell and krunner stop responding after copying large text/images to cl...
Status: RESOLVED DUPLICATE of bug 446581
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-performance (show other bugs)
Version: 5.14.90
Platform: Other Linux
: HI crash
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: efficiency
: 386418 395667 395997 399096 404145 410471 414152 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-03-08 18:53 UTC by Alexander Meshcheryakov
Modified: 2023-02-11 15:16 UTC (History)
19 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 Alexander Meshcheryakov 2016-03-08 18:53:55 UTC
After copying any text to clipboard in Firefox plasmashell and krunner stop responding for a while. Effect on plasmashell:
* Clock stops ticking (seconds/minutes number does not change)
* Clicks on buttons representing windows in task manager do not change active window
* Opening/closing windows does not change contents in task manager
* No response to `kquitapp plasmashell`

Krunner does not appear on pressing Alt+F2 while "frozen"

However, after a while plasmashell and krunner "unfreeze" and process all requests to them which were made while these apps were stuck (e.g. suddenly window which I clicked in task manager becomes active when plasmashell unfreeze that might occur minutes after clicking task manager). Duration of freeze depends on amount of time which have passed since Firefox launch. On freshly started Firefox freeze duration is just 2-3 seconds, but after several hours of firefox running freeze duration on copying text becomes minutes.

Reproducible: Always

Steps to Reproduce:
1. Ensure that you have digital clock in panel with "show seconds" enabled.
2. Create fresh (empty) Firefox profile (you may run`firefox --ProfileManager` for this)
3. Install addon [Copy Plain Text 2](https://addons.mozilla.org/firefox/addon/copy-plain-text-2/), restart Firefox. This is core condition which makes the bug reproducible.
4. Select any text on any webpage in Firefox and copy it _with "Copy" command in right-click menu_ Attemtion! Copying via Ctrl-C *does not* trigger the bug.

Actual Results:  
plasmashell and krunner freeze for 2-3 seconds.

Expected Results:  
Behaviour of plasmashell/krunner should be unaffected.

Probably "Copy Plain Text 2" Firefox addon makes something wrong. Anyway whatever happens to clipboard plasmashell has to continue normal operation.
Comment 1 Andrew Crouthamel 2018-11-01 13:49:03 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 2 Bug Janitor Service 2018-11-16 11:39:43 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Alexander Meshcheryakov 2018-11-29 18:03:11 UTC
Sorry for long reply.

I still observe occasional freezes. Though I could not reproduce my original sequence to trigger this bug, that Firefox addon is not available anymore.

But here is another way: use "Take s screenshot" feature, embedded in recent Firefox versions, and choose
Comment 4 Alexander Meshcheryakov 2018-11-29 18:10:37 UTC
Sorry for long response.

I still observe occasional freezes.

I could not reproduce my original sequence, but here is robust way to trigger freeze on my current system (up to date Arch linux installation):
use https://support.mozilla.org/en-US/kb/firefox-screenshots feature embedded in recent Firefox versions and choose "Copy to clipboard". Behaviour is slightly different:
1) Plasmashell gets freezed as before for about 20 s
2) krunner do NOT freeze
3) Firefox freezes as well :( And continues to work simultaneously with plasmashell

I'd say what I experience now is quite similar to https://bugs.kde.org/show_bug.cgi?id=392897
Comment 5 Alexander Meshcheryakov 2019-01-09 22:07:32 UTC
I found that "Configure Clipboard -> Actions -> Enable MIME-based actions" has to be enabled to observe this bug.

What a relief, I can just disable this feature and don't observe this hangup anymore.
Comment 6 Mattia 2019-02-10 09:36:33 UTC
I've also seen this behavior since few years, it happens frequently when using Fedora with KDE in a guest KVM machine.
When I try to copy text from kwrite it sometimes randomly freeze for 10 seconds or so, after that in the clipboard history I can see an empty line: it's like something weird and huge is being copied in the clipboard.
I usually don't see this behavior in the host machine, only in the guest.
I think bug #404145 may be a duplicate of this.

Still seeing this on 5.14.90
Comment 7 Nate Graham 2021-03-09 03:43:00 UTC
*** Bug 404145 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2021-03-09 03:43:29 UTC
Does this still happen to anyone in either Plasma 5.18 (the current LTS version) or Plasma 5.21 (the latest released version)?
Comment 9 Alexander Meshcheryakov 2021-03-10 21:05:32 UTC
Arch linux, plasma-desktop 5.21.2-1
I could trigger this once today after copying screenshot from Firefox. Clock stopped ticking for about 30 seconds.

But subsequent attempts do not trigger this anymore. But I have not tried really thoroughly. Probably only the first screenshot copy after reboot or something like that triggers freeze now.
Comment 10 Nate Graham 2021-03-10 21:15:59 UTC
That was with an image though, right? There's a very high chance that is not our bug. It would be interesting to see if this happens on Wayland. If it does, the bug is in Qt. If not, the bug is in X11. Any chance you could give it a shot?
Comment 11 Alexander Meshcheryakov 2021-03-10 21:36:20 UTC
More tests on Arch linux, plasma-desktop 5.21.2-1 revealed, that on first copy of screenshot from [Firefox screenshot tool](https://support.mozilla.org/en-US/kb/firefox-screenshots) plasmashell freezes for about 25 seconds, krunner does not react, Firefox interface freezes as well.

Firefox restart leads resets the issue and again first screenshot leads to freeze. Ticking "ignore images" in klipper config prevents freeze from occurring.

All my tests till now are performed under X11. I'll see if I can test it with Wayland.
Comment 12 Nate Graham 2021-03-11 18:19:55 UTC
Thanks, I would appreciate it.
Comment 13 Alexander Meshcheryakov 2021-03-12 19:55:10 UTC
Aaand I've performed even more tests!

I tried the same sequence (restart firefox, firefox screenshot tool, copy) on another PC, which runs on Kubuntu 20.10, X11. Freezes for the same ~25 seconds! So this is not something specific to one particular system. Kubuntu system is quite different: it is 2020 year laptop with AMD Raven ridge graphics.
My main PC with Arch linux is from ~2014 and uses intel graphics.

But with Wayland session on Kubuntu laptop I could not reproduce freeze.

So far it seems freeze occurs only when running with X11.
Comment 14 Nate Graham 2021-03-15 15:55:42 UTC
Ah yes, the classic X11 server with clipboard freeze. :(
Comment 15 Nate Graham 2021-03-15 15:56:02 UTC
*** Bug 414152 has been marked as a duplicate of this bug. ***
Comment 16 Nate Graham 2021-03-15 15:57:08 UTC
*** Bug 399096 has been marked as a duplicate of this bug. ***
Comment 17 Nate Graham 2021-04-01 20:23:36 UTC
*** Bug 410471 has been marked as a duplicate of this bug. ***
Comment 18 Nate Graham 2021-04-01 20:25:47 UTC
*** Bug 395667 has been marked as a duplicate of this bug. ***
Comment 19 Nate Graham 2021-04-01 20:25:50 UTC
*** Bug 395997 has been marked as a duplicate of this bug. ***
Comment 20 Nate Graham 2021-04-01 20:33:13 UTC
*** Bug 431673 has been marked as a duplicate of this bug. ***
Comment 21 tagwerk19 2021-04-01 20:48:25 UTC
I don't know if I see the same thing but I've noticed copy and paste with Firefox (and Thunderbird) being "definitely obstinate"

I can highlight the text and "copy" and see the text in Klipper but I am not always able to paste. Typically I see the issue if trying to paste a link from Firefox into an email being written in Thunderbird.

I find I have somewhat more success if I "Paste without Formatting". My workround has been to "Clear History", go back to the text and copy it again. Both can help - but neither are guaranteed

There's also a thread here that seems to make sense....
    https://old.reddit.com/r/kdeneon/comments/mgybdr/firefox_and_the_clipboard/

For me this is with X (within KVM guests and from one KVM guest to another)

I see it on various systems, an example:

    Fedora 33
    Plasma: 5.20.5
    Frameworks: 5.79.0
    Qt: 5.15.2

[ originally posted here
  https://bugs.kde.org/show_bug.cgi?id=433854#c7 ]
Comment 22 Nate Graham 2021-04-01 21:03:10 UTC
*** Bug 386418 has been marked as a duplicate of this bug. ***
Comment 23 Adam Ruckel 2021-04-02 19:05:10 UTC
Hi Nate and Alexander,

> *** Bug 404145 has been marked as a duplicate of this bug. ***

I don't think that this bug (360262) is related to 404145 or bug 393804 that I opened in 2018.

I've never ever had any issues with my clipboard - until I open virt-manager. And when I open virt-manager the problem is not related to size of copied data. I can copy a single character in Kate or Konsole and the keyboard input hangs totally for ~30 sec.

> Does this still happen to anyone in either Plasma 5.18 (the current LTS version) or Plasma 5.21 (the latest released version)?

I can confirm this is still an issue on

5.14 (Debian)
5.18 (Kubuntu 20.04)
5.19 (Kubuntu 20.10)
5.20 (Fedora 33)
5.21 (Arch)

> If not, the bug is in X11

I'm 100% sure that the bug was introduced in Fedora 26 lifetime (see https://bugs.kde.org/show_bug.cgi?id=393804) after updating Plasma. In other words if you install fresh Fedora 26, the bug is not there. If you then update it (I'm not sure if that is currently possible with such old Fedora) the bug will be there.

Workaround:

Configure System Tray => Disable Clipboard.

That tells me that this is a Plasma bug, not X11. But I might be wrong.

Disabling Clipboard is very unpleasant since it disables more than just a copy history. When you disable it and copy something for example in Kate and close it, the clipboard is gone. In other words you have to paste it somewhere before you close the source application. Super annoying but for me - heavy VM / virt-manager user, this is better than freezing inputs.

Thank you for your great work. Even with bugs, Plasma is the best. And KDE community is awesome ;-).

Kind regards,

Adam
Comment 24 Nate Graham 2021-04-12 21:40:59 UTC
Duplicate bug 431673 has a history file that can be used to reproduce the bug; replace your ~/.local/share/klipper/history2.lst file with it.
Comment 25 valdikss 2021-08-24 10:23:50 UTC
I can confirm this issue. It also happens with other two-way-clipboard-sync applications like VirtualBox or FreeRDP.
Comment 26 Lê Hoàng Phương 2022-11-07 23:30:58 UTC
Confirm this issue when enabling two-way clipboard sync with VirtualBox, and after that take a lot of screenshots with Spectacle (with automatic copy image to clipboard option).
I also noticed that in my case, the issue doesn't trigger until Alt+Tab-ing (i.e if I only use mouse to switch windows, it's fine)
Comment 27 Lê Hoàng Phương 2022-11-16 03:06:08 UTC
I also noticed that when the input freeze happens, if I close the application that hold the most recent item in the clipboard, the input can be unfrozen.
Comment 28 Fushan Wen 2023-02-11 15:16:04 UTC
Move to 446581 since there are more in-depth discussions

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