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

Fractional scaling does not work on Hyprland #64

Open
hholst80 opened this issue Feb 29, 2024 · 5 comments
Open

Fractional scaling does not work on Hyprland #64

hholst80 opened this issue Feb 29, 2024 · 5 comments
Labels
upstream Blocked on upstream issues

Comments

@hholst80
Copy link
Contributor

hholst80 commented Feb 29, 2024

I have a machine where I have not tried to run wl-screenrec before. Of course I managed to dig out problems. ;-)

Git sha d55f88d

[I] root@goblin ~/Apps/wl-screenrec (main) [101]
# vainfo
Trying display: wayland
libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib64/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.20 (libva 2.20.1)
vainfo: Driver version: Mesa Gallium driver 23.3.1 for AMD Radeon RX 6400 (radeonsi, navi24, LLVM 17.0.6, DRM 3.57, 6.7.5-200.fc39.x86_64)
vainfo: Supported profile and entrypoints
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
[I] root@goblin ~/Apps/wl-screenrec (main)
#
[I] root@goblin ~/Apps/wl-screenrec (main) [101]
# wl-screenrec -vvv
Using output DP-1
[file @ 0x55749af7c300] Setting default whitelist 'file,crypto,data'
hw flag is specified, but there's no known vaapi codec for MPEG4. Using a generic encoder...
Opening libva device from DRM device /dev/dri/renderD128
[AVHWDeviceContext @ 0x55749af7f040] libva: VA-API version 1.20.0
[AVHWDeviceContext @ 0x55749af7f040] libva: Trying to open /usr/lib64/dri/radeonsi_drv_video.so
[AVHWDeviceContext @ 0x55749af7f040] libva: Found init function __vaDriverInit_1_20
[AVHWDeviceContext @ 0x55749af7f040] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x55749af7f040] Initialised VAAPI connection: version 1.20
[AVHWDeviceContext @ 0x55749af7f040] Format 0x3231564e -> nv12.
[AVHWDeviceContext @ 0x55749af7f040] Format 0x30313050 -> p010le.
[AVHWDeviceContext @ 0x55749af7f040] Format 0x36313050 -> unknown.
[AVHWDeviceContext @ 0x55749af7f040] Format 0x30323449 -> yuv420p.
[AVHWDeviceContext @ 0x55749af7f040] Format 0x32315659 -> yuv420p.
[AVHWDeviceContext @ 0x55749af7f040] Format 0x56595559 -> unknown.
[AVHWDeviceContext @ 0x55749af7f040] Format 0x32595559 -> yuyv422.
[AVHWDeviceContext @ 0x55749af7f040] Format 0x59565955 -> uyvy422.
[AVHWDeviceContext @ 0x55749af7f040] Format 0x30303859 -> gray.
[AVHWDeviceContext @ 0x55749af7f040] Format 0x50343434 -> yuv444p.
[AVHWDeviceContext @ 0x55749af7f040] Format 0x50424752 -> unknown.
[AVHWDeviceContext @ 0x55749af7f040] Format 0x41524742 -> bgra.
[AVHWDeviceContext @ 0x55749af7f040] Format 0x41424752 -> rgba.
[AVHWDeviceContext @ 0x55749af7f040] Format 0x42475241 -> argb.
[AVHWDeviceContext @ 0x55749af7f040] Format 0x58524742 -> bgr0.
[AVHWDeviceContext @ 0x55749af7f040] Format 0x58424752 -> rgb0.
[AVHWDeviceContext @ 0x55749af7f040] VAAPI driver: Mesa Gallium driver 23.3.1 for AMD Radeon RX 6400 (radeonsi, navi24, LLVM 17.0.6, DRM 3.57, 6.7.5-200.fc39.x86_64).
[AVHWDeviceContext @ 0x55749af7f040] Driver not found in known nonstandard list, using standard behaviour.
[AVHWFramesContext @ 0x55749b174740] Created surface 0x1.
[AVHWFramesContext @ 0x55749b174740] Direct mapping possible.
[AVHWFramesContext @ 0x55749b174740] Created surface 0x2.
[AVHWFramesContext @ 0x55749b174740] Created surface 0x3.
[AVHWFramesContext @ 0x55749b174740] Created surface 0x4.
[AVHWFramesContext @ 0x55749b174740] Created surface 0x5.
detected 32 logical cores
[in @ 0x55749b1940c0] Setting 'video_size' to value '2840x2160'
[in @ 0x55749b1940c0] Setting 'pix_fmt' to value '44'
[in @ 0x55749b1940c0] Setting 'time_base' to value '1/1000000000'
[in @ 0x55749b1940c0] w:2840 h:2160 pixfmt:vaapi tb:1/1000000000 fr:0/1 sar:0/1
[AVFilterGraph @ 0x55749b1a94c0] Setting 'out_w' to value '3840'
[AVFilterGraph @ 0x55749b1a94c0] Setting 'out_h' to value '2160'
[AVFilterGraph @ 0x55749b1a94c0] Setting 'x' to value '0'
[AVFilterGraph @ 0x55749b1a94c0] Setting 'y' to value '0'
[AVFilterGraph @ 0x55749b1a94c0] Setting 'exact' to value '1'
[AVFilterGraph @ 0x55749b1a94c0] Setting 'format' to value 'yuv420p'
[AVFilterGraph @ 0x55749b1a94c0] Setting 'w' to value '3840'
[AVFilterGraph @ 0x55749b1a94c0] Setting 'h' to value '2160'
[AVFilterGraph @ 0x55749b1a94c0] query_formats: 5 queried, 4 merged, 0 already done, 0 delayed
[Parsed_crop_0 @ 0x55749b1f8f40] w:3838 h:2158 sar:0/1 -> w:3840 h:2160 sar:0/1
[Parsed_crop_0 @ 0x55749b1f8f40] Invalid too big or non positive size for width '3840' or height '2160'
[Parsed_crop_0 @ 0x55749b1f8f40] Failed to configure input pad on Parsed_crop_0
thread 'main' panicked at src/main.rs:1706:18:
called `Result::unwrap()` on an `Err` value: ffmpeg::Error(22: Invalid argument)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[AVIOContext @ 0x55749af88a80] Statistics: 0 bytes written, 0 seeks, 0 writeouts
[I] root@goblin ~/Apps/wl-screenrec (main) [101]
#
@russelltg
Copy link
Owner

Could you run this again after the latest commit? It adds some extra debug logging that may be helpful. With -vvv again, thanks

@hholst80
Copy link
Contributor Author

hholst80 commented Mar 1, 2024

I'll have a got at it tomorrow Saturday.

@hholst80
Copy link
Contributor Author

hholst80 commented Mar 1, 2024

I suspect that this is due to a scaling of 2.4 in Hyprland.
Will confirm tomorrow.
Meanwhile, -vvv from another machine that also uses 2.4 scaling, and got the same error.

#41 (comment)

@russelltg
Copy link
Owner

I'm guessing that 03100b0 regressed here? (ie, does 2158d9e work?)

@russelltg
Copy link
Owner

Reported upstream at hyprwm/Hyprland#4991.

It's possible I should handle this nicer by clamping the size...but it's definitely a Hyprland bug. Work in sway.

@russelltg russelltg added the upstream Blocked on upstream issues label Mar 6, 2024
@hholst80 hholst80 changed the title 4k resolution too big? Invalid too big or non positive size for width '3840' or height '2160' Fractional scaling does not work on Hyprland Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream Blocked on upstream issues
Projects
None yet
Development

No branches or pull requests

2 participants