Bug 506534 - KScreenLocker cannot be screenshotted (by "Full Screen" mode)
Summary: KScreenLocker cannot be screenshotted (by "Full Screen" mode)
Status: RESOLVED INTENTIONAL
Alias: None
Product: Spectacle
Classification: Applications
Component: General (other bugs)
Version First Reported In: 6.4.1
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Noah Davis
URL: https://discuss.kde.org/t/how-to-scre...
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-03 14:05 UTC by Roke Julian Lockhart Beedell
Modified: 2025-08-20 17:27 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
A Screenshot Of The Error In Spectacle's GUI (76.04 KB, image/png)
2025-07-03 14:05 UTC, Roke Julian Lockhart Beedell
Details
A Screencast That Demonstrates How To Reproduce This (303.39 KB, video/webm)
2025-07-04 13:39 UTC, Roke Julian Lockhart Beedell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roke Julian Lockhart Beedell 2025-07-03 14:05:40 UTC
Created attachment 182898 [details]
A Screenshot Of The Error In Spectacle's GUI

# SUMMARY

KScreenLocker cannot be screenshotted in any mode, but most importantly, full screen mode (due to the other modes being inapplicable due to other, already-reported bugs) for two users using Plasma 6, [^1] but can for one user using Plasma 5. [^2]

# STEPS TO REPRODUCE

1. Set an appropriate delay (4s).

2. Select "Full Screen". If you don't (and, instead, use "Active Window" mode), you'll see https://bugs.kde.org/show_bug.cgi?id=501593#c0's error message.

3. Lock to KScreenLocker.

4. Wait 4s.

5. Unlock.

# OBSERVED RESULT

Spectacle fails to capture a screenshot, with:

> ~~~
> An error occurred while taking a screenshot.
> KWin screenshot request failed:
> Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
> Potentially relevant information:
> - Method: CaptureScreen
> - Method specific arguments: "DP-1"
> ~~~

This has been corroborated by another user. [^1]

# EXPECTED RESULT

It should capture a screenshot, as it does for others. [^2]

# SOFTWARE/OS VERSIONS

> ~~~
> Operating System: Fedora Linux 42
> KDE Plasma Version: 6.4.1
> KDE Frameworks Version: 6.15.0
> Qt Version: 6.9.1
> Kernel Version: 6.15.4-200.fc42.x86_64 (64-bit)
> Graphics Platform: Wayland
> Graphics Processor 1: AMD Radeon RX 5700
> Graphics Processor 2: AMD Radeon Graphics
> Manufacturer: ASRock
> Product Name: X670E Taichi
> ~~~

# ADDITIONAL INFORMATION

Spectacle's "Full Screen" screencast mode works.

[^1]: https://discuss.kde.org/t/how-to-screenshot-kscreenlocker/36494/5?u=rokejulianlockhart

[^2]: https://discuss.kde.org/t/how-to-screenshot-kscreenlocker/36494/2?u=rokejulianlockhart
Comment 1 Roke Julian Lockhart Beedell 2025-07-03 21:42:51 UTC
(In reply to Roke Julian Lockhart Beedell from comment #0)

Per https://discuss.kde.org/t/how-to-screenshot-kscreenlocker/36494/15?u=rokejulianlockhart, this solely affects my laptop. This works on my desktop:

> ~~~
> Operating System: Fedora Linux 42
> KDE Plasma Version: 6.4.1
> KDE Frameworks Version: 6.15.0
> Qt Version: 6.9.1
> Kernel Version: 6.15.4-200.fc42.x86_64 (64-bit)
> Graphics Platform: Wayland
> Graphics Processor 1: AMD Radeon RX 5700
> Graphics Processor 2: AMD Radeon Graphics
> Manufacturer: ASRock
> Product Name: X670E Taichi
> ~~~
Comment 2 Noah Davis 2025-07-04 00:11:17 UTC
It's not completely clear, but it seems like it might be intentional that you can't get screenshot from KWin of the real screenlocker for security. You should be able to to take screenshots if you open the screenlocker in a window like what was described in the original discussion thread. Spectacle may be able to get a message from KWin to cancel the screenshot so that you don't see this as an error in the future.
Comment 3 Noah Davis 2025-07-04 00:19:26 UTC
(In reply to Roke Julian Lockhart Beedell from comment https://bugs.kde.org/show_bug.cgi?id=501593#c10)
> I presume that you're referring to
> https://bugs.kde.org/show_bug.cgi?id=506534. If so, have you seen
> https://discuss.kde.org/t/how-to-screenshot-kscreenlocker/36494/
> 15?u=rokejulianlockhart? It's quite possible, on both Wayland and X: it's
> solely on my laptop that it fails, and without CSDs, it's just a window like
> any other.

I did reproduce the screenshot problem with the real screenlocker
Comment 4 Roke Julian Lockhart Beedell 2025-07-04 13:39:02 UTC
Created attachment 182949 [details]
A Screencast That Demonstrates How To Reproduce This

(In reply to Noah Davis from comment #3)

> I did reproduce the screenshot problem with the real screenlocker

Yeah, I got confused, thinking that invoking `kscreenlocker` was equivalent to invoking `qdbus-qt6 org.freedesktop.ScreenSaver /ScreenSaver Lock`. Please hide https://bugs.kde.org/show_bug.cgi?id=506534#c1, if possible.

It definitely reproduces when I run `spectacle --new-instance --fullscreen --delay 4000`, then `qdbus-qt6 org.freedesktop.ScreenSaver /ScreenSaver Lock`, as the attached video depicts.

I've another screencast that goes over every mode that's exposed via `man spectacle`, but it's basically the same outcome for all of them: either this error, of https://bugs.kde.org/show_bug.cgi?id=501593#c0's. (However, Window Under Cursor and Rectangular Region just doesn't work, since they don't see it as a window, or can't render over it.)
Comment 5 Nate Graham 2025-08-20 16:38:14 UTC
Yes, this is intentional. The are workarounds you can use, as mentioned earlier.
Comment 6 Roke Julian Lockhart Beedell 2025-08-20 17:23:45 UTC
(In reply to Nate Graham from comment #5)

In which case, shouldn't it return a more comprehensible error?
Comment 7 Nate Graham 2025-08-20 17:27:12 UTC
A better error message would be nice, but this is such a super duper specific unsupported thing to do that I'm not sure it's worth tracking with a bug report.

Feel free to submit a patch yourself, of course. I see from your invent profile that you're a software developer now! This could be some good practice.