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.23k stars 895 forks source link

Cursor lag on low-end hardware when cpu usage is high #8041

Open nnyyxxxx opened 2 weeks ago

nnyyxxxx commented 2 weeks ago

Already reported ? *

Regression?

No

System Info and Version

My graphics card is apart of the AMD branding, as well as my cpu.

I am using the latest version of Hyprland-git from the AUR.

The file below contains the output of hyprctl systeminfo -c sysinfo.txt

Description

The cursor becomes really unusable when above 50%-60% cpu usage, this is bad for lowend hardware. I have experienced cursor stuttering and other nonsense while navigating around my environment; it would great if this could be mitigated fast.

This has been happening to me ever since I tried Hyprland back in July, so the Vers should correlate across versions since then.

This does not happen on other WMs that I've worked with like DWM.

This happens consistently even without eye candy like: blur, shadows, etc, Though I normally don't use them.

Another thing to note that I found odd is that it feels like Hyprlands performance worsens over-time, like 4hr uptime or so it starts to quake in it's boots, this could be be me imagining things.

How to reproduce

Limit your cpu to around 4 cores amount of max usage and start to navigate between applications like: Firefox, discord, etc.

Crash reports, logs, images, videos

No response

nnyyxxxx commented 2 weeks ago

i could not reproduce this on a higher end cpu with more cores / threads e.g. 8, it seems to only happen when the cpu usage spikes and / or is consistently high

vaxerski commented 2 weeks ago

My graphics card is apart of the AMD branding, as well as my cpu. I am using the latest version of Hyprland-git from the AUR.

please for the love of god do not ignore what the template tells you to do

This does not happen on other WMs that I've worked with like DWM.

Hyprland is not a DWM. Have you tested something that runs on wayland? kwin? sway?

I've never seen this happen and I know a dude who runs hyprland on 7 year old phones.

nnyyxxxx commented 2 weeks ago

Have you tested something that runs on wayland? kwin? sway?

Yeah I've used KDE a while back had no issues with cursor stuttering

please for the love of god do not ignore what the template tells you to do

Haha sorry about that, got lost in the moment.

24bit192kHz commented 2 weeks ago

using extra/hyprland not git i'm having the same issue but all the time not when the cpu is high

this only happen in 44 I just downgraded to 43 and I no longer have the issue

I also have amd 5600x so maybe it's an amd thing but my gpu is rtx 3060 so idk

nnyyxxxx commented 2 weeks ago

i think its just the compositor dropping a lot of frames for a moment causing the cursor lag i was able to actively recreate this issue via spawning in over a hundred terminal windows and moving the cursor around though it still happens even if there arent that many windows on screen, it's weird that other WMs / DEs don't lag like this for me even though they are more "bloated" e.g. KDE, gnome

nnyyxxxx commented 2 weeks ago

i've also noticed that picking up a window causes the lagging to stop while holding it but resumes after dropping it

bjowi commented 2 weeks ago

edit: my problem was fixed by setting "no_hardware_cursors = true" in the cursor section of hyprland.conf.

I noticed this today as well, first time running 0.44. No cpu or gpu load, but mouse is noticeably jumpy. looking at glxgears which usually never drops below 59.9, it reported as low as 44. i'm on nvidia 560.35.03 / rtx 3080

sysinfo.txt

littleblack111 commented 2 weeks ago

im using 4080 super, software cursor. dont notice this issue

ran stress --cpu 30 --io 4 --vm 2 --vm-bytes 128M --timeout 10s, cpu went up to 100% and my cursor still go up to at least 100fps-160fps(i dont notice difference before the stress and during)(at least to my eyes, my monitor is 160fps)

vaxerski commented 2 weeks ago

nvidia is a separate issue, due to hardware limitations.

nnyyxxxx commented 2 weeks ago

nvidia is a separate issue, due to hardware limitations.

any progress on this? did you find what is causing it?

littleblack111 commented 2 weeks ago

when will nvidia hardware cursors get implemented :(

vaxerski commented 2 weeks ago

they are implemented, they just cause stutters and are slow due to hardware limitations.

What do you want me to do? Go over and be like "hey jensen my fuckin g let me redesign your fucking architecture"?

vaxerski commented 2 weeks ago

there are "tricks" we could do to cheat our way out of it but it's not trivial

macydnah commented 2 weeks ago

I use Hyprland on i5-2450M (2 cores) with integrated Intel HD 3000 graphics on laptop, so I guess this classifies as low-end?

But to reproduce this, I had to open 21 firefox windows, 1 of it with a 4K 60fps youtube video, 10 foot terminal clients and 2 1080p local videos through mpv with hardware decoding disabled, all this just to achieve 60%-70% cpu usage, but idk... isn't this expected behavior? This kind of running environment seems insane to me. In my daily workflow I use around 10 firefox windows, 3-4 terminals and watch a video once in a while —not 3 videos at once— and Hyprland executes insanely smooth for me, at most 2 or 3 stutters within the week while compiling something? but idk this is low-end 13 years old hardware🤷‍♂️

Maybe it's AMD related indeed, have you tried to set follow_mouse to not follow focus?

duNfLk commented 2 weeks ago

I have this same problem

In my case the cursor is extremely laggy when I move it with the mouse When moving with the touchpad the movement is normal

I rolled back to version 0.43.0 and in this version I am not experiencing this problem

I'm using a Ryzen 7 5800H + RTX 3050

nnyyxxxx commented 2 weeks ago

i've noticed that Hyprlands cpu intake jumps from 1.9% (idle) -> 4.9% (not idle) when moving the cursor around

nnyyxxxx commented 2 weeks ago

have you tried to set follow_mouse to not follow focus?

No, but i'll look into it

SSkizz commented 2 weeks ago

Just updated to 0.44.0. I’ve been using hyprland since 0.41.0 on NixOS with my 4080 and it’s been a hassle free, buttery smooth experience. Upon updating to 0.44.0 I experience the mouse lag for a half second when the mouse is moved after it’s been still.

Previously I hadn’t disabled hardware cursor, tried disabling it but the issue persists

Isoheptane commented 2 weeks ago

I have the same issue when when I updated to 0.44.1. Hyprland CPU usage rises to 100% when I randomly move cursor around, even with or without windows opened. Also when I move cursor around it gets very laggy. One single core is under heavy load. Disabling hardware cursor is a workaround for me.

I'm using Ryzen 7 3700X + RTX 2060S (Driver 560.35.03).

I tried some basic profiling, it seems that most of the lag is from nvidia. But there is no further information like function names or something similar. I'm not very familiar with this...

FlameGraph with hardware cursor (`no_hardware_cursor = false`)
FlameGraph without hardware cursor (`no_hardware_cursor = true`)
serpens-ignis commented 2 weeks ago

I have the same issue when when I updated to 0.44.1. Hyprland CPU usage rises to 100% when I randomly move cursor around, even with or without windows opened. Also when I move cursor around it gets very laggy. One single core is under heavy load. Disabling hardware cursor is a workaround for me.

I'm using Ryzen 7 3700X + RTX 2060S (Driver 560.35.03).

Having the exact same issue, incidentally with the exact same specs. Have confirmed that turning off hardware cursors or downgrading to 0.43 both resolve the problem.

vaxerski commented 2 weeks ago

@Isoheptane @serpens-ignis @SSkizz if you are using nvidia this bug is not related to you, it's #8036. Please do not add to this conversation, this is not the bug you are experiencing.