[Spectacle] [Bug 524305] New: Window Under Cursor captures Plasma desktop as fully transparent with fractional scaling on Wayland

"Simon Zevnik" <[email protected]>
Newsgroups gmane.comp.kde.devel.bugs
Message-ID <[email protected]/>
https://bugs.kde.org/show_bug.cgi?id=524305

            Bug ID: 524305
           Summary: Window Under Cursor captures Plasma desktop as fully
                    transparent with fractional scaling on Wayland
    Classification: Applications
           Product: Spectacle
      Version First unspecified
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: General
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: ---

**Summary**

`Window Under Cursor captures Plasma desktop as fully transparent with
fractional scaling on Wayland`

**Description**

### System information

* Fedora Linux 44 KDE Plasma Desktop Edition
* KDE Plasma: 6.7.4
* KWin: 6.7.4
* Spectacle: 6.7.4
* KDE Frameworks: 6.29.0
* Qt: 6.11.1
* Kernel: 7.1.8-200.fc44.x86_64
* Session: Wayland
* Graphics backend: OpenGL / DRM
* GPU: AMD Radeon RX 6800 XT (Navi 21)
* Kernel driver: amdgpu
* Mesa: 26.1.6
* Display configuration: single 2560×1440 monitor
* Fractional scaling tested: 120% and other values above 100%
* 100% scaling works correctly

### Problem

When fractional display scaling is enabled, Spectacle's **Window Under Cursor**
mode cannot correctly capture the Plasma desktop.

If I place the cursor over an empty area of the Plasma desktop and take a
screenshot, the resulting PNG appears completely black in an image viewer.

Further analysis shows that the PNG is actually **fully transparent**, not
simply black. The entire image contains RGBA values equivalent to:

`0, 0, 0, 0`

The problem occurs only when display scaling is above 100%.

At exactly **100% scaling**, the same capture method works correctly and
captures the Plasma desktop normally.

### Steps to reproduce

1. Start a KDE Plasma Wayland session.
2. Use a single 2560×1440 monitor.
3. Set display scaling to a fractional value, for example **120%**.
4. Open Spectacle.
5. Select **Window Under Cursor**.
6. Move the mouse cursor over an empty area of the Plasma desktop, not over an
application window, panel or widget.
7. Take the screenshot.
8. Open the resulting PNG.

### Actual result

The Plasma desktop screenshot is completely transparent.

Technical analysis of affected screenshots shows:

* RGBA image
* RGB values are all zero
* Alpha values are all zero
* the whole image contains effectively only one transparent pixel value

Normal application windows are captured correctly.

### Expected result

Spectacle should capture the visible Plasma desktop, including the wallpaper
and desktop contents, in the same way it does at 100% scaling.

### Important comparison tests

I performed several tests to isolate the issue.

**100% scaling:**

* Window Under Cursor → Plasma desktop: **WORKS**

**Fractional scaling, e.g. 120%:**

* Window Under Cursor → Plasma desktop: **FAILS — fully transparent PNG**
* Current Screen → **WORKS**
* Normal application window → **WORKS**

The Current Screen capture at fractional scaling produces a normal, fully
opaque 2560×1440 screenshot.

This suggests that the final composited screen output is correct and the
problem is specifically related to capturing the Plasma desktop surface/window.

### Clean-user test

I also created a completely new user account to rule out my existing Plasma
configuration.

With the clean user:

* at 100% scaling, desktop capture works;
* after changing the clean user to fractional scaling, the desktop capture
problem appears.

Therefore the problem does not appear to be caused by my existing Plasma
desktop configuration.

### Other troubleshooting performed

I also tested the following:

* rebooted the entire computer;
* updated Fedora/KDE packages;
* removed a custom Plasma widget from the desktop;
* tested with a clean Plasma user profile;
* verified that normal application screenshots work;
* verified that Current Screen capture works;
* checked KWin, Spectacle, portal and PipeWire logs;
* checked AMDGPU/DRM logs.

The issue remains reproducible with fractional scaling.

I did not find:

* GPU resets;
* AMDGPU hangs;
* DMABUF errors;
* framebuffer errors;
* PipeWire failures;
* Spectacle crashes;
* KWin screenshot errors;
* damaged relevant package files.

### Additional observation

KWin exposes separate screenshot methods such as CaptureWindow, CaptureScreen
and CaptureWorkspace.

Since:

* normal window capture works;
* Current Screen works;
* desktop capture fails only with fractional scaling;

this may be related to how the Plasma desktop surface is represented or
exported through the window/surface screenshot path when logical and physical
screen dimensions differ.

For example, at 120% scaling my 2560×1440 physical display corresponds to a
logical Plasma geometry of approximately 2133×1200.

I suspect the Plasma desktop surface is being captured as a fully transparent
surface instead of the final composited desktop background when fractional
scaling is active.

### Reproducibility

**Always reproducible on my system.**

100% scale → works
Fractional scale >100% → fails

-- 
You are receiving this mail because:
You are watching all bug changes.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.