SUMMARY When trying to capture the region on Wayland I get the above error: org.kde.spectacle.core: ERROR: images received from KWin do not match, expected: 1 actual: 2. Turning off the secondary monitor makes the command work again. Although, curiously the "region capture" entry in the dropdown menu of spectacle is also gone. It is not gone on Xorg version of KDE. STEPS TO REPRODUCE 1. spectacle -r in the terminal 2. Wait a few seconds 3. Error spits out, process doesn't end OBSERVED RESULT Error spit out. EXPECTED RESULT Region capture of a screenshot SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: 5.20.4 KDE Frameworks Version: 5.77.0 Qt Version: 5.15.2 ADDITIONAL INFORMATION /
I guess you are using multiple scale factor, if that is the case, the rectangular selection cannot work until Plasma 5.21 (which is what the UI is suggesting by missing the option from the dropdown menu). Please confirm, you have multiple scale factors, if that is the case we can close the bug as resolved for Plasma 5.21.
Both monitors run at scale factor 100% (in display configuration). And also, at the same refresh rate. So I'm not sure this applies to me.
Did you plug in a screen after you launched or took a screenshot and this failure, or does it happen also when you start your system with two screens attached and active ?
(In reply to Méven Car from comment #3) > Did you plug in a screen after you launched or took a screenshot and this > failure, or does it happen also when you start your system with two screens > attached and active ? This happens when I boot up with both screens attached. As soon as I disconnected one of them (physically or in Display Configuration), everything works again. Once I re-connect them, it fails again.
I suspect https://invent.kde.org/plasma/kwin/-/merge_requests/597 to fix this. What is your screen configuration ? Could you share the result of `kscreen-doctor -o`.
(In reply to Méven Car from comment #5) > I suspect https://invent.kde.org/plasma/kwin/-/merge_requests/597 to fix > this. > > What is your screen configuration ? > Could you share the result of `kscreen-doctor -o`. Output: 33 XWAYLAND0 enabled connected Unknown Modes: 36:1920x1080@60*! Geometry: 0,360 1920x1080 Scale: 1 Rotation: 1 Output: 35 XWAYLAND1 enabled connected Unknown Modes: 37:2560x1440@60*! Geometry: 1920,0 2560x1440 Scale: 1 Rotation: 1
Thanks.
(In reply to Méven Car from comment #5) > I suspect https://invent.kde.org/plasma/kwin/-/merge_requests/597 to fix > this. > > What is your screen configuration ? > Could you share the result of `kscreen-doctor -o`. I've upgraded to 5.21. Currently experiencing this error: spectacle -c -r Icon theme "candy-icons" not found. Error calling KWin DBus interface: "org.kde.kwin.Screenshot.Error.ScreenMissing" "Screen not found" QPixmap::scaled: Pixmap is a null pixmap
Sorry for another comment, but I will report that I've since gotten a third monitor. Just in case it matters, this is my kscreen-doctor -o output: Output: 33 XWAYLAND0 enabled connected Unknown Modes: 38:1920x1080@60*! Geometry: 4480,360 1920x1080 Scale: 1 Rotation: 1 Output: 35 XWAYLAND1 enabled connected Unknown Modes: 38:1920x1080@60*! Geometry: 0,360 1920x1080 Scale: 1 Rotation: 1 Output: 37 XWAYLAND2 enabled connected Unknown Modes: 39:2560x1440@60*! Geometry: 1920,0 2560x1440 Scale: 1 Rotation: 1
Git commit 1fb44b5bd500a32cb47062b41453848df1799f4f by Vlad Zahorodnii. Committed on 09/03/2021 at 08:58. Pushed by vladz into branch 'master'. effects/screenshot: Prepare for versioned dbus interface On Wayland, when the compositor sends a screenshot to the requesting app, it encodes the screenshot as a PNG image and sends the encoded data over the pipe. The requesting app (Spectacle) then needs to decode the data. The issue is that encoding PNG images is not cheap. This is the main reason why Spectacle is shown with a huge delay after you press the PrtScr key. In order to fix the latency issue, we need to transfer raw image data. Unfortunately, the current dbus api of the screenshot is too cluttered and the best option at the moment is to start with a clean slate. This change prepares the screenshot effect for versioned dbus interface. Most of existing dbus logic was moved out in a separate class. In order to schedule screen shots, the screenshot effect got some new API. QFuture<QImage> scheduleScreenShot(window, flags) QFuture<QImage> scheduleScreenShot(area, flags) QFuture<QImage> scheduleScreenShot(screen, flags) If a dbus interface needs to take a screenshot, it needs to call one of the overloaded scheduleScreenShot() functions. Every overload returns a QFuture object that can be used for querying the result. This change also introduces "sink" and "source" objects in the dbus api implementation to simplify handling of QFuture objects. Note that the QFutureInterface is undocumented, so if you use it, you do it on your own risk. However, since Qt 5.15 is frozen for non-commercial use and some other Plasma projects already use QFutureInterface, this is not a big concern. For what it's worth, in Qt 6, there's the QPromise class, which is equivalent to the QFutureInterface class. Related: bug 433776 M +1 -0 src/effects/screenshot/CMakeLists.txt M +307 -699 src/effects/screenshot/screenshot.cpp M +60 -139 src/effects/screenshot/screenshot.h A +860 -0 src/effects/screenshot/screenshotdbusinterface1.cpp [License: GPL(v2.0+)] C +61 -74 src/effects/screenshot/screenshotdbusinterface1.h [from: src/effects/screenshot/screenshot.h - 066% similarity] https://invent.kde.org/plasma/kwin/commit/1fb44b5bd500a32cb47062b41453848df1799f4f
I believe that this issue should be fixed with kwin from git master. Can somebody please confirm it?
Confirmed fixed with a multi-monitor setup on Wayland.
(In reply to Nate Graham from comment #12) > Confirmed fixed with a multi-monitor setup on Wayland. When is this getting released? I'm on 5.21.4 and still not able to take screenshots.
(In reply to zerocostabstraction from comment #13) > (In reply to Nate Graham from comment #12) > > Confirmed fixed with a multi-monitor setup on Wayland. > > When is this getting released? I'm on 5.21.4 and still not able to take > screenshots. The fix will be part of Plasma 5.22 (it is written in the bug status), it is scheduled to be released in June. In the meantime you can use X to make your screenshots.
Just upgraded to 5.22, and currently still getting a similar issue of not being able to screenshot on Wayland. The error output now is: spectacle -c -r -b qt.qpa.wayland: EGL not available This output is only on Wayland, and on a VEGA56 graphics card. And the region selection is again not showing up in the Spectacle dropdown. Can anyone else reproduce?
(In reply to zerocostabstraction from comment #15) > Just upgraded to 5.22, and currently still getting a similar issue of not > being able to screenshot on Wayland. The error output now is: > > spectacle -c -r -b > qt.qpa.wayland: EGL not available > > This output is only on Wayland, and on a VEGA56 graphics card. And the > region selection is again not showing up in the Spectacle dropdown. Can > anyone else reproduce? Sorry for messing up, it appears I have accidentally installed Spectacle through nix. The correct error output on wayland right now is: Screenshot request failed: "Invalid screen requested"
This issue is still present with 5.27.0 just released. Error is: Screenshot request failed: "Invalid screen requested"
Spectacle isn't a part of Plasma. Please re-test with Spectacle's upcoming 23.04 release. If it's still an issue, please open a new bug report as the root cause may be different.