Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dmabuf capture region has incorrect size when using weird scaling settings #4991

Open
russelltg opened this issue Mar 6, 2024 · 0 comments
Labels
bug Something isn't working stale Not much going on

Comments

@russelltg
Copy link
Contributor

russelltg commented Mar 6, 2024

Hyprland Version

System/Version info
Hyprland, built from branch main at commit fb87e332c59ce386a095b3e81bb1abbcc9cc3e5c dirty (input: fix window move stutter by introducing additional checks for low-hz monitors (4553)).
Date: Tue Mar 5 17:15:44 2024
Tag: v0.36.0-59-gfb87e332

flags: (if any)


System Information:
System name: Linux
Node name: russell-shotover-arch
Release: 6.7.8-arch1-1
Version: #1 SMP PREEMPT_DYNAMIC Sun, 03 Mar 2024 00:30:36 +0000


GPU information:
00:02.0 VGA compatible controller [0300]: Intel Corporation TigerLake-H GT1 [UHD Graphics] [8086:9a60] (rev 01) (prog-if 00 [VGA controller])


os-release: NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo


plugins:

Bug or Regression?

Bug

Description

Reported initially at russelltg/wl-screenrec#64, but reproduced by me as well

When I set scaling to 2.4, on both 4k and 1920x1200 displays, when I ask for dmabuf screen capture, the DMABUF region is two pixels too small in both directions. This is visible in the vvv.txt attached to russelltg/wl-screenrec#41 (comment):

zwlr-screencopy-frame event: ObjectId(zwlr_screencopy_frame_v1@11, 56) Buffer { format: Value(Xbgr8888), width: 3838, height: 2158, stride: 15352 }
zwlr-screencopy-frame event: ObjectId(zwlr_screencopy_frame_v1@11, 56) LinuxDmabuf { format: 875713112, width: 3838, height: 2158 }

This then later causes issue in my application because I crop it to regions calculated from scaling, so it causes error when the copped region is larger than the full screen!

Works in sway.

How to reproduce

Set scaling to 2.4

Do dmabuf capture. A way to do this is with my screenrecorder. -vvv logs all wayland events.

Crash reports, logs, images, videos

No response

@russelltg russelltg added the bug Something isn't working label Mar 6, 2024
@russelltg russelltg changed the title Dmabuf capture reports the incorrect size when using weird scaling settings Dmabuf capture region has incorrect size when using weird scaling settings Mar 6, 2024
@vaxerski vaxerski added the stale Not much going on label May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale Not much going on
Projects
None yet
Development

No branches or pull requests

2 participants