Bug 404839 - No capture modes work in a GNOME Wayland session
Summary: No capture modes work in a GNOME Wayland session
Status: RESOLVED INTENTIONAL
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: 20.08.3
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Boudhayan Gupta
URL:
Keywords: wayland
: 431202 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-02-26 11:15 UTC by Ricky Tigg
Modified: 2021-12-20 16:01 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
States related to steps (70.00 KB, application/x-tar)
2019-02-26 11:15 UTC, Ricky Tigg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ricky Tigg 2019-02-26 11:15:15 UTC
Created attachment 118377 [details]
States related to steps

SUMMARY: Under Gnome, application is not operational.

STEPS TO REPRODUCE
1. Take any screen-shot;
2. Save screen-shot;
3. Validate the saving operation.

OBSERVED RESULT
1. Process of taking picture behaves as it would be inhibited; no screen-shot is displayed in Spectacle – see 1.png –;
2. A target is normally suggested;
3. At the same time a file is saved, an error is produced – see 2.png, 3.png –.

EXPECTED RESULT: application to be operational in Gnome.

SOFTWARE/OS VERSIONS
– Component: spectacle.x86_64 18.04.3-1.fc29 @fedora
note: version not listed for selection in Bugzilla for KDE.
– Run under:
$ gnome-shell --version
GNOME Shell 3.30.2
– Libraries (as reported in Spectacle):
KDE Frameworks 5.54.0
Qt 5.11.3 (built against 5.11.3)
The xcb windowing system
Comment 1 Rex Dieter 2019-02-26 14:33:50 UTC
I'm assuming you're running a gnome default wayland session?
Comment 2 Ricky Tigg 2019-02-26 20:47:28 UTC
$ loginctl show-session `loginctl | sed -n '2p' | awk '{print $1}'` -p Type
Type=wayland
Comment 3 Nate Graham 2019-03-02 14:01:21 UTC
Please answer the question so we can continue to triage the bug.
Comment 4 Ricky Tigg 2019-03-02 19:55:41 UTC
What that "Nate Graham" doing here?
Comment 5 Nate Graham 2019-03-02 20:50:56 UTC
Oh haha, I missed that you already answered the question!

What capture modes produce this behavior? All of them? Some of them? Are there any that work?
Comment 6 Ricky Tigg 2019-03-03 13:43:16 UTC
No need for "the"; Rex Dieter alone was eligible to receive an answer. You can always participate, if others developers decided to let you participate. Keep in mind you are not on forum here. All capture modes produce reported behavior.
Comment 7 Nate Graham 2019-03-03 14:10:10 UTC
Thanks for answering the question.

> You can always participate, if others developers decided to let you participate.
That's not how bug trackers work. Any developer (or user) can participate as long as they are respectful. Please read https://community.kde.org/Get_Involved/Bug_Reporting#Bug_tracker_etiquette before posting another comment.
Comment 8 Ricky Tigg 2019-03-03 19:17:19 UTC
Bug not reported to be handle by something not observing KDE own rules. Second chance was already given. Definitively closed for my part.
Comment 9 Nate Graham 2019-03-03 21:34:36 UTC
This is a bug, so it needs to stay open.

Bug reports are not assigned to individual people with others not allowed to comment unless invited. That's not how it works around here. You're welcome to stay around, but it would be helpful ot review your knowledge of KDE bug tracker procedures and etiquette.

Again, I encourage you to read https://community.kde.org/Get_Involved/Bug_Reporting#Bug_tracker_etiquette.
Comment 10 David Edmundson 2019-03-05 10:31:18 UTC
No capture modes will work on gnome wayland. Gnome has a different DBus interface to kwin's wayland - and obviously grabbing the X root window won't work.

I don't think there's any point spectacle doing anything until there's some sort of unity between them.
Comment 11 Boudhayan Gupta 2019-06-11 23:43:43 UTC
Given how easy platform backends for Spectacle are to code, I'd like to take a vote and either close this as something we won't do, or actually implement the backend.

I do however agree with d_ed, even if we end up implementing a backend, who's going to test it regularly and make sure it works? GNOME's API isn't something we control, and this is something they're free to change from underneath us... and completely break everything.
Comment 12 David Edmundson 2019-06-12 00:42:07 UTC
There is sort of a common API now.

We can port out backend to https://github.com/flatpak/xdg-desktop-portal/blob/master/data/org.freedesktop.portal.Screenshot.xml

Then put an implementation for kwin inside our xdg-portal (if it's not there already)
Comment 13 Boudhayan Gupta 2019-06-12 07:03:13 UTC
@d_ed: This API looks very limited. Can we (KDE) extend it with more modes?
Comment 14 Justin Zobel 2020-11-22 09:17:44 UTC
Confirmed on KDE Neon User Edition GNOME Wayland session:

Started from konsole:
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Error querying plasma version "org.freedesktop.DBus.Error.ServiceUnknown" "The name org.kde.plasmashell was not provided by any .service files"
Error querying plasma version "org.freedesktop.DBus.Error.ServiceUnknown" "The name org.kde.plasmashell was not provided by any .service files"
Error querying plasma version "org.freedesktop.DBus.Error.ServiceUnknown" "The name org.kde.plasmashell was not provided by any .service files"
Error calling KWin DBus interface: "org.freedesktop.DBus.Error.ServiceUnknown" "The name org.kde.KWin was not provided by any .service files"
QPixmap::scaled: Pixmap is a null pixmap

Trying to take the four different types of screenshot listed:
Error calling KWin DBus interface: "org.freedesktop.DBus.Error.ServiceUnknown" "The name org.kde.KWin was not provided by any .service files"
Error calling KWin DBus interface: "org.freedesktop.DBus.Error.ServiceUnknown" "The name org.kde.KWin was not provided by any .service files"
Error calling KWin DBus interface: "org.freedesktop.DBus.Error.ServiceUnknown" "The name org.kde.KWin was not provided by any .service files"
Error calling KWin DBus interface: "org.freedesktop.DBus.Error.ServiceUnknown" "The name org.kde.KWin was not provided by any .service files"

Looks like it's heavily tied to kwin to actually capture anything.
Comment 15 Nate Graham 2021-12-13 21:44:04 UTC
*** Bug 431202 has been marked as a duplicate of this bug. ***
Comment 16 Méven Car 2021-12-16 09:25:51 UTC
ATM spectacle in Wayland only support KWin compositor.
Comment 17 Ricky Tigg 2021-12-20 10:20:55 UTC
Good self explicit answer which does not allow confusion. I wish the text exhibited at https://github.com/KDE/kwin was of that kind. How not to get confused with such sentences:
"Its primary usage is in conjunction with a Desktop Shell (e.g. KDE Plasma Desktop)"
"KWin is not... (...)
    a replacement for window managers designed for use with a specific Desktop Shell (e.g. GNOME Shell)"".

In "e.g. KDE Plasma Desktop" that "KDE Plasma Desktop" is dully presented as a specific Desktop Shell; 
In "specific Desktop Shell", once GNOME Shell is as "e.g." of  specific Desktop Shell, it is not supported. It''s where non-sense-sentences lead. That is once thing to produce code, one another to master writing.
Comment 18 Nate Graham 2021-12-20 16:01:40 UTC
Feel free to send a merge request to improve that text! It lives here: https://invent.kde.org/plasma/kwin/-/blob/master/README.md