Bug 449436 - Spectacle not able to take screenshots on KDE Wayland
Summary: Spectacle not able to take screenshots on KDE Wayland
Status: RESOLVED FIXED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (other bugs)
Version First Reported In: 21.12.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Boudhayan Gupta
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-31 21:47 UTC by yr
Modified: 2023-05-02 21:54 UTC (History)
9 users (show)

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


Attachments
qdbus-qt5 org.kde.KWin Output (1.22 KB, text/plain)
2022-02-06 20:06 UTC, Behzad A
Details
Output of the command "qdbus org.kde.KWin" (1.25 KB, text/plain)
2022-02-10 17:38 UTC, yr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description yr 2022-01-31 21:47:38 UTC
SUMMARY

STEPS TO REPRODUCE
1. Start KDE Wayland session (Nvidia 510)
2. Open spectacle
3. Try to take a screenshot

OBSERVED RESULT
Spectacle shows no screenshot and warns that "Could not take a screenshot. Please report this bug here: create a spectacle bug"

EXPECTED RESULT
The expected result would be a preview of the screenshot to save or to copy to clipboard.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.16.4-arch1-1 / Plasma 5.23.5
(available in About System)
KDE Plasma Version: 5.23.5
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Here are the logs when I reproduce by launching Spectacle through the terminal:

```
Error calling KWin DBus interface: "org.freedesktop.DBus.Error.UnknownObject" "No such object path '/Screenshot'"
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
QPixmap::scaled: Pixmap is a null pixmap
```
Comment 1 Vlad Zahorodnii 2022-02-04 08:13:05 UTC
can you post the output of `qdbus org.kde.KWin`?
Comment 2 Behzad A 2022-02-06 20:06:42 UTC
Created attachment 146354 [details]
qdbus-qt5 org.kde.KWin Output

(In reply to Vlad Zahorodnii from comment #1)
> can you post the output of `qdbus org.kde.KWin`?

Same issue with git master

System:    Host: localhost.localdomain Kernel: 5.16.4-1-default x86_64 bits: 64 compiler: gcc v: 11.2.1
           Desktop: KDE Plasma 5.24.80 tk: Qt 5.15.2 wm: kwin_wayland dm: SDDM Distro: openSUSE Tumbleweed 20220204

CPU:       Info: Dual Core model: Intel Core2 Duo T6670 bits: 64 type: MCP arch: Penryn rev: A cache: L2: 2 MiB
           flags: lm nx pae sse sse2 sse3 sse4_1 ssse3 vmx bogomips: 8772
           Speed: 1206 MHz min/max: 1200/2201 MHz boost: enabled Core speeds (MHz): 1: 1206 2: 1225

Graphics:  Device-1: Intel Mobile 4 Series Integrated Graphics vendor: Sony driver: i915 v: kernel bus-ID: 00:02.0
           chip-ID: 8086:2a42
           Device-2: Ricoh Sony Vaio Integrated Webcam type: USB driver: uvcvideo bus-ID: 6-2:2 chip-ID: 05ca:18b3
           Display: wayland server: SUSE LINUX 1.21.1.3 compositor: kwin_wayland driver: loaded: modesetting
           unloaded: fbdev,vesa alternate: intel resolution: 1280x800~60Hz s-dpi: 96
           OpenGL: renderer: Mesa Mobile Intel GM45 Express (CTG) v: 2.1 Mesa 22.1.0-devel-git-5d8c6596 direct render: Yes
Comment 3 Behzad A 2022-02-07 18:43:27 UTC
The issue is fixed in git-master, and I don't know that the 5.23.5 issue is related to the git-master issue(Seems it the git-master problem was related to loading the built-in effects)
Comment 4 Nate Graham 2022-02-07 18:45:15 UTC
That's probably a separate issue which as you've observed is already fixed, yeah.
Comment 5 Juha Nikkanen 2022-02-08 12:40:56 UTC
(In reply to Behzad A from comment #3)
> The issue is fixed in git-master, and I don't know that the 5.23.5 issue is
> related to the git-master issue(Seems it the git-master problem was related
> to loading the built-in effects)

Behzad A, can you elaborate which issue you refer 5.23.5? Obviously spectacle from git master is  not enough to solve this issue. Please add href if you know what else is needed.
Comment 6 yr 2022-02-10 17:38:53 UTC
Created attachment 146542 [details]
Output of the command "qdbus org.kde.KWin"

Here is the output.
Comment 7 Vlad Zahorodnii 2022-02-11 19:54:07 UTC
Did you disable the screenshot effect? Can you attach your .config/kwinrc file to the bug report?
Comment 8 Juha Nikkanen 2022-03-02 10:17:31 UTC
Hey, via updates by 26. of feb on Fedora 35, this began to work for me. So, my current sw versions are:

plasmashell 5.24.2
Qt: 5.15.2
KDE Frameworks: 5.91.0
spectacle 21.12.2
Comment 9 scoronado 2022-04-19 01:48:18 UTC
(In reply to Juha Nikkanen from comment #8)
> Hey, via updates by 26. of feb on Fedora 35, this began to work for me. So,
> my current sw versions are:
> 
> plasmashell 5.24.2
> Qt: 5.15.2
> KDE Frameworks: 5.91.0
> spectacle 21.12.2

It is not working on Spectacle 21.12.3 on Arch Linux.
Comment 10 Noah Davis 2023-05-02 21:54:16 UTC
Since this is for an old version, I'm marking this as fixed.