Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

Weird Lag when dragging floating windows

Open System-x64 opened this issue 3 years ago • 16 comments

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

System-x64 avatar Nov 29 '22 09:11 System-x64

only happens for a few people which does not include me, so I don't know what is the root cause.

vaxerski avatar Nov 29 '22 09:11 vaxerski

nvm

System-x64 avatar Nov 29 '22 09:11 System-x64

same, happen to me too

EvilBoi123 avatar Nov 29 '22 15:11 EvilBoi123

Me too, I noticed this happens when I enable animations. Otherwise it's fine.

ad-on-is avatar Nov 30 '22 19:11 ad-on-is

can someone share a minimal reproducible config?

vaxerski avatar Nov 30 '22 22:11 vaxerski

hyprland.txt

System-x64 avatar Dec 01 '22 06:12 System-x64

Me too, I noticed this happens when I enable animations. Otherwise it's fine.

Yeah...but turning animations off also removes this resize animation...maybe thats why it works?

System-x64 avatar Dec 01 '22 06:12 System-x64

it's something to do with animate_manual_resize only

System-x64 avatar Dec 01 '22 06:12 System-x64

@vaxerski I found the possible cause of this issue, while looking through my config file, I noticed I had a separate windowsMove animation with its own separate bezier curve, I removed the windowsMove line and Voila! It is working as expected, my guess is that this lag issue only persists when we explicitly set a separate beizier curve for windowsMove?

System-x64 avatar Dec 09 '22 14:12 System-x64

Is it possible to set this windowsMove thing to only apply to keybinds instead of both key and mouse binds? I suppose this would fix this issue without having to sacrifice my bezier style

System-x64 avatar Dec 09 '22 14:12 System-x64

thanks for identifying. I'll look into this.

Is it possible to set this windowsMove thing to only apply to keybinds instead of both key and mouse binds? I suppose this would fix this issue without having to sacrifice my bezier style

No.

vaxerski avatar Dec 09 '22 14:12 vaxerski

check with b9812f8bc0f372875af8c332e4537fdbf2b99c23

vaxerski avatar Dec 09 '22 15:12 vaxerski

The lag does seem to get better (it's more responsive) but it's not completely gone, the best bet for now is to not put bezier for windowsMove all together

System-x64 avatar Dec 09 '22 16:12 System-x64

Is it possible to set this windowsMove thing to only apply to keybinds instead of both key and mouse binds? I suppose this would fix this issue without having to sacrifice my bezier style

removing windowsMove did not solve the issue for me

ad-on-is avatar Dec 12 '22 18:12 ad-on-is

Can you share me your config? @ad-on-is

System-x64 avatar Dec 13 '22 02:12 System-x64

Can you share me your config? @ad-on-is

Sure: https://pastebin.com/GCYkbCuW

ad-on-is avatar Dec 13 '22 07:12 ad-on-is

~~@vaxerski sorry for the ping, but I have a likely cause for this, animate manual resizes = true. At least that setting causes this exact issue on 3 different pcs~~ long day sorry.

DashieTM avatar Feb 27 '23 22:02 DashieTM

umm thats exactly what the reporter said... image

it's just that I can't repro it. Been always using it on true and nothing's amiss

vaxerski avatar Feb 27 '23 23:02 vaxerski

So I tried to build version 14, but I have no idea how to get the compatible wlroots for that. Either way I remember this starting to happen between version 14 to 16. I can't pinpoint it though sadly.

DashieTM avatar Feb 28 '23 00:02 DashieTM

So I tried to build version 14, but I have no idea how to get the compatible wlroots for that.

git reset --hard <hash> --recurse-submodules && sudo make install ?

vaxerski avatar Feb 28 '23 00:02 vaxerski

Ah thanks for the info, personally never used submodules with git, that's why I didn't understand that part, in the meantime I tried your binaries, and the problem starts at version 17. Tomorrow I might be able to be pinpoint when it started.

DashieTM avatar Feb 28 '23 01:02 DashieTM

thank you. git bisect may come in handy.

vaxerski avatar Feb 28 '23 01:02 vaxerski

Found it, this commit creates the bug: https://github.com/hyprwm/Hyprland/commit/8ffd244ef6cca76af51e283355ae048557510349

DashieTM avatar Feb 28 '23 07:02 DashieTM

well that's anticlimactic. That's the commit that introduced the animations on dragging floating windows.

vaxerski avatar Feb 28 '23 11:02 vaxerski

I was also extremely surprised, and I still can't figure out why though. When I move the window extremely slowly it works. But the moment I do it with a normal speed it has these small stops where it freezes. A brief guess would be a performance issue, but I doubt that an rx6600xt or a gtx 1070 wouldn't be good enough.

I guess my suggestion is to put this behind a different config flag, animate_mouse_windowdragging.

DashieTM avatar Feb 28 '23 11:02 DashieTM

I mean, it could also be your curve.

How it's currently animated is that whenever you move your window by 1 pixel or more, it restarts the animation.

My guess is that it's not lag, but the animation curve snapping back to the start.

Can you try with a linear curve? it's 0.5,0.5,0.5,0.5.

vaxerski avatar Feb 28 '23 11:02 vaxerski

Hmm, it doesn't make much of a difference, I guess there is always going to be a slight "delay" with animations, but it definitely doesn't feel right. Perhaps polling rate (and/or refreshrate etc ) might cause some issues here as well ? (I haven't checked how the tick is done)

DashieTM avatar Feb 28 '23 12:02 DashieTM

I added that config flag for now in a pr -> https://github.com/hyprwm/Hyprland/pull/1658, not necessarily a fix, but this allows users to still get manual resizes without floating window animations.

DashieTM avatar Feb 28 '23 14:02 DashieTM

you can't really fix it cuz it works as intended... #1658 merged

vaxerski avatar Feb 28 '23 20:02 vaxerski

I also suppose misc:vfr = false doesn't fix this right?

vaxerski avatar Mar 01 '23 09:03 vaxerski