hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
19.6k stars 826 forks source link

Scaling artifact: missing rows of pixels #4506

Open 1over137 opened 7 months ago

1over137 commented 7 months ago

Hyprland Version

System/Version info ```sh Hyprland, built from branch HEAD at commit babb9c07b045e21b5549cdcc3096d677e9db35b3 dirty (swipe: Prevent hiding current workspace when swiping (4417)). Date: Fri Jan 12 02:22:40 2024 Tag: v0.34.0-41-gbabb9c07 ```

Bug or Regression?

Bug

Description

Using fractional scaling (in this example, 1920x1200 laptop screen, 1.2x scale), there appears to be some visual artifacts involving one missing or extra row of pixels. I suspect this is a rounding error of some kind. Interesting, although I do not have a screenshot, this can also be observed in xwayland applications (vscode) despite xwayland_zero_scale being applied. Both of the examples I can capture involve exactly one missing row of pixels, but I've also seen examples of extra pixels (most prominently in firefox with fractional scaling support).

Examples

Alacritty (look at the row with power_now) 20240122-142952

Chromium 20240122-143432

I suspect this is related to https://github.com/hyprwm/Hyprland/issues/2985 in some way.

How to reproduce

  1. Set up fractional scaling
  2. Open an application with fractional scaling support (this seems much less reproducible on applications without wp-fractional-scale, like GTK3, but this could just be the downsampling blurring it out).
  3. Scroll around with text and look carefully at a row of abnormally tall/short text.

Crash reports, logs, images, videos

Not crashing

M4he commented 6 months ago

Is this always affecting the center pixel row for you (as in the pixel row exactly at the center of the window surface)?

I'm seeing stretched/duplicated pixel lines in VSCodium (v1.87.1) for the center pixel rows/columns both vertically and/or horizontally, depending on the actual width / height of the window (I guess it depends if the pixel count in the corresponding direction is even or odd or sth.).

I'm wondering whether this is related, an entirely separate issue or simply VSCodium doing a bad job at fractional scaling (my screen scaling is at 1.25).

vaxerski commented 6 months ago

it's not vsc's fault, it's unfortunately how scaling just works. I might look into this one day to force it to repeat the last lines instead of middle ones

M4he commented 6 months ago

it's not vsc's fault, it's unfortunately how scaling just works. I might look into this one day to force it to repeat the last lines instead of middle ones

Thank you for clarifying, appreciate it!