hyprwm / Hyprland

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

regression: fractional scaling breaks rendering #6552

Open fruzitent opened 2 weeks ago

fruzitent commented 2 weeks ago

Bug or Regression?

Regression

System Info and Version

System/Version info ```sh Hyprland, built from branch at commit d724556b7ece61a5ff4eb764e6f47ec8089439bf (input: fix virtual devices not updating capabilities (6366)). Date: Sat Jun 8 18:15:57 2024 Tag: v0.40.0-175-gd724556b, commits: 4781 flags: (if any) System Information: System name: Linux Node name: asus-m515 Release: 6.9.4-arch1-1 Version: #1 SMP PREEMPT_DYNAMIC Wed, 12 Jun 2024 20:17:17 +0000 GPU information: 03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Lucienne [1002:164c] (rev c1) (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: ======Config-Start====== Config File: /home/fruzitent/.config/hypr/hyprland.conf: Read Succeeded # @help: https://wiki.hyprland.org/Configuring/Configuring-Hyprland exec-once = systemctl --user start "xdg-desktop-autostart.target" exec-once = hypridle # https://github.com/hyprwm/hyprland-wiki/pull/282 monitor = , preferred, auto, 0.75 animations { enabled = true bezier = myBezier, 0.05, 0.9, 0.1, 1.05 animation = border, 1, 10, default animation = borderangle, 1, 8, default animation = fade, 1, 7, default animation = windowsOut, 1, 7, default, popin 80% animation = workspaces, 1, 6, default animation = windows, 1, 7, myBezier } decoration { rounding = 0 blur { enabled = true passes = 1 size = 3 vibrancy = 0.1696 } active_opacity = 1.0 col.shadow = rgba(1a1a1aee) drop_shadow = true inactive_opacity = 1.0 shadow_range = 4 shadow_render_power = 3 } dwindle { no_gaps_when_only = false preserve_split = true pseudotile = true } general { border_size = 2 col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg col.inactive_border = rgba(595959aa) gaps_in = 0 gaps_out = 0 layout = dwindle allow_tearing = false # cursor_inactive_timeout = 5 resize_on_border = false } gestures { workspace_swipe = false } master { new_is_master = true } misc { disable_hyprland_logo = true disable_splash_rendering = true focus_on_activate = false force_default_wallpaper = -1 } xwayland { use_nearest_neighbor = false force_zero_scaling = true } source = $XDG_CONFIG_HOME/hypr/hyprland.conf.d/* Config File: /home/fruzitent/.config/hypr/hyprland.conf.d/50-keybindings.conf: Read Succeeded $mod = super $down = j $left = h $right = l $up = k binde = $mod, $down, movefocus, d binde = $mod, $left, movefocus, l binde = $mod, $right, movefocus, r binde = $mod, $up, movefocus, u binde = $mod, down, movefocus, d binde = $mod, left, movefocus, l binde = $mod, right, movefocus, r binde = $mod, up, movefocus, u binde = alt, tab, cyclenext binde = alt, tab, bringactivetotop binde = $mod shift, $down, movewindow, d binde = $mod shift, $left, movewindow, l binde = $mod shift, $right, movewindow, r binde = $mod shift, $up, movewindow, u binde = $mod shift, down, movewindow, d binde = $mod shift, left, movewindow, l binde = $mod shift, right, movewindow, r binde = $mod shift, up, movewindow, u bind = $mod, 1, workspace, 1 bind = $mod, 2, workspace, 2 bind = $mod, 3, workspace, 3 bind = $mod, 4, workspace, 4 bind = $mod, 5, workspace, 5 bind = $mod, 6, workspace, 6 bind = $mod, 7, workspace, 7 bind = $mod, 8, workspace, 8 bind = $mod, 9, workspace, 9 bind = $mod, 0, workspace, 10 bind = $mod shift, 1, movetoworkspace, 1 bind = $mod shift, 2, movetoworkspace, 2 bind = $mod shift, 3, movetoworkspace, 3 bind = $mod shift, 4, movetoworkspace, 4 bind = $mod shift, 5, movetoworkspace, 5 bind = $mod shift, 6, movetoworkspace, 6 bind = $mod shift, 7, movetoworkspace, 7 bind = $mod shift, 8, movetoworkspace, 8 bind = $mod shift, 9, movetoworkspace, 9 bind = $mod shift, 0, movetoworkspace, 10 bind = $mod, grave, togglespecialworkspace, scratchpad bind = $mod shift, grave, movetoworkspace, special:scratchpad submap = resize binde = , $left, resizeactive, -10 0 binde = , $down, resizeactive, 0 10 binde = , $up, resizeactive, 0 -10 binde = , $right, resizeactive, 10 0 binde = , left, resizeactive, -10 0 binde = , down, resizeactive, 0 10 binde = , up, resizeactive, 0 -10 binde = , right, resizeactive, 10 0 bind = , escape, submap, reset bind = , return, submap, reset submap = reset bind = $mod, r, submap, resize binde = , XF86AudioLowerVolume, exec, wpctl set-volume --limit 0.0 @DEFAULT_AUDIO_SINK@ 5%- && notify-send -r 9999 --urgency=low " $(wpctl get-volume @DEFAULT_AUDIO_SINK@)" binde = , XF86AudioRaiseVolume, exec, wpctl set-volume --limit 2.0 @DEFAULT_AUDIO_SINK@ 5%+ && notify-send -r 9999 --urgency=low " $(wpctl get-volume @DEFAULT_AUDIO_SINK@)" bindl = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && notify-send -r 9999 --urgency=low " $(wpctl get-volume @DEFAULT_AUDIO_SINK@)" bind = , XF86AudioNext, exec, playerctl next bind = , XF86AudioPlay, exec, playerctl play-pause bind = , XF86AudioPrev, exec, playerctl previous bind = $mod ctrl, left, exec, playerctl previous bind = $mod ctrl, right, exec, playerctl next binde = , XF86MonBrightnessDown, exec, brightnessctl set 5%- && notify-send -r 9999 --urgency=low "󰃠 Brightness: $((($(brightnessctl get) * 100) / $(brightnessctl max)))%" binde = , XF86MonBrightnessUp, exec, brightnessctl set 5%+ && notify-send -r 9999 --urgency=low "󰃠 Brightness: $((($(brightnessctl get) * 100) / $(brightnessctl max)))%" bind = , print, exec, grimblast --freeze -n copy area bind = $mod, print, exec, grimblast --freeze -n copy screen bind = $mod shift, e, exit bind = $mod, f, fullscreen bind = $mod shift, q, killactive bind = $mod, d, exec, rofi -show drun bind = $mod, e, exec, nautilus bind = $mod, return, exec, alacritty bind = $mod, v, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy bind = $mod, n, exec, dunstctl history | jq ".data[][].body.data | select(length > 0)" | rofi -dmenu | wl-copy bind = $mod shift, b, togglesplit bind = $mod shift, space, togglefloating bindm = $mod, mouse:272, movewindow bindm = $mod ctrl, mouse:272, resizewindow bindm = $mod, mouse:273, resizewindow bind = $mod, mouse_down, workspace, e+1 bind = $mod, mouse_up, workspace, e-1 Config File: /home/fruzitent/.config/hypr/hyprland.conf.d/50-libinput.conf: Read Succeeded input { kb_layout = us touchpad { natural_scroll = true } accel_profile = flat follow_mouse = 1 sensitivity = 0 repeat_delay = 200 repeat_rate = 75 } Config File: /home/fruzitent/.config/hypr/hyprland.conf.d/50-window_rules.conf: Read Succeeded windowrulev2 = suppressevent maximize, class:.* windowrulev2 = pin, title:^(xeyes)$ windowrulev2 = tile, title:^(Chatterino.*)$ # TODO: https://github.com/hyprwm/Hyprland/issues/2598 windowrulev2 = float, title:^((Picture[ -]in[ -][pP]icture)|(TelegramDesktop))$ windowrulev2 = pin, title:^((Picture[ -]in[ -][pP]icture)|(TelegramDesktop))$ # TODO: https://github.com/hyprwm/Hyprland/issues/2034 windowrulev2 = nofocus, class:^()$, title:^()$, floating:1, fullscreen:0, pinned:0, xwayland:1 ======Config-End======== ```

Description

If you use fractional scale and run your Spotify client in Wayland mode (due to a known UV bug) - it will turn black unless gpu acceleration is disabled since v0.41.0.

9994b73ad0af5c9ba5fc4058234cea77d0a1ddb1 is the first bad commit
commit 9994b73ad0af5c9ba5fc4058234cea77d0a1ddb1
Author: Vaxry <[vaxry@vaxry.net](mailto:vaxry@vaxry.net)>
Date:   Sat Jun 8 17:27:50 2024 +0200

    buffer: track asynchronous buffers and don't release them until unref

    synchronous buffers are read instantly and we can release them, but asynchronous ones have to be locked until they are unref'd from .current to avoid reading from a buffer after .release()

 src/protocols/core/Compositor.cpp | 16 ++++++++++++----
 src/protocols/core/Shm.cpp        |  4 ++++
 src/protocols/core/Shm.hpp        |  1 +
 src/protocols/types/Buffer.hpp    |  1 +
 src/protocols/types/DMABuffer.cpp |  4 ++++
 src/protocols/types/DMABuffer.hpp |  1 +
 6 files changed, 23 insertions(+), 4 deletions(-)

Related issues:

How to reproduce

$ spotify --enable-features=UseOzonePlatform --ozone-platform=wayland
$ spotify --enable-features=UseOzonePlatform --ozone-platform=wayland --disable-features=WaylandFractionalScaleV1
$ spotify --enable-features=UseOzonePlatform --ozone-platform=wayland --disable-features=WaylandFractionalScaleV1 --disable-gpu

Crash reports, logs, images, videos

image_2024-06-17_06-29-26 image

image_2024-06-17_06-29-27 image(1)

image_2024-06-17_06-29-28 image(2)

vaxerski commented 2 weeks ago

image I could not reproduce

is the commit linked a bisect?

vaxerski commented 2 weeks ago

oh, wait. Wayland. Got it.

vaxerski commented 2 weeks ago

image still looks fine

vaxerski commented 2 weeks ago

it only happens when you disable fs-v1 support on my end, but why would you do that? Furthermore chromium itself works, so I am unsure.

fruzitent commented 2 weeks ago

image still looks fine

fractional scaling is the turning thing, at least in testing I've done as described in OP

fruzitent commented 2 weeks ago

it only happens when you disable fs-v1 support on my end, but why would you do that? Furthermore chromium itself works, so I am unsure.

because if you don't then window UV is the wrong size and it becomes unusable, unless I return to 1.0x monitor scale

vaxerski commented 2 weeks ago

nono, if you disable fsv1 support it will turn black. Furthermore, chromium itself won't do that, only spotify. Is that really a Hyprland bug then? Or is it just a peculiar dupe of 1462?

fruzitent commented 2 weeks ago

i provided screenshots for latest sway 1.9 where it works and bisected hyprland from 0.40.0 (where it works) to 0.41.0 (where it doesn't) its definitely hyprland thing unless its something in the area of just stars that are not aligning

vaxerski commented 2 weeks ago

is the commit you provided the bisect result? Then that is a peculiar one.

fruzitent commented 2 weeks ago

chromium itself won't do that, only spotify

I also just tested discord-electron (unpacked) and vscode and got the same result, they all fail to render their UI when --disable-features=WaylandFractionalScaleV1 is used (a temporary fix for #1462, the reason for using this flag in the first place), but adding --disable-gpu (a temporary fix for #6552 due to changes in v0.41.0 on top of the already broken #1462) negates that and they work as excepted.

fruzitent commented 2 weeks ago

is the commit you provided the bisect result? Then that is a peculiar one.

yes

fruzitent@asus-m515 ~> hyprctl version
Hyprland, built from branch  at commit 9994b73ad0af5c9ba5fc4058234cea77d0a1ddb1  (buffer: track asynchronous buffers and don't release them until unref).
Date: Sat Jun 8 18:27:56 2024
Tag: v0.40.0-176-g9994b73a, commits: 4782

flags: (if any)