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
21.09k stars 882 forks source link

Weird Lag when dragging floating windows #1127

Closed System-x64 closed 1 year ago

System-x64 commented 1 year ago

on setting misc{animate_manual_resizes} to true, the window gets a weird lag or idk what to call it

https://user-images.githubusercontent.com/90208727/204487118-c616074f-5d5d-4f64-9a72-7112c315d42d.mp4

Is their anyway we could fix it cuz i really love animated resize but i hate this lag thing

vaxerski commented 1 year ago

verify that fact with hyprctl version

NextWork123 commented 1 year ago

@vaxerski done. i think we compiled on that commit #51ce3dd immagine

vaxerski commented 1 year ago

huh. Can anyone else confirm it's still an issue?

GrabbenD commented 1 year ago

fixed with 64f35c0

Most impressive that you managed to find this edge case, well done :)

huh. Can anyone else confirm it's still an issue?

I tried your fix https://github.com/hyprwm/Hyprland/commit/64f35c0e3190f3b56a1c17e81c775966bd0a2251 and I removed debug:damage_tracking from my config. Here's my observations:

With OBS and wlrobs plugin I'm able to actually record this issue! Here's a demo (all stuttering/choppiness in the video is what's actually happening on the screen):

https://user-images.githubusercontent.com/45666572/222845057-5a72b845-f8e3-4a7a-95c4-057ee8131256.mp4


Can you (without the damage_tracking opt changed now, you can remove it) turn on debug:damage_blink (warning: epilepsy) and see whether if you move the window quickly the pink highlight follows it correctly?

I jumped a few commits forward to https://github.com/hyprwm/Hyprland/commit/fe007fd36a050103c7953bf5ba68d6ba7187b6e1 and enabled debug:damage_blink (while debug:damage_tracking is still removed). Had to keep it super short due to file size limit. Also, for some reason the damage_blink disappears towards the end of the video, this is a bug in OBS:

https://user-images.githubusercontent.com/45666572/222847399-6ba82262-f984-4489-9c37-9bae18e5214e.mp4


Here's my config file, it's mostly default for testing purposes:

hyprland.conf spoiler ``` # https://wiki.hyprland.org/ autogenerated = 0 # hyprctl monitors monitor = DP-3, 3840x1600@119.982002, 0x0,1, bitdepth, 10 # Cursor exec=hyprctl setcursor Bibata-Modern-Classic 32 # See https://wiki.hyprland.org/Configuring/Keywords/ for more # Execute your favorite apps at launch # exec-once = waybar & hyprpaper & firefox & brave & ironbar # Source a file (multi-file configs) # source = ~/.config/hypr/myColors.conf ### BUG TESTING ### misc { animate_manual_resizes = 1 animate_mouse_windowdragging = 1 } debug { #damage_tracking = 1 damage_blink = 1 } ### BUG TESTING ### # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ input { # Keyboard kb_layout = se kb_model = pc105 # Mouse follow_mouse = 1 touchpad { natural_scroll = no } sensitivity = 0 # -1.0 - 1.0, 0 means no modification. } general { # See https://wiki.hyprland.org/Configuring/Variables/ for more gaps_in = 50 gaps_out = 50 border_size = 1 col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg col.inactive_border = rgba(595959aa) layout = dwindle } decoration { # See https://wiki.hyprland.org/Configuring/Variables/ for more rounding = 5 blur = yes blur_size = 3 blur_passes = 1 blur_new_optimizations = on drop_shadow = yes shadow_range = 4 shadow_render_power = 3 col.shadow = rgba(1a1a1aee) } animations { enabled = yes # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more bezier = myBezier, 0.05, 0.9, 0.1, 1.05 animation = windows, 1, 7, myBezier animation = windowsOut, 1, 7, default, popin 80% animation = border, 1, 10, default animation = borderangle, 1, 8, default animation = fade, 1, 7, default animation = workspaces, 1, 6, default } dwindle { # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below preserve_split = yes # you probably want this } master { # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more new_is_master = true } gestures { # See https://wiki.hyprland.org/Configuring/Variables/ for more workspace_swipe = off } # Example per-device config # See https://wiki.hyprland.org/Configuring/Keywords/#executing for more device:epic mouse V1 { sensitivity = -0.5 } # Example windowrule v1 # windowrule = float, ^(kitty)$ # Example windowrule v2 # windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more # See https://wiki.hyprland.org/Configuring/Keywords/ for more $mainMod = SUPER # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more bind = $mainMod, T, exec, foot bind = $mainMod, C, killactive, bind = $mainMod, M, exit, bind = $mainMod, R, exec, dolphin bind = $mainMod, V, togglefloating, bind = $mainMod, B, exec, brave bind = $mainMod, I, exec, firefox bind = $mainMod, E, exec, codium bind = $mainMod, P, pseudo, # dwindle bind = $mainMod, J, togglesplit, # dwindle bind = $mainMod, L, exec, wayshot # Move focus with mainMod + arrow keys bind = $mainMod, left, movefocus, l bind = $mainMod, right, movefocus, r bind = $mainMod, up, movefocus, u bind = $mainMod, down, movefocus, d # Switch workspaces with mainMod + [0-9] bind = $mainMod, 1, workspace, 1 bind = $mainMod, 2, workspace, 2 bind = $mainMod, 3, workspace, 3 bind = $mainMod, 4, workspace, 4 bind = $mainMod, 5, workspace, 5 bind = $mainMod, 6, workspace, 6 bind = $mainMod, 7, workspace, 7 bind = $mainMod, 8, workspace, 8 bind = $mainMod, 9, workspace, 9 bind = $mainMod, 0, workspace, 10 # Move active window to a workspace with mainMod + SHIFT + [0-9] bind = $mainMod SHIFT, 1, movetoworkspace, 1 bind = $mainMod SHIFT, 2, movetoworkspace, 2 bind = $mainMod SHIFT, 3, movetoworkspace, 3 bind = $mainMod SHIFT, 4, movetoworkspace, 4 bind = $mainMod SHIFT, 5, movetoworkspace, 5 bind = $mainMod SHIFT, 6, movetoworkspace, 6 bind = $mainMod SHIFT, 7, movetoworkspace, 7 bind = $mainMod SHIFT, 8, movetoworkspace, 8 bind = $mainMod SHIFT, 9, movetoworkspace, 9 bind = $mainMod SHIFT, 0, movetoworkspace, 10 # Scroll through existing workspaces with mainMod + scroll bind = $mainMod, mouse_down, workspace, e+1 bind = $mainMod, mouse_up, workspace, e-1 # Move/resize windows with mainMod + LMB/RMB and dragging bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow ```
vaxerski commented 1 year ago

If I now disable misc:animate_mouse_windowdragging it feels even smoother than before so that's a win.

placebo, didnt have anything to do with this

It didn't resolve the original issue.

reeee it did for me and now I can't repro againnnnn

vaxerski commented 1 year ago

https://user-images.githubusercontent.com/43317083/222852852-9859e697-1138-45e0-be9f-ea2f934fb14b.mp4

your exact config.

:woe:

vaxerski commented 1 year ago

Curves are perfectly fine now (1200 samples)

can't see what's going wrong.

20230303_23h24m54s_grim 20230303_23h23m46s_grim

GrabbenD commented 1 year ago

placebo, didnt have anything to do with this

My eyes are playing tricks on me after playing around with this for too long 😅

reeee it did for me and now I can't repro againnnnn

Flying blind 💀

I tried various monitor configurations to see if that could be the issue but nope (also, just one monitor is plugged in to DP-3 while trying this):

  1. 10 bit + default scaling (0x0,1) with:

    • 3840x1600@119.982002 (hyprctl monitors recommendation)
    • 3840x1600@119
    • 3840x1600@120
  2. default scaling (0x0,1) with:

    • 3840x1600@119.982002
    • 3840x1600@119
    • 3840x1600@120
  3. I also tried a different 8bit monitor. Default scaling (0x0,1):

    • 1920x1080@60

Let us know if there's anything that we can try!

GrabbenD commented 1 year ago

Also confirmed that this doesn't fix the issue either:

misc {
    vfr = 0
}
vaxerski commented 1 year ago

Flying blind :skull:

wat

I tried various monitor configurations to see if that could be the issue but nope

turn on the debug overlay and check the var on animation ticking - if it's not higher than your avg frametime, it should be fine.

curves we know are fine

you say DT on monitor solves the issue partially - frame scheduling is off? but then vfr should fix that

that leaves damage tracking to be the culprit, but if that was the case we'd see "tearing"-ish artifacts and furthermore that should then affect more than just resizing manually but all animations. Besides, it should be reproducible.

wtf.

vaxerski commented 1 year ago

patch.txt

@GrabbenD try this patch.

edit: oopsie, this: patch.txt

Estebiu commented 1 year ago

It seems to be gone. The animations still aren't as smooth as they could be, tho.

vaxerski commented 1 year ago

Nice. I accidentally committed that patch yesterday. Can anyone else test if the stuttering still persists? If like 3 people say it's fixed I'll close.

NextWork123 commented 1 year ago

i can confirm, is fixed thanks.