Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Low FPS on higher refresh rate on desktop (only in Hyprland) #9029

Open
3 of 6 tasks
dabljues opened this issue Jan 11, 2025 · 35 comments
Open
3 of 6 tasks

Low FPS on higher refresh rate on desktop (only in Hyprland) #9029

dabljues opened this issue Jan 11, 2025 · 35 comments
Labels
bug Something isn't working

Comments

@dabljues
Copy link

Already reported ? *

  • I have searched the existing open and closed issues.

Regression?

Not a regression - it's an old bug

System Info and Hyprland Version

System/Version info
Hyprland 0.46.2 built from branch  at commit 0bd541f2fd902dbfa04c3ea2ccf679395e316887  (version: bump to 0.46.2).
Date: Thu Dec 19 19:26:47 2024
Tag: v0.46.2, commits: 5566
built against:
 aquamarine 0.7.0
 hyprlang 0.6.0
 hyprutils 0.3.3
 hyprcursor 0.1.11
 hyprgraphics 0.1.1


flags set:
debug


System Information:
System name: Linux
Node name: arch
Release: 6.12.8-arch1-1
Version: #1 SMP PREEMPT_DYNAMIC Thu, 02 Jan 2025 22:52:26 +0000


GPU information: 
07:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Renoir [Radeon Vega Series / Radeon Vega Mobile Series] [1002:1636] (rev d3) (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:

Description

I think over half a year ago I've updated my system (pacman -Syu), which probably also updated Hyprland, rebooted and noticed horrible lags when just browsing the web or even typing in a terminal. The only thing that removed the stutter/lags was to decrease the refresh rate of my external monitor (via hyprctl) to 60Hz (it was running on 144Hz). After doing so - no more lags, but, well, 60Hz.

At that time I was doing something important and decided to leave it like this for the time being. I had to disable the animations because they really bugged me at 60Hz. This is just to say that this isn't a new thing, it's been happening for quite some time.

This is a display that I'm using for work, so it wasn't the end of the world, but I will be swapping it to a 240Hz one (to match my main one that I use with my private PC). Now, it would really suck to be stuck at 60Hz on a good 240Hz monitor. I'm not talking about gaming here, just scrolling down a website or looking at animations.

I've had multiple attempts of trying to fix it. Browsed the internet, saw people having issues like not seeing their max refresh rate under hyprctl, but that's not me. I've obviously tried setting the 144Hz again, but it's still laggy as hell. When running glxgears I see 20-22FPS:

❯ glxgears
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
109 frames in 5.0 seconds = 21.681 FPS
103 frames in 5.0 seconds = 20.574 FPS

, the Hyprland debug overlay shows 20FPS flat. So this happens when I set the refresh rate to 144Hz. Now, on 60Hz I get 60 FPS. When I set it to 70Hz I get 70FPS. That's strange.

I have FreeSync disabled, tried various configurations with vrr on/off (same for vfr) - nothing helps. I've reinstalled Hyprland, ran it with a default config - no luck.

The most important thing here is - it works on i3! Easy 144FPS in glxgears, no problem. I've used amdgpu_top to see if maybe the GPU is struggling in Hyprland, but no, literally no usage, like 0-3%. Same in i3. This is really strange. Basically, for me, it seems like Hyprland is the culprit here somehow. My setup (in terms of cables, peripherals) didn't change, the only thing that seems to have changed was Hyprland. I know that this was after a full system upgrade, but I guess if that broke something, it wouldn't work in i3 either, but it does.

Does anyone know what may be the problem? I really don't want to go back to i3 just because of this. The only thing I didn't try is to format my laptop and set it up again, but it's a painful process considering how much stuff I would have to configure for work purposes. Not sure it would be a solution either

How to reproduce

NA

Attach not paste

  • I understand that all text files must be attached, and not pasted directly. If not respected, this issue will likely get closed as spam

Checklist of files to include below

  • Hyprland config - hyprctl systeminfo -c (always include)
  • Crash report (always include in case of crash)
  • Video (always include in case of a visual bug)
  • Logs (might contain useful info such as errors)

Additional info & File uploads

Hyprland config (hyprctl systeminfo -c )

@dabljues dabljues added the bug Something isn't working label Jan 11, 2025
@stojanov
Copy link

Same here

@artp96
Copy link

artp96 commented Jan 11, 2025

I also have this issue with an nvidia gpu, except I have two monitors and have fps issues on both if one of them is set to 144 Hz
This since updating hyprland with yay, yesterday.
No issues with awesomeWM

@vaxerski
Copy link
Member

if you re on git this might be hyprwm/aquamarine#132

@Neryss
Copy link

Neryss commented Jan 11, 2025

if you re on git this might be hyprwm/aquamarine#132

I don't know if this was what you meant but I have the same issue with either the git version from yay, the github one or the pacman one.

But yeah same issue, everything is ok if I cap every monitor at 60 fps, more than that and I have awful drops when moving windows, inputting keystrokes in game etc.

@tlg-tg
Copy link

tlg-tg commented Jan 11, 2025

Same issue here I'm using hyprland-git and aquamarine-git on amd gpu.

Update
Just tried it on my secondary nvme with hyprland package instead of hyprland-git and aquamarine instead of aquamarine-git and works no problems.

@dabljues
Copy link
Author

I'm happy for you guys!

Me myself I'm using hyprland package (not a git one) and I have AMD GPU. It seems like what I have is not a recent thing, as I mentioned in the description.

@hdm9527
Copy link

hdm9527 commented Jan 12, 2025

Same issue. bisect 830350a. My monitor doesn't support HDR. @UjinT34
edit: hyprwm/aquamarine#133 didn't fix the refresh rate glitch.
image
image

@tlg-tg
Copy link

tlg-tg commented Jan 12, 2025

I'm happy for you guys!

Me myself I'm using hyprland package (not a git one) and I have AMD GPU. It seems like what I have is not a recent thing, as I mentioned in the description.

Did you try to downgrade the aquamarine and hyprland package?

@dabljues
Copy link
Author

I'm happy for you guys!
Me myself I'm using hyprland package (not a git one) and I have AMD GPU. It seems like what I have is not a recent thing, as I mentioned in the description.

Did you try to downgrade the aquamarine and hyprland package?

For me the issue happened quite some time ago, I wouldn't wanna try downgrading like to a much older version, I guess. Plus, I really don't remember the exact date when it happened, so it would be quite difficult to guess the version I should downgrade to :(

@Knugel
Copy link

Knugel commented Jan 12, 2025

I have the same issue but only on the highest resolution of my monitor. Running at full resolution and > 60Hz everything seems to be stuck at ~40 FPS with little GPU usage. I tried incrementing the refresh rate and anything above 88 produces the problem for me.
image

Running at a lower resolution the problem disappears
image

I'm using the non git packages with an AMD GPU.

@hdm9527
Copy link

hdm9527 commented Jan 13, 2025

#9014 should have fixed this issue.

@stojanov
Copy link

Still present for me, after boot up i have some minutes where everything is working as intended (desired refresh rate and performance). After about 5-10 minutes it goes back to it's previous state (using glxgears about 30-40 fps).

Hyprland 0.46.0 built from branch main at commit a6b263713a2b862ed41362082e2147e081934077  ().
Date: Sun Jan 12 05:10:36 2025
Tag: , commits: 5670
built against:
 aquamarine 0.7.1
 hyprlang 0.6.0
 hyprutils 0.3.3
 hyprcursor 0.1.11
 hyprgraphics 0.1.1

@arc-nazrin
Copy link

arc-nazrin commented Jan 14, 2025

I noticed fps drops in some games, while moving the mouse, it bricks the game to 45 fps.
It doesn't happen on Sway and River.
Happened since I updated Aquamarine & Hyprland.

@Andeke
Copy link

Andeke commented Jan 14, 2025

I noticed fps drops in some games, while moving the mouse, it bricks the game to 45 fps. It doesn't happen on Sway and River. Happened since I updated Aquamarine & Hyprland.

Does this only happen when in fullscreen? Switching glxgears from fullscreen to windowed mode solves it in my case.

@arc-nazrin
Copy link

arc-nazrin commented Jan 14, 2025

I noticed fps drops in some games, while moving the mouse, it bricks the game to 45 fps. It doesn't happen on Sway and River. Happened since I updated Aquamarine & Hyprland.

Does this only happen when in fullscreen? Switching glxgears from fullscreen to windowed mode solves it in my case.

It doesn't happened windowed, I guess it's still an option while waiting a fix but for now I play on Sway in a 2nd tty.

@G36maid
Copy link

G36maid commented Jan 14, 2025

Same issue here!
I am using the Framework 13 with an AMD GPU (integrated in the CPU) and running Arch Linux. After booting into Hyprland, the FPS drops to very low levels after about 10 minutes. This issue does not occur with i3 or Sway.

Despite the FPS drop, both GPU and CPU usage remain low.

Package Details (both not the -git one):

    Hyprland: 0.46.2  
    Built from branch at commit 0bd541f2fd902dbfa04c3ea2ccf679395e316887 (version: bump to 0.46.2).  
    Date: Thu Dec 19 19:26:47 2024  
    Tag: v0.46.2, commits: 5566  
    Built against:  
       Aquamarine: 0.7.0  
       Hyprlang: 0.6.0  
       Hyprutils: 0.3.3  
       Hyprcursor: 0.1.11  
       Hyprgraphics: 0.1.1

@stojanov
Copy link

stojanov commented Jan 17, 2025

This is still present on the latest commit
Here's glxgears (not running in fullscreen mode) running on my primary monitor (2560x1440@165)

Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
822 frames in 5.0 seconds = 164.201 FPS
826 frames in 5.0 seconds = 165.077 FPS
814 frames in 5.0 seconds = 162.668 FPS
820 frames in 5.0 seconds = 163.866 FPS
826 frames in 5.0 seconds = 165.059 FPS
826 frames in 5.0 seconds = 165.078 FPS
826 frames in 5.0 seconds = 165.070 FPS
826 frames in 5.0 seconds = 165.065 FPS
819 frames in 5.0 seconds = 163.668 FPS
811 frames in 5.0 seconds = 162.038 FPS
811 frames in 5.0 seconds = 162.106 FPS
798 frames in 5.0 seconds = 159.499 FPS
785 frames in 5.0 seconds = 156.876 FPS
766 frames in 5.0 seconds = 153.090 FPS
722 frames in 5.0 seconds = 144.295 FPS
678 frames in 5.0 seconds = 135.507 FPS
550 frames in 5.0 seconds = 109.891 FPS
407 frames in 5.0 seconds = 81.351 FPS
407 frames in 5.0 seconds = 81.332 FPS
410 frames in 5.0 seconds = 81.912 FPS
407 frames in 5.0 seconds = 81.262 FPS
406 frames in 5.0 seconds = 81.136 FPS
410 frames in 5.0 seconds = 81.839 FPS
407 frames in 5.0 seconds = 81.235 FPS
410 frames in 5.0 seconds = 81.836 FPS

Here are my versions:

Hyprland 0.46.0 built from branch main at commit 0dc7367a7006cc3cc877d52bf34c4998144bff84  ().
Date: Thu Jan 16 02:42:39 2025
Tag: , commits: 5674
built against:
 aquamarine 0.7.1
 hyprlang 0.6.0
 hyprutils 0.3.3
 hyprcursor 0.1.11
 hyprgraphics 0.1.1

If needed i can try and get the drm log, the hyprland log mainly shows:

[LOG] [AQ] drm: Modesetting HDMI-A-2 with 1920x1080@119.98Hz
[ERR] [AQ] atomic drm request: failed to commit: Invalid argument, flags: ATOMIC_ALLOW_MODESET PAGE_FLIP_EVENT

This is regarding my second monitor, on my second monitor glxgears runs at an 'appropriate frame rate' algrough not matching my refresh rate on the monitor, while hyprland animations feel sluggish, like running below 60 fps.

Moving glx gears to my primary monitor it shows ~30 fps
Edit: explicit_sync and explicit_sync_kms is enabled.
Also if helpful i am running this through a KVM

Let me know if i can provide more information

@UjinT34
Copy link
Contributor

UjinT34 commented Jan 18, 2025

If needed i can try and get the drm log, the hyprland log mainly shows:

[LOG] [AQ] drm: Modesetting HDMI-A-2 with 1920x1080@119.98Hz
[ERR] [AQ] atomic drm request: failed to commit: Invalid argument, flags: ATOMIC_ALLOW_MODESET PAGE_FLIP_EVENT

Probably not related to this issue. Should be fixed in #9090.

@stojanov
Copy link

If needed i can try and get the drm log, the hyprland log mainly shows:

[LOG] [AQ] drm: Modesetting HDMI-A-2 with 1920x1080@119.98Hz
[ERR] [AQ] atomic drm request: failed to commit: Invalid argument, flags: ATOMIC_ALLOW_MODESET PAGE_FLIP_EVENT

Probably not related to this issue. Should be fixed in #9090.

Brief testing for about 5-10 minutes i don't see any performance drops and the desired frame rate is maintained.
Thank you for your work!

@dabljues
Copy link
Author

I don't think this fixes the issue. It has nothing to do with HDR nor fullscreen

@stojanov
Copy link

stojanov commented Jan 19, 2025

I don't think this fixes the issue. It has nothing to do with HDR nor fullscreen

Did you try the latest commit?

Edit: typo, branch -> commit

@dabljues
Copy link
Author

I don't think this fixes the issue. It has nothing to do with HDR nor fullscreen

Did you try the latest commit?

Edit: typo, branch -> commit

AUR's hyprland-git doesn't have the newest commits, so I installed from 8dd2cd41fb4c5a5eb6886cc190419b36084cabfa (via CMake)

So now:

❯ hyprland --version
Hyprland 0.46.0 built from branch main at commit 8dd2cd41fb4c5a5eb6886cc190419b36084cabfa  (core: move to inotify for monitoring the config files).
Date: Sun Jan 19 16:11:12 2025
Tag: v0.46.0-134-g8dd2cd41, commits: 5689
built against:
 aquamarine 0.7.1
 hyprlang 0.6.0
 hyprutils 0.3.3
 hyprcursor 0.1.11
 hyprgraphics 0.1.1


no flags were set

But still:

❯ glxgears
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
115 frames in 5.0 seconds = 22.963 FPS
111 frames in 5.0 seconds = 22.153 FPS
[...]

(at 144Hz, at 60Hz, there's 60 FPS)

@Andeke
Copy link

Andeke commented Jan 19, 2025

AUR's hyprland-git doesn't have the newest commits

I think you misunderstand how the AUR works. The PKGBUILD pulls the latest version from git, meaning that you only have to rebuild it to have the latest commits.

This doesn't help your issue, but it might make it more convenient for you when rebuilding using a helper.

@Knugel
Copy link

Knugel commented Jan 19, 2025

I don't think this fixes the issue. It has nothing to do with HDR nor fullscreen

Same here. I still have the same issue even with the latest commit. The issue also happens immediately for me and not after some time.

@dabljues
Copy link
Author

The issue also happens immediately for me and not after some time.

Yes, same for me

@vaxerski vaxerski reopened this Jan 19, 2025
@SpyrosPsarras
Copy link

I am wondering if this is the same as my unsolved problem
#8662

@PaideiaDilemma
Copy link
Contributor

Please keep in mind that glxgears might not be a good testcase if you are on nvidia. See https://gitlab.freedesktop.org/mesa/demos/-/issues/43

@dabljues
Copy link
Author

dabljues commented Feb 7, 2025

I am wondering if this is the same as my unsolved problem #8662

Looks similar, yeah

Please keep in mind that glxgears might not be a good testcase if you are on nvidia. See https://gitlab.freedesktop.org/mesa/demos/-/issues/43

AMD here, as some of the other guys from this issue as well, unfortunately. I also tested via Hyprland debug overlay - same thing

@PaideiaDilemma
Copy link
Contributor

PaideiaDilemma commented Feb 7, 2025

This issue is very broad and could use additional hardware info. (Most people in this issue had a different problem I think)

Are you also using thunderbolt like in #8662?

@dabljues
Copy link
Author

dabljues commented Feb 7, 2025

Yes. The display is connected via DP to the docking station and docking station -> TB -> laptop

@PaideiaDilemma
Copy link
Contributor

can you try setting AQ_NO_MODIFIERS=1?

@dabljues
Copy link
Author

dabljues commented Feb 7, 2025

Sure. Set it in Hyprland conf (env = AQ_NO_MODIFIERS,1) and in terminal before launching Hyprland from TTY (for good measure I guess). Same result

@PaideiaDilemma
Copy link
Contributor

PaideiaDilemma commented Feb 7, 2025

You need to set it in the environment Hyprland starts in so AQ_NO_MODIFIERS=1 Hyprland

Edit: I think you need to? not sure, but try it for good measure.
Edit2: Setting it with env in the config is fine.

@dabljues
Copy link
Author

dabljues commented Feb 7, 2025

Yep, that's what I did

@SpyrosPsarras
Copy link

This issue is very broad and could use additional hardware info. (Most people in this issue had a different problem I think)

Are you also using thunderbolt like in #8662?

What do you need so that I can provide? In my case I posted exactly the laptop model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests