Bug 496029 - Sometimes Spectacle does not copy to clipboard in fullscreen apps
Summary: Sometimes Spectacle does not copy to clipboard in fullscreen apps
Status: RESOLVED FIXED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Noah Davis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-09 22:31 UTC by Oleh
Modified: 2025-12-15 10:20 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.22
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oleh 2024-11-09 22:31:33 UTC
SUMMARY
Sometimes Spectacle does not copy to the clipboard in fullscreen apps

STEPS TO REPRODUCE
1. Open a game (Warframe for example)
2. Press the hotkey to take a screenshot on the active monitor


OBSERVED RESULT
There is no image in clipboard

EXPECTED RESULT
Image in clipboard

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.2.3
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Kernel Version: 6.11.7-lqx1-2-lqx (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5700X3D 8-Core Processor
Memory: 31.3 ГіБ of RAM
Graphics Processor: AMD Radeon RX 6800 XT
Manufacturer: Micro-Star International Co., Ltd.
Product Name: MS-7C56
System Version: 6.0

ADDITIONAL INFORMATION
Spectacle is configured to copy to clipboard and save to folder (saving to folder always works)

1st monitor - 2560x1440@180hz
2nd monitor - 2560x1440@60hz

Logs:
22:10:53.653 UTC user@1000.service Starting Spectacle screenshot capture utility...
22:10:53.815 UTC user@1000.service Started Spectacle screenshot capture utility.
22:10:53.816 UTC user@1000.service kpipewire_vaapi_logging: VAAPI: Mesa Gallium driver 24.2.6-arch1.1 for AMD Radeon RX 6800 XT (radeonsi, navi21, LLVM 18.1.8, DRM 3.59, 6.11.7-lqx1-2-lqx) in use for device "/dev/dri/renderD128"
22:10:57.089 UTC user@1000.service DataControlOffer: timeout reading from pipe
Comment 1 Mahmoud Shmaitelly 2024-12-29 17:51:20 UTC
I can report that when all apps are minimized or when no apps are opened, taking a spectacle does not copy the screenshot to the clipboard.
Comment 2 nonspace 2025-05-17 13:01:51 UTC
I can reproduce this, too specifically with rectangle selections and selecting "Copy". Notably it works to copy to clipboard when selecting "Export" -> "Share" -> "Copy to Clipboard" rather than just "Copy" or selecting copy to clipboard in settings.
Comment 3 Malkævian 2025-07-31 15:12:09 UTC
I have this same issue.

Ctrl-C has a 20% chance of working, but saving image to file always works.

For me, this is regardless of fullscreen or windowed applications (though it does seem to happen more in fullscreen apps), and the issue happens while giving me a notification that it *should* have copied to clipboard.

Distro: CachyOS
KDE Plasma: 6.4.3
Display Server: Wayland

Monitors: 2x AOC 1080p, 27" 240hz + 22" 60hz
Comment 4 leesethefox 2025-08-02 19:01:11 UTC
Same issue here. Spectacle successfully copies screenshots about 80% of the time, but the remaining 20% it fails to copy anything to the clipboard. When this happens, a clipboard entry is created but it appears blank/empty with no screenshot preview.

Environment:
- Desktop: Wayland
- OS: Fedora 42
- Plasma: 6.4.3
- KWin: 6.4.3-1.fc42.x86_64
- Spectacle: 6.4.3
Comment 5 bugs 2025-08-29 03:12:17 UTC
I can also reproduce this bug on spectacle 6.4.4 and spectacle 6.4.2. I have this issue irregardless when I capture rectangular regions, have not tested anything else.
Comment 6 Bug Janitor Service 2025-09-06 14:02:05 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kguiaddons/-/merge_requests/182
Comment 7 Bug Janitor Service 2025-10-14 18:11:55 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/spectacle/-/merge_requests/481
Comment 8 Bug Janitor Service 2025-12-11 10:42:37 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kguiaddons/-/merge_requests/191
Comment 9 David Edmundson 2025-12-15 10:20:26 UTC
Git commit b71af4e1afcf72b8c9da315dc8d728db70d753c0 by David Edmundson, on behalf of David Redondo.
Committed on 15/12/2025 at 10:16.
Pushed by davidedmundson into branch 'master'.

ksystemclipboard: Dispatch read events in another thread

WaylandClipboard wraps ext_data_control if an application tried to read
the clipboard using QClipboard whilst it owns the data control we would
deadlock.

This was previously being solved by trying to transfer mimedata to the
regular clipboard upon gaining focus. However this never worked
reliably and efforts to fix this only made it more complicated.

To solve the original deadlock all ext_data_control classes now live on
another thread which dispatches events on a separate queue. A recursive
mutex allows the main thread to read mimedata and no wayland events
which change the mimedata process until this is complete.
Related: bug 480448, bug 502831, bug 505281, bug 506467, bug 507792, bug 509065, bug 509689, bug 511736
FIXED-IN: 6.22

M  +116  -14   src/systemclipboard/waylandclipboard.cpp
M  +3    -0    src/systemclipboard/waylandclipboard_p.h

https://invent.kde.org/frameworks/kguiaddons/-/commit/b71af4e1afcf72b8c9da315dc8d728db70d753c0