SUMMARY Taking a screenshot through Portal returns an image file only containing the bottom left quarter of the screen in a 200% scaled Wayland session. STEPS TO REPRODUCE 1. Take a screenshot through the Portal interface. 2. Inspect the returned image file. OBSERVED RESULT The image file is 1440x900 pixels in size and only contains the bottom-left quarter. EXPECTED RESULT The image file should be 2880x1800 and contain all of the screen. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.26.1 KDE Frameworks Version: 5.99.0 Qt Version: 5.15.6 Kernel Version: 6.0.3-zen2-1-zen (64-bit) Graphics Platform: Wayland Processors: 16 × AMD Ryzen 7 PRO 6860Z with Radeon Graphics Memory: 30.1 GiB of RAM Graphics Processor: REMBRANDT ADDITIONAL INFORMATION kscreen-doctor -o: Output: 1 SDC eDP-1-unknown enabled connected primary Panel Modes: 0:2880x1800@60*! 1:1920x1200@60 2:1920x1080@60 3:1600x1200@60 4:1680x1050@60 5:1280x1024@60 6:1440x900@60 7:1280x800@60 8:1280x720@60 9:1024x768@60 10:800x600@60 11:640x480@60 12:2560x1600@60 13:2880x1620@60 14:1600x900@60 Geometry: 0,0 1440x900 Scale: 2 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown primary
With a 4k screen at 200% scale, I cannot reproduce this issue myself using the xdg-portal-test-kde testing app.
(In reply to Nate Graham from comment #1) > With a 4k screen at 200% scale, I cannot reproduce this issue myself using > the xdg-portal-test-kde testing app. Where can I find this app?
Never mind, I found it. But with this app I still get the exact same result.
In Plasma 5.26.90, taking a screenshot through xdg-portal-test-kde (either inside or outside flatpak) on a 3840x2160 200% screen gives me a picture of the whole screen but scaled down to 1080p. Is this the correct/intended behavior?
Created attachment 155857 [details] what I get I cannot reproduce, the image seems to be the correct resolution (that is on master, so please compare with 5.27 at least). I wonder if we could/should just be launching spectacle here, this looks a bit ridiculous...
Created attachment 155868 [details] The buggy screenshot This is what I have with xdg-desktop-portal-kde 5.26.90.
I see where the problem is. In your screenshot, the area is set to "Current Screen", which makes the portal call org.kde.kwin.Screenshot.screenshotScreen(fd, bool). Inside this method in KWin, the screenshot flag is initialized with ScreenShotNativeResolution, and the result buffer is scaled according to dpr. If the area is "Full Screen", the portal will call screenshotFullscreen(fd, bool), which does not have the native resolution flag, so the result buffer will be the same as the logical size.