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.61k stars 904 forks source link

[Nvidia] Desktop framerate dropping when Minecraft is running. #7317

Open Raft08 opened 3 months ago

Raft08 commented 3 months ago

Regression?

Yes

System Info and Version

System/Version info ```sh Hyprland, built from branch main at commit 77cf651825c2afac69e3a827ff910a62c73e1218 (protocols: avoid crashing in drmlease (7290)). Date: Mon Aug 12 20:49:52 2024 Tag: v0.42.0-14-g77cf6518, commits: 5083 ```

Description

When joining a server/world in Minecraft the whole desktop framerate drops. Minecraft shows a high fps like usual but the whole desktop still slows down.

On earlier versions like 1.12 this issue did not occur, I can confirm the bug is happening on 1.21. Changing java distribution does absolutely nothing.

I'm running the 555.58.02 drivers but I also tested it on 560 drivers and it also happends. GPU: GTX 1650

No visible or anormal VRAM usage on the GPU.

I used bisect and the first commit where the issue seems to happen is https://github.com/hyprwm/Hyprland/commit/ea728315410e220d73a993f17c83ae9dc9be9015

How to reproduce

Crash reports, logs, images, videos

No response

AlxTray commented 3 months ago

I'm not getting the same issue on 1.20.4, I'm playing through the Modrinth Launcher

Raft08 commented 3 months ago

It may be related to Java 21 then ? 1.20.5 Minecraft changed from Java 17 to Java 21

AlxTray commented 3 months ago

Perhaps, but I’m also on AMD GPU so more than likely an Nvidia thing

AlxTray commented 3 months ago

I’ll attempt to test 1.21 but getting an unrelated GLFW error, great

AlxTray commented 3 months ago

Fixed it, and tested on 1.21 and still not seeing the issue. So my bets are on Nvidia weird issue

Raft08 commented 3 months ago

Yeah I figured so at first but after testing multiple versions of the drivers from beta to earlier version but no luck.

Then I tried an earlier version of Hyprland and the issue did not occur then I just did as it was said in the bug report and found the last versions that worked for me.

This could also be related to the weird java issues I have https://bbs.archlinux.org/viewtopic.php?id=297497 Seems java has many issues on Hyprland with Nvidia drivers

vaxerski commented 3 months ago

honestly sounds like an nvidia bug if thisstill happens on hyprland-git

Raft08 commented 3 months ago

I don't get those issue on Gnome or KDE so I think it's just a combination of the two

gungun974 commented 2 months ago

I also got issue with my Minecraft and my Nvidia Card.

I'm on NixOS so I tested multiple version of Hyprland from source and Nvidia driver.

On version 555.58.02 and beta 560 with the latest version of Hyprland when I go to my Minecraft server I got a terrible FPS (1 frame or 2 per seconds).

In Gnome with the same version of Nvidia I don't have any issue with my frame rate.

On version 555.42.02 of the proprietary driver in Hyprland with any version, my Minecraft run great.

I don't know why latest version of the Nvidia driver make my Minecraft unplayable on Hyprland but I learn to live with that and soon I will go back to my AMD GPU since Nvidia really suck but here my observation.

Raft08 commented 2 months ago

@gungun974 Can you check if in your .minecraft directory or your launchers profile directory if a there is a file called hs_err_pid

gungun974 commented 2 months ago

@gungun974 Can you check if in your .minecraft directory or your launchers profile directory if a there is a file called hs_err_pid

Yep I got a lot of those files. Here one of them.

hs_err_pid825401.log

Raft08 commented 2 months ago

Yes! This also confirms my issue with java apps, Nvidia + Hyprland breaks the JVM

Edgars-Cirulis commented 2 months ago

Same issue in my workspace mouse slowdowns whole desktop lags. Any fix?

Raft08 commented 2 months ago

You can only rollback to an earlier version, or a earlier commit than https://github.com/hyprwm/Hyprland/commit/ea728315410e220d73a993f17c83ae9dc9be9015

Edgars-Cirulis commented 2 months ago

You can only rollback to an earlier version, or a earlier commit than ea72831

https://github.com/hyprwm/Hyprland/issues/7643

https://github.com/hyprwm/Hyprland/issues/7643#issuecomment-2327031738

You have something like that?

Raft08 commented 2 months ago

Yeah it looks kinda like it, but it seems to be more an issue with Nvidia and Java, but this seem related. But using Btop I my gpu wasn't really highly used, like 20 - 40 %, but maybe Java overuses the gpu when running with nvidia drivers.

And this cause your issue to happen to us too.

Edgars-Cirulis commented 2 months ago

Yeah it looks kinda like it, but it seems to be more an issue with Nvidia and Java, but this seem related. But using Btop I my gpu wasn't really highly used, like 20 - 40 %, but maybe Java overuses the gpu when running with nvidia drivers.

And this cause your issue to happen to us too.

Also try to run glmark2 it will also lag although its not Java.

Edgars-Cirulis commented 2 months ago

Note: its pointless to report bugs he will always and always say it's xwayland or nvidia issue, meanwhile thet doesn't happen in other wayland compositors.

Raft08 commented 2 months ago

Yeah it looks kinda like it, but it seems to be more an issue with Nvidia and Java, but this seem related. But using Btop I my gpu wasn't really highly used, like 20 - 40 %, but maybe Java overuses the gpu when running with nvidia drivers. And this cause your issue to happen to us too.

Also try to run glmark2 it will also lag although its not Java.

I changed distribution and I am now running NixOs but I forced my flakes to use 0.41, I'll try once I'm home (Couple of days I'll get back directly back to you)