Bug 500731

Summary: Copy to clipboard button sometimes requires taking multiple screenshots to work.
Product: [Applications] Spectacle Reporter: Arimil <renari>
Component: GeneralAssignee: Noah Davis <noahadvs>
Status: ASSIGNED ---    
Severity: minor CC: aspotashev, john.kizer, kde, keplicz, pallaswept
Priority: NOR    
Version First Reported In: 6.3.3   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Arimil 2025-02-25 15:38:14 UTC
SUMMARY
I have shift+print set as my shortcut to capture a region. It's very common  when I press this combo, select a region and click the copy button, nothing will be copied to my clipboard.

STEPS TO REPRODUCE
1. Take a screenshot using my keybind shift+print
2. Click the `copy` button after selecting a region
3. Paste the image somewhere, to observe that the clipboard is empty

OBSERVED RESULT
Empty clipboard

EXPECTED RESULT
Image on clipboard

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.13.4-2-cachyos
KDE Plasma Version: 6.3.1
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2
Comment 1 Arimil 2025-02-25 15:38:51 UTC
I should clarify by multiple, I've never had this fail twice in a row.
Comment 2 John Kizer 2025-03-15 16:41:00 UTC
Hi - just to check:

* Are you able to reproduce this using Plasma / Spectacle 6.3.3?
* What notification settings do you have for Spectacle? (looking at a possible connection to https://bugs.kde.org/show_bug.cgi?id=500042 )
* Is this in windowed applications, or in full-screen ones? (looking at https://bugs.kde.org/show_bug.cgi?id=496029 )

Thanks!
Comment 3 Arimil 2025-03-15 16:56:31 UTC
(In reply to John Kizer from comment #2)
> Hi - just to check:
> 
> * Are you able to reproduce this using Plasma / Spectacle 6.3.3?
> * What notification settings do you have for Spectacle? (looking at a
> possible connection to https://bugs.kde.org/show_bug.cgi?id=500042 )
> * Is this in windowed applications, or in full-screen ones? (looking at
> https://bugs.kde.org/show_bug.cgi?id=496029 )
> 
> Thanks!

Yes I've still had it happen recently after updates, I do not have the spectacle notifications disabled so 500042 is unrelated. 496029 is possibly related if borderless window would be considered equivalent to fullscreen. I'll update after I see it happen a few more times to confirm if I can reproduce it when there is not a borderless window application running.
Comment 4 Arimil 2025-03-15 22:59:53 UTC
I definitely had it happen with no fullscreen apps running, so 496029 is unrelated. Took a screenshot of my browser while playing RuneScape (in maximized window mode) and it wasn't on my clipboard after that.
Comment 5 Arimil 2025-03-16 13:52:20 UTC
I left journalctl open in my terminal to see if anything was output when it happens, sadly the only thing that gets output is:

Mar 16 09:49:06 camelot spectacle[58740]: libva error: /usr/lib/dri/nvidia_drv_video.so init failed
Mar 16 09:49:06 camelot spectacle[58740]: kpipewire_vaapi_logging: VAAPI: Failed to initialize display
Mar 16 09:49:06 camelot spectacle[58740]: kpipewire_vaapi_logging: VAAPI: VA-API NVDEC driver [direct backend] in use for device  "/dev/dri/renderD128"

But it seems these are output every time, even when the image is successfully copied.
Comment 6 pallaswept 2025-03-16 22:55:22 UTC
I've noticed this also. I am using CopyQ, and I can see the screenshot in my clipboard history, so I know it is actually copied, but attempting to paste it from the clipboard, fails. All signs suggest that there's nothing in the clipboard at all. When I paste it from CopyQ's history, it works, and will paste from the clipboard after that... 

It seems that the copy is actually successful, but the clipboard is cleared immediately afterwards.
Comment 7 Arimil 2025-04-17 18:12:36 UTC
(In reply to pallaswept from comment #6)
> It seems that the copy is actually successful, but the clipboard is cleared
> immediately afterwards.

Can confirm this is the same behavior for me turned on the plasma clipboard history widget and can always see the image in the history even when I cannot paste it.
Comment 8 Arimil 2025-08-31 20:01:05 UTC
Not sure if this is related or not but I have a similar issue with `plasma-emojier` that is much more repeatable.

- open plasma-emojier
- copy an emoji
- close the window
- the emoji will be deleted from my clipboard 100% of the time

If I do not close the window it stays, this could be the same issue since in the case of spectacle it is closing itself.
Comment 9 Bug Janitor Service 2025-09-06 14:02:07 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kguiaddons/-/merge_requests/182