Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

animate_mouse_windowdragging mouse lagging/stuttering

Open thejch opened this issue 3 months ago • 11 comments

Hyprland Version

System/Version info
Hyprland, built from branch makepkg at commit fcd9d77b642c0cd45cae61cf10ed1924f2e7945b dirty (layout: improve initial size prediction for floating).
Date: Thu Mar 28 17:43:50 2024
Tag: v0.37.1-81-gfcd9d77b

Bug or Regression?

Bug

Description

Previously on this channel we had https://github.com/hyprwm/Hyprland/issues/5157 https://github.com/hyprwm/Hyprland/issues/4669 https://github.com/hyprwm/Hyprland/issues/4542 But this one seems like a slightly different issue (?) since it only happens when animate_mouse_windowdragging = true. and when it's not set to true it doesn't happen

How to reproduce

optional: 165hz monitor? (seems higher the refresh rate the worse it gets) launch default config open kitty run hyprctl keyword misc:animate_mouse_windowdragging true toggle kitty to float drag kitty around sometimes doesn't happen so try a few times if not able to reproduce

Crash reports, logs, images, videos

No response

thejch avatar Mar 29 '24 08:03 thejch

I can also reproduce this, though it happens on all of my monitors, with all windows, always. So steps to reproduce for me is;

  1. Set misc:animate_mouse_windowdragging to true
  2. Try to drag around any window
System/Version info
❯ hyprctl systeminfo
Hyprland, built from branch HEAD at commit 3875679755014997776e091ff8903acfb311dd2f  (props: bump ver to 0.38.0).
Date: Mon Apr 1 18:30:37 2024
Tag: v0.38.0

flags: (if any)


System Information:
System name: Linux
Node name: AirBlue
Release: 6.8.2-zen2-1-zen
Version: #1 ZEN SMP PREEMPT_DYNAMIC Thu, 28 Mar 2024 17:06:20 +0000


GPU information:
03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21 [Radeon RX 6950 XT] [1002:73a5] (rev c0) (prog-if 00 [VGA controller])
1a:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Raphael [1002:164e] (rev cb) (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:


~

And in case it's related to the 144hz monitor or the iGPU+dGPU combo;

Monitors
monitor=,preferred,auto,auto
monitor=DP-3, [email protected], 0x960, 1
monitor=HDMI-A-1, preferred, 1920x840, 1
monitor=DP-1, 2560x1440@144, 3840x180, 1
monitor=HDMI-A-2, 1920x1080@60, 6400x0, 1, transform, 3
monitor=HDMI-A-3, preferred, 7480x0, 1

ljoonal avatar Apr 05 '24 15:04 ljoonal

Greetings, and thank you for opening that issue and mentioning the other ones.

In my case, I have misc:animate_mouse_windowdragging to false. However, when set to false, dragging my windows around on my 120Hz monitor feels 60Hz-like. As a comparison, dragging a window inside a WINE virtual desktop feels buttery smooth.

I have recorded that short 120FPS video to showcase the issue; However, the video recording, whilst showing the discrepancy, does not show it nearly as much as I see it with my own eyes in real life, which is quite strange indeed.

https://github.com/hyprwm/Hyprland/assets/160250128/176b1715-755b-4941-8c61-fc491e4f4070

Setting misc:animate_mouse_windowdragging to true makes everything as smooth as expected, but with great delays to the dragging. I cannot remember if this issue was present in the past, for I have only begun semi-recently to use floating windows a bit more heavily.

Running on NixOS 23.11, but Hyprland is from the unstable branch, providing a much more recent version. NVIDIA GPU - I could test with my AMD iGPU, but it can barely handle 120Hz smoothly to begin with, so any lag here would probably be because of it and not whatever is going on here.

Atemo-C avatar Apr 09 '24 21:04 Atemo-C

single or multimon?

vaxerski avatar Apr 10 '24 16:04 vaxerski

happens on both single and multi monitors for me

thejch avatar Apr 10 '24 19:04 thejch

Single monitor, I do not currently have a second monitor to test with.

Atemo-C avatar Apr 10 '24 20:04 Atemo-C

odd cuz it aint happening to me

vaxerski avatar Apr 10 '24 21:04 vaxerski

Update

I do not know why I had not tested this before, but I was curious to see if the discrepancy in refresh rate/smoothness of dragged native windows would stay or not if I changed refresh rate.

*Note: All testing has been done with misc:animate_mouse_windowdragging set to false.


Refresh rates and their results

hyprctl monitors output

Monitor DP-1 (ID 0):
	[email protected] at 0x0
	description: Acer Technologies XV242Y TL1EE0018521
	make: Acer Technologies
	model: XV242Y
	serial: TL1EE0018521
	active workspace: 3 (3)
	special workspace: 0 ()
	reserved: 0 27 0 0
	scale: 1.00
	transform: 0
	focused: yes
	dpmsStatus: 1
	vrr: 0
	activelyTearing: false
	currentFormat: XRGB8888
	availableModes: [email protected] [email protected] [email protected] [email protected]
	[email protected] [email protected] [email protected] [email protected] [email protected]
	[email protected] [email protected] [email protected] [email protected] [email protected] 
	[email protected] [email protected] [email protected] [email protected] [email protected] 
	[email protected] [email protected] [email protected] [email protected] [email protected] 
	[email protected] [email protected] [email protected] [email protected] [email protected] 
	[email protected]

Resolutions of interest

[email protected]
[email protected]
[email protected]
[email protected]
[email protected] / [email protected]

165Hz

monitor = , 1920x1080@165, auto, 1 Window dragging is perfectly smooth.

144Hz

monitor = , 1920x1080@144, auto, 1 Window dragging is perfectly smooth.

120Hz

monitor = , 1920x1080@120, auto, 1 Window dragging is not smooth, but window dragging inside programs, such as in a WINE virtual desktop, it is perfectly smooth.

85Hz

monitor = , 1920x1080@85, auto, 1 Window dragging is only slightly less smooth than on a 90Hz monitor, barely noticeable, and expected in this case.

60Hz and 59Hz

monitor = , 1920x1080@60, auto, 1 Window dragging is as smooth as on my old 60Hz VGA monitor.


120Hz?

I have no idea why window dragging feels this way at 120Hz specifically. My monitor supports it just fine, too. I do not know how I would even approach debugging that. I will run my monitor at 144Hz for now, but I would like to run it at 120Hz as it is best for my uses.

Atemo-C avatar Apr 11 '24 19:04 Atemo-C

I can say at both 165hz and 60hz with misc:animate_mouse_windowdragging = true it's extremely laggy. But whenever i try to record a video with obs/wf-recorder etc it stops happening.

thejch avatar Apr 11 '24 21:04 thejch

Also have this issue after upgrading from 0.37.1 to 0.39.1. Turning animate_mouse_windowdragging off makes everything smooth though

donovanglover avatar Apr 17 '24 18:04 donovanglover

Final update on my part

Normal window dragging

Since upgrading to the 0.38.1 version from the unstable NixOS packages, with dragmisc:animate_mouse_windowdragging to false, dragging windows at every refresh rate is now perfectly smooth, as it should be. I have no idea which commit fixed the issue, but I am certainly glad that it is gone.

Window dragging with animations

Same here, though, of course, the animation makes the movement of the window itself take longer, but that is expected and can be customized anyway.

Atemo-C avatar Apr 23 '24 23:04 Atemo-C

finally did a git bisect bcba3951f45f11245d424274130eb3a0ac790d93 is the first bad commit can also confirm reverting the commit fixes it

thejch avatar May 02 '24 06:05 thejch