Bug 451122 - Could not take screenshot under Wayland
Summary: Could not take screenshot under Wayland
Status: RESOLVED FIXED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (other bugs)
Version First Reported In: 20.12.3
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: Boudhayan Gupta
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-04 09:37 UTC by myndstream
Modified: 2022-03-22 02:06 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description myndstream 2022-03-04 09:37:40 UTC
SUMMARY
Under Debian11/KDE with Wayland Spectacle couldn't take screenshots. It may work with newer versions and it did work previously. Console output is below.

GNOME screenshot didn't work either (issue here https://gitlab.gnome.org/GNOME/gnome-screenshot/-/issues/201) but kazam worked well. Kazam did have lots of errors in the console, including
libwnck is designed to work in X11 only, no valid display found
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/kazam/frontend/window_select.py", line 111, in cb_button_press_event
    screen.force_update()
AttributeError: 'NoneType' object has no attribute 'force_update'

STEPS TO REPRODUCE
1. On Debian11/KDE run spectacle in the console
2. It usually works but it didn't now, it is unclear how to reproduce it

OBSERVED RESULT
This is the output in the console:

libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
QPixmap::scaled: Pixmap is a null pixmap
libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()

EXPECTED RESULT
Screenshoting regions and fullscreen should work.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian 11
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 myndstream 2022-03-04 09:52:16 UTC
Now the panel at the bottom shortly disappeared and reappeared. Afterwards screenshoting is working again.

I didn't make any change that could have caused this, it just disappeared and reappeared out of nowhere. I'm not sure if something Plasma-related restarted and that's why it dis/reappeared, albeit it usually disappears for a bit longer when restarting Plasma and usually also quits other programs.
Comment 2 myndstream 2022-03-04 10:24:21 UTC
Screenshotting only seemed to work with Kazam but the resulting image was blank and just 2 kB.
Comment 3 Nate Graham 2022-03-22 02:06:43 UTC
This was fixed in a later KWin version.