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
20.88k stars 877 forks source link

Hyprland Minor stutters and increased application load times [git bisect included] #5481

Closed joelmathewthomas closed 6 months ago

joelmathewthomas commented 6 months ago

Hyprland Version

System/Version info ```sh Hyprland, built from branch at commit 9f1604e4b0afec40cfa9bc095d6613a7f749b2c1 (input: Dont set active monitor when simulating mouse movement (5465)). Date: Sun Apr 7 05:37:21 2024 Tag: v0.38.0-60-g9f1604e4, commits: 4393 flags: (if any) System Information: System name: Linux Node name: nitro5 Release: 6.8.4-arch1-1 Version: #1 SMP PREEMPT_DYNAMIC Fri, 05 Apr 2024 00:14:23 +0000 GPU information: 0000:00:02.0 VGA compatible controller [0300]: Intel Corporation TigerLake-H GT1 [UHD Graphics] [8086:9a60] (rev 01) (prog-if 00 [VGA controller]) 0000:01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA107M [GeForce RTX 3050 Ti Mobile] [10de:25a0] (rev a1) (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: ```

Bug or Regression?

Bug

Description

After commit f2a848cbcc41f29fb62ee67aef95136ae1a650da, some applications like kitty,.. sometimes take an extra 3 , 4 secs to load, which normally loads instantly. Also, there are minor animation stutters when opening windows.

I have done a git bisect and determined which commit caused this.

f2a848cbcc41f29fb62ee67aef95136ae1a650da is the first bad commit
commit f2a848cbcc41f29fb62ee67aef95136ae1a650da
Author: Vaxry <43317083+vaxerski@users.noreply.github.com>
Date:   Sun Apr 7 03:31:51 2024 +0100

    core: Event loop rework (#5466)

    * Event loop rework

    * revert missed

 src/Compositor.cpp                          |   6 +++++-
 src/managers/AnimationManager.cpp           |  11 ++++++-----
 src/managers/AnimationManager.hpp           |   3 ++-
 src/managers/eventLoop/EventLoopManager.cpp | 140 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/managers/eventLoop/EventLoopManager.hpp |  46 ++++++++++++++++++++++++++++++++++++++++++++++
 src/managers/eventLoop/EventLoopTimer.cpp   |  53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/managers/eventLoop/EventLoopTimer.hpp   |  29 +++++++++++++++++++++++++++++
 7 files changed, 281 insertions(+), 7 deletions(-)

How to reproduce

Install Hyprland from source with commit f2a848cbcc41f29fb62ee67aef95136ae1a650da.

Crash reports, logs, images, videos

No response

vaxerski commented 6 months ago

well that sucks

joelmathewthomas commented 6 months ago

I agree.

Ligthiago commented 6 months ago

minor animation stutters

Also notice this when switching workspaces. After reverting to the previous commit to loop revork animations seem fine again.

vaxerski commented 6 months ago

patch.txt try this

joelmathewthomas commented 6 months ago

Im sorry. I'm all new to this. How do i apply the patch.

Should i run git apply patch.txt and make again.?

joelmathewthomas commented 6 months ago

Anyways this is what i did.

Got this error the first time around

git apply patch.txt 
patch.txt:191: trailing whitespace.

patch.txt:193: trailing whitespace.

patch.txt:218: trailing whitespace.

warning: unable to rmdir 'subprojects/wlroots': Directory not empty
warning: 3 lines add whitespace errors.

So I manually emptied /subprojects/wlroots Then i got

git apply patch.txt 
patch.txt:191: trailing whitespace.

patch.txt:193: trailing whitespace.

patch.txt:218: trailing whitespace.

error: patch failed: src/managers/eventLoop/EventLoopManager.cpp:2
error: src/managers/eventLoop/EventLoopManager.cpp: patch does not apply
error: patch failed: src/managers/eventLoop/EventLoopManager.hpp:10
error: src/managers/eventLoop/EventLoopManager.hpp: patch does not apply
error: patch failed: src/managers/eventLoop/EventLoopTimer.cpp:1
error: src/managers/eventLoop/EventLoopTimer.cpp: patch does not apply
Ligthiago commented 6 months ago

try this

On animations side not as bad as before at first glance. Also can it affect scrolling in browser? It's seems weird

joelmathewthomas commented 6 months ago

try this

On animations side not as bad as before at first glance. Also can it affect scrolling in browser? It's seems weird

How did you apply the patch.

vaxerski commented 6 months ago

patch -p1 < /path/to/patch.txt || echo "" (git reset --hard first, then apply and ignore the wlroots warning)

Ligthiago commented 6 months ago

How did you apply the patch.

Damn, I use nix so no clue how normal people do it, I just overriding attrs of package 🤡

joelmathewthomas commented 6 months ago

patch.txt try this

Tried the patch. Can't say there's much of a difference. Stutters are still there. Before stutters used to happen , when opening a new window in an non-empty workspace. Now i'd say , the stutters happen even in an empty workspace.

And as for the increased loading times, it's still there. Apparently worse.

Hyprland, built from branch main at commit 20899d0df2a2811d83b4ae3357ad31a94eafcd8e dirty (hyprpm: add shell completions (5423)).
Date: Sun Apr 7 22:09:46 2024
Tag: v0.38.0-65-g20899d0d, commits: 4398

flags: (if any)

System Information:
System name: Linux
Node name: nitro5
Release: 6.8.4-arch1-1
Version: #1 SMP PREEMPT_DYNAMIC Fri, 05 Apr 2024 00:14:23 +0000

GPU information: 
0000:00:02.0 VGA compatible controller [0300]: Intel Corporation TigerLake-H GT1 [UHD Graphics] [8086:9a60] (rev 01) (prog-if 00 [VGA controller])
0000:01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA107M [GeForce RTX 3050 Ti Mobile] [10de:25a0] (rev a1) (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:
Ligthiago commented 6 months ago

Anyway, scrolling in firefox it just bad even with patch. Especially with keys. Only appeared with wheel or keys, grabbing scrollbar is smooth, so input issue.

Anims seems fine for me, dunno.

vaxerski commented 6 months ago

patch.txt try (independent, reset first)

Ligthiago commented 6 months ago

Can't even launch properly, just black screen with cursor (not movable)

joelmathewthomas commented 6 months ago

This is how i patched it.

git reset --hard
HEAD is now at 20899d0d hyprpm: add shell completions (#5423)
[joel@nitro5 Hyprland]$ patch -p1 < ~/Downloads/patch.txt || echo ""
patching file src/managers/eventLoop/EventLoopManager.cpp
patching file src/managers/eventLoop/EventLoopManager.hpp
patching file src/managers/eventLoop/EventLoopTimer.cpp
File subprojects/wlroots is not a regular file -- refusing to patch
1 out of 1 hunk ignored -- saving rejects to file subprojects/wlroots.rej

I'm not sure if @Ligthiago is able to notice, but i can guarantee , that before the commit animations were just a lot smoother. It didn't have any microstutters like now. Also firefox scrolling is weird. Also the app launch times are just getting worse.


Hyprland, built from branch main at commit 20899d0df2a2811d83b4ae3357ad31a94eafcd8e dirty (hyprpm: add shell completions (5423)).
Date: Sun Apr 7 22:09:46 2024
Tag: v0.38.0-65-g20899d0d, commits: 4398

flags: (if any)

System Information:
System name: Linux
Node name: nitro5
Release: 6.8.4-arch1-1
Version: #1 SMP PREEMPT_DYNAMIC Fri, 05 Apr 2024 00:14:23 +0000

GPU information: 
0000:00:02.0 VGA compatible controller [0300]: Intel Corporation TigerLake-H GT1 [UHD Graphics] [8086:9a60] (rev 01) (prog-if 00 [VGA controller])
0000:01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA107M [GeForce RTX 3050 Ti Mobile] [10de:25a0] (rev a1) (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:
vaxerski commented 6 months ago

fak

vaxerski commented 6 months ago

patch.txt try this

Ligthiago commented 6 months ago

Can launch, smooth scrolling in firefox fixed, anims - dunno, for me seems ok, can't notice anything that bad...

App launching time was fine for me from the start

joelmathewthomas commented 6 months ago

Ill check it now

joelmathewthomas commented 6 months ago

patch.txt try this

As of this moment, this patch fixed all issues for me. Thanks @vaxerski !

vaxerski commented 6 months ago

alright