Skip to content

Commit

Permalink
Adapt boot config to fix wayland lagging issues
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelkocher committed Dec 19, 2024
1 parent d199566 commit 8fddf45
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
12 changes: 10 additions & 2 deletions hosts/dp02/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@

# production: version 550
# latest: version 560
package = config.boot.kernelPackages.nvidiaPackages.latest;
# set to beta to fix wayland lagging issues
# TODO remove after bug has been fixed
package = config.boot.kernelPackages.nvidiaPackages.beta;

# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
# Enable this if you have graphical corruption issues or application crashes after waking
Expand All @@ -59,9 +61,15 @@
powerManagement.enable = true;

# # nvidia-drm.modeset=1 is required for some wayland compositors, e.g. sway
# modesetting.enable = true;
modesetting.enable = true;
};

# disable GSP firmware to fix wayland lagging bug
# TODO remove after bug has been fixed
boot.kernelParams = [
"nvidia.NVreg_EnableGpuFirmware=0"
];

# We have enough RAM
zramSwap.enable = false;
}
10 changes: 10 additions & 0 deletions modules/mixins/desktop-wayland.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@
NIX_PROFILES = "${pkgs.lib.concatStringsSep " " (
pkgs.lib.reverseList config.environment.profiles
)}";

};

# env variables to prevent lagging in wayland
# TODO remove after the bug has been fixed
environment.variables = {
GBM_BACKEND="nvidia-drm";

This comment has been minimized.

Copy link
@pbek

pbek Dec 19, 2024

Don't forget, these only work for NVIDIA! (because you put it into the general Wayland config)

__GLX_VENDOR_LIBRARY_NAME="nvidia";
ENABLE_VKBASALT="1";
LIBVA_DRIVER_NAME="nvidia";
};

home-manager.users.${userLogin} = {
Expand Down

0 comments on commit 8fddf45

Please sign in to comment.