Bug 462673

Summary: Clipboard does not include items copied via copy/paste (CTRL+C or right click+copy) until plasmashell is restarted
Product: [Plasma] kwin Reporter: Daniel Duris <kdebugs>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: crib.moneywise773, kde, kde, me, meven29, nate, oleg, r9290x
Priority: NOR Keywords: wayland
Version: 5.26.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: clipboard settings

Description Daniel Duris 2022-12-05 14:42:15 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Select and copy text (CTRL+C)
2. Go to clipboard history, nothing recent there

OBSERVED RESULT
No item in clipboard history

EXPECTED RESULT
Copied item in the clipboard history (text)

Operating System: KDE neon 5.26
KDE Plasma Version: 5.26.3
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.7
Kernel Version: 5.15.0-53-generic (64-bit)
Graphics Platform: Wayland
Comment 1 Daniel Duris 2022-12-05 14:45:33 UTC
Created attachment 154333 [details]
clipboard settings
Comment 2 Nate Graham 2022-12-05 20:44:02 UTC
> Select and copy text (CTRL+C)
In what app? Just one app? Some apps? All apps (in which case, mention which ones you tested)?
Comment 3 Daniel Duris 2022-12-05 22:41:44 UTC
(In reply to Nate Graham from comment #2)
> > Select and copy text (CTRL+C)
> In what app? Just one app? Some apps? All apps (in which case, mention which
> ones you tested)?

I have tested in a browser (Firefox). I am not able to pinpoint this to one particular cause.

I think that sometimes double CTRL+C (copy) can help with forcing it into a clipboard.
Comment 4 Nate Graham 2022-12-06 16:29:52 UTC
Can you test in other apps too?
Comment 5 Sergey Kozharinov 2022-12-11 01:57:43 UTC
Have a similar issue on Fedora 37 with latest KDE from ZaWertun's copr on Wayland. Only the first text copied in some apps is shown in clipboard history. The clipboard itself works properly. "Some apps" seems to be GTK, tested in Firefox, Inkscape and Flatseal. Qt apps are not affected (tested Konsole and Picard). CLion is not affected either.
Selecting any entry in clipboard history allows adding one more entry to the history, as well as copying a text in a different GTK app.
Comment 6 Sergey Kozharinov 2022-12-11 03:20:48 UTC
Also worth mentioning that clipboard history works properly with a newly created user.
Comment 7 Nate Graham 2022-12-14 22:15:15 UTC
So this is still happening with Plasma 5.27 from the main repo, and not a COPR?
Comment 8 Nate Graham 2022-12-14 22:15:25 UTC
Er, 5.26 of course :)
Comment 9 Sergey Kozharinov 2022-12-14 22:41:13 UTC
Switched to main repo, same behaviour.
Comment 10 Nate Graham 2022-12-14 23:26:42 UTC
Ok, thanks for checking!
Comment 11 tustamido 2023-02-16 15:07:58 UTC Comment hidden (spam)
Comment 12 tustamido 2023-02-16 15:38:49 UTC Comment hidden (spam)
Comment 13 tustamido 2023-02-17 15:40:58 UTC Comment hidden (spam)
Comment 14 Méven Car 2023-02-18 11:51:41 UTC Comment hidden (spam)
Comment 15 Nate Graham 2023-02-21 18:20:10 UTC Comment hidden (spam)
Comment 16 tustamido 2023-02-21 21:55:27 UTC Comment hidden (spam)
Comment 17 Nate Graham 2023-02-22 19:53:15 UTC
I've been intermittently reproducing this, with all apps failing to get copied text into the clipboard. When it happens, restarting plasmashell (`systemctl restart --user plasma-plasmashell.service`) helps.

Do you see that as well?
Comment 18 tustamido 2023-02-26 08:14:15 UTC Comment hidden (spam)
Comment 19 tustamido 2023-02-26 08:22:24 UTC Comment hidden (spam)
Comment 20 tustamido 2023-02-26 08:31:53 UTC Comment hidden (spam)
Comment 21 tustamido 2023-02-26 08:36:27 UTC Comment hidden (spam)
Comment 22 Nate Graham 2023-02-27 15:39:27 UTC Comment hidden (spam)
Comment 23 Nate Graham 2023-02-27 15:40:56 UTC
Dan, does it temporarily fix the issue when you restart plasmashell by running `systemctl restart --user plasma-plasmashell.service` in a terminal window?
Comment 24 Dr. Prepper 2023-02-27 16:46:36 UTC Comment hidden (spam)
Comment 25 Nate Graham 2023-02-27 16:48:42 UTC Comment hidden (spam)
Comment 26 Daniel Duris 2023-02-27 17:15:38 UTC
(In reply to Nate Graham from comment #23)
> Dan, does it temporarily fix the issue when you restart plasmashell by
> running `systemctl restart --user plasma-plasmashell.service` in a terminal
> window?

It has actually stopped happening since some recent update.
I will test it once I hit it again.
Comment 27 Nate Graham 2023-02-27 17:25:07 UTC
Awesome news, please do report back!
Comment 28 Oleg 2023-03-02 21:32:03 UTC
Can confirm.
In Firefox wayland version if I copy URL from address bar I can't paste it anywhere else than Firefox itself. For some reason it only happens to URLs from address bar, any other text from Firefox copies just fine.
Comment 29 Hasshu 2023-04-26 09:10:26 UTC
(In reply to Oleg from comment #28)
> Can confirm.
> In Firefox wayland version if I copy URL from address bar I can't paste it
> anywhere else than Firefox itself. For some reason it only happens to URLs
> from address bar, any other text from Firefox copies just fine.

If you have the middle-click paste disabled, you're likely hitting this Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1791417
Comment 30 Nate Graham 2023-04-26 17:08:33 UTC
Oleg, your issue does sound different. In the futur, please submit a new bug report rather than adding a comment to an existing one that's about something else. Thanks.

Dan, has it happened again?
Comment 31 Daniel Duris 2023-04-27 07:40:33 UTC
(In reply to Nate Graham from comment #30)
> Oleg, your issue does sound different. In the futur, please submit a new bug
> report rather than adding a comment to an existing one that's about
> something else. Thanks.
> 
> Dan, has it happened again?

Hello, it hasn't happened in a long time, but if it appears again sometime later I might reopen.
Comment 32 Nate Graham 2023-04-27 13:30:14 UTC
Ok great. Let's close the bug report for now, then. If you encounter the exact same issue again, please feel free to re-open it.