-
-
Notifications
You must be signed in to change notification settings - Fork 880
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
[BUG] Significant worse performance in games on 0.37.0 then on 0.32.3 #5148
Comments
This is most likely due to mesa incompatibilities between NixOS 23.11 and Hyprland's NixOS unstable. I run NixOS unstable and have no issues in games. |
@fufexan i don't really want to change the channel of my whole system, will it solve the issue if I update mesa to the unstable channel? |
Not sure how you'd do that, but feel free to try. Sadly we always end up having breaking changes in the package so we can't backport the latest versions to 23.11. |
@fufexan Yeah it actually solved the issue, would it be a good idea to add this to the wiki in the nix os section? Here's what i changed in my config: |
Sure, feel free to PR. |
@fufexan just sent a PR rn hyprwm/hyprland-wiki#542 |
Hi @coffeeispower @fufexan, I test this solution and don't works for me! I have problems with Firefox (Mozilla Firefox 124.0.1) over extensions forms like 1Password, Bitwarden or some notes extensions. I'm using stable nixpkgs flake. I'm getting this erros on xdg-desktop-portal-hyprland.service - Portal service (Hyprland implementation)
Loaded: loaded (/etc/systemd/user/xdg-desktop-portal-hyprland.service; static)
Active: active (running) since Tue 2024-04-02 22:06:20 CEST; 11s ago
Main PID: 1816 (.xdg-desktop-po)
Tasks: 4 (limit: 37782)
Memory: 12.9M
CPU: 97ms
CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/xdg-desktop-portal-hyprland.service
└─1816 /nix/store/5y0isgi3gahrff83j6b09km4nbrsxqy9-xdg-desktop-portal-hyprland-1.2.4/libexec/xdg-desktop-porta>
abr 02 22:06:20 viserion xdg-desktop-portal-hyprland[1816]: DRI driver not from this Mesa build ('24.0.3' vs '23.1.9')
abr 02 22:06:20 viserion xdg-desktop-portal-hyprland[1816]: failed to bind extensions
abr 02 22:06:20 viserion xdg-desktop-portal-hyprland[1816]: DRI driver not from this Mesa build ('24.0.3' vs '23.1.9')
abr 02 22:06:20 viserion xdg-desktop-portal-hyprland[1816]: failed to bind extensions
abr 02 22:06:20 viserion xdg-desktop-portal-hyprland[1816]: DRI driver not from this Mesa build ('24.0.3' vs '23.1.9')
abr 02 22:06:20 viserion xdg-desktop-portal-hyprland[1816]: failed to bind extensions
abr 02 22:06:20 viserion xdg-desktop-portal-hyprland[1816]: DRI driver not from this Mesa build ('24.0.3' vs '23.1.9')
abr 02 22:06:20 viserion xdg-desktop-portal-hyprland[1816]: failed to bind extensions
abr 02 22:06:20 viserion xdg-desktop-portal-hyprland[1816]: DRI driver not from this Mesa build ('24.0.3' vs '23.1.9')
abr 02 22:06:20 viserion xdg-desktop-portal-hyprland[1816]: failed to bind extensions My hyprland module: { inputs, pkgs, ... }:
let
openglPackage = pkgs.unstable.mesa.drivers;
openglPackage32 = pkgs.unstable.pkgsi686Linux.mesa.drivers;
in
{
programs.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
};
environment.sessionVariables = {
NIXOS_OZONE_WL = "1"; # hint electron apps to use wayland
MOZ_ENABLE_WAYLAND = "1"; # ensure enable wayland for Firefox
WLR_RENDERER_ALLOW_SOFTWARE = "1"; # enable software rendering for wlroots
WLR_NO_HARDWARE_CURSORS = "1"; # disable hardware cursors for wlroots
};
hardware = {
opengl =
{
enable = true;
package = openglPackage;
package32 = openglPackage32;
driSupport = true;
driSupport32Bit = true;
};
# opentabletdriver.enable = true;
};
} |
@ajmasia you can add this to your config: programs.hyprland.portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland.override {
inherit (pkgs.unstable) mesa;
}; This will override the mesa used by xdph and force it to be the same as the one on your system. Should fix the issue you're facing (driver mismatch). |
@fufexan now service works fine but problems with firefox persists 😊 { inputs, pkgs, ... }:
let
openglPackage = pkgs.unstable.mesa.drivers;
openglPackage32 = pkgs.unstable.pkgsi686Linux.mesa.drivers;
in
{
programs.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland.override {
inherit (pkgs.unstable) mesa;
};
};
environment.sessionVariables = {
NIXOS_OZONE_WL = "1"; # hint electron apps to use wayland
MOZ_ENABLE_WAYLAND = "1"; # ensure enable wayland for Firefox
WLR_RENDERER_ALLOW_SOFTWARE = "1"; # enable software rendering for wlroots
WLR_NO_HARDWARE_CURSORS = "1"; # disable hardware cursors for wlroots
};
xdg = {
portal = {
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
];
configPackages = [
pkgs.xdg-desktop-portal-gtk
];
};
};
hardware = {
opengl =
{
enable = true;
package = openglPackage;
package32 = openglPackage32;
driSupport = true;
driSupport32Bit = true;
};
};
} |
That is a separate issue. See #5333. |
@fufexan now using las versión with video_2024-06-03_20-32-21.mp4Flake inputs.hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; Hyprland module { inputs, pkgs, ... }:
# let
# openglPackage = pkgs.mesa.drivers;
# openglPackage32 = pkgs.pkgsi686Linux.mesa.drivers;
# in
{
programs.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
xwayland.enable = true;
portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland.override
{
inherit (pkgs) mesa;
};
# https://github.com/hyprwm/Hyprland/issues/5148
# portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland.override {
# inherit (pkgs) mesa;
# };
};
programs.dconf.enable = true;
environment.sessionVariables = {
NIXOS_OZONE_WL = "1"; # hint electron apps to use wayland
MOZ_ENABLE_WAYLAND = "1"; # ensure enable wayland for Firefox
WLR_RENDERER_ALLOW_SOFTWARE = "1"; # enable software rendering for wlroots
WLR_NO_HARDWARE_CURSORS = "1"; # disable hardware cursors for wlroots
NIXOS_XDG_OPEN_USE_PORTAL = "1"; # needed to open apps after web login
};
services = {
# Applications messaging system
dbus = {
enable = true;
packages = with pkgs; [
gcr # crypto services (from gnome)
dconf # settings daemon (from gnome)
];
};
};
xdg = {
portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
];
configPackages = [
pkgs.xdg-desktop-portal-gtk
];
};
};
hardware = {
opengl =
{
enable = true;
# package = openglPackage;
# package32 = openglPackage32;
driSupport = true;
driSupport32Bit = true;
};
};
} |
@ajmasia which issue exactly? Also, what should I notice in the video? I only see a flicker. |
@fufexan just the fliker in green color that makes the image (now using nixpkgs unstable) |
I believe it's a different issue then, as this issue was referring to performance problems, not visual artifacts. |
If someone is still experiencing a similar issue, this solved it for me - NixOS/nixpkgs#228586 (comment) |
Hyprland Version
System/Version info
Bug or Regression?
Regression
Description
Games and applications that require the GPU seem to get a lot less FPS on newer hyprland versions. When i run for example geometry dash on hyprland that's on the nixpkgs stable version 23.11 which is hyprland 0.32.3, it runs smoothly on 60fps. However, I wanted to customize the layers' animations which is only available on newer versions of hyprland, so I switched to the hyprland flake to get a newer version, and for some reason it has significantly worse performance in games. Games start to lag a lot and reach the incredible peak of 15 FPS when it before could reach 60.
How to reproduce
Just compare the performance of any game in hyprland 0.32.3 and 0.37.0.
Also I use NixOS so probably my configuration can help reproduce the issue: https://github.com/coffee-is-power/nix-configuration
Crash reports, logs, images, videos
No response
The text was updated successfully, but these errors were encountered: