Bug 437593

Summary: Spectacle / Wayland: rectangle snapshots not working
Product: [Applications] Spectacle Reporter: Andreas Hartmann <andihartmann>
Component: GeneralAssignee: Boudhayan Gupta <me>
Status: RESOLVED FIXED    
Severity: normal CC: kde, meven29
Priority: NOR    
Version First Reported In: 21.04.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Andreas Hartmann 2021-05-24 06:51:02 UTC
SUMMARY
Using Wayland, it's impossible to do a rectangle snapshot.

STEPS TO REPRODUCE
1. Start konsole
2. Start spectacle
3. Set capture mode to rectangular region
4. Take a new snapshot

OBSERVED RESULT
Snapshot doesn't work.

EXPECTED RESULT
Should work same as with X11.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.21.90
KDE Frameworks Version: 5.82
Qt Version: 5.15.2

ADDITIONAL INFORMATION
The following error occurs in shell: 
kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but no Exec line
kf.service.sycoca: Invalid Service :  "/usr/share/applications/qemu.desktop"
Error calling KWin DBus interface: "org.kde.kwin.Screenshot.Error.ScreenMissing" "Screen not found: XWAYLAND0"
GPU is AMD and used kernel is 5.10.39.
It's on a Notebook - only the internal notebook screen is connected and active - no other screen involved.
Comment 1 Méven Car 2021-05-24 11:11:47 UTC
What is your distro and session kind ?
Are you using OpenSuse TumbleWeed with their half Wayland session mode ?

> Error calling KWin DBus interface: "org.kde.kwin.Screenshot.Error.ScreenMissing" "Screen not found: XWAYLAND0"

The fact that Spectacle expected a screen to be called XWAYLAND0 would suggest it is launched using XWayland in a Wayland session which should not be supported.

You can try launching spectacle with `spectacle -platform wayland`, this should workaround the issue and confirm the diagnostic.

I don't reproduce this as is.
Comment 2 Andreas Hartmann 2021-05-24 13:18:51 UTC
You're right - the problem disappeared with your option -platform wayland.
Yes, I'm using openSuSE, but it's Leap 15.2 using the additional actual KDE repository and QT repository.
And yes, it's the mode "Wayland" - and not "Full Wayland".
Comment 3 Andreas Hartmann 2021-05-26 04:27:32 UTC
Another hint: using gdm as loginmanager makes the problem completely disappear. It's anyway the better solution as gdm doesn't need a running X server any more (it's pure Wayland). The parallel running X server leads to a hanging system if you're logging out (ok - other problem - at least on Leap 15.2 actually).