Erm, are you sure you’re up-to-date and not on a weird mix of channels? The default stable kernel currently builds fine, which should be unrelated to actual hardware, and the rcu patch hasn’t been necessary for what feels like over a year now.
I’m currently seeing absolutely zero issues on a 4060ti, and was until it blew itself up on a 2070 super. This is all relevant config (any unset hardware.nvidia
settings are deliberately left to their defaults):
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
version = "565.77";
sha256_64bit = "sha256-CnqnQsRrzzTXZpgkAtF7PbH9s7wbiTRNcM0SPByzFHw=";
sha256_aarch64 = lib.fakeHash;
openSha256 = "sha256-Fxo0t61KQDs71YA8u7arY+503wkAc1foaa51vi2Pl5I=";
settingsSha256 = "sha256-VUetj3LlOSz/LB+DDfMCN34uA4bNTTpjDrb6C6Iwukk=";
persistencedSha256 = lib.fakeHash;
};
# This will no longer be necessary when
# https://github.com/NixOS/nixpkgs/pull/326369 hits stable
modesetting.enable = lib.mkDefault true;
# Power management is nearly always required to get nvidia GPUs to
# behave on suspend, due to firmware bugs.
powerManagement.enable = true;
# The open driver is recommended by nvidia now, see
# https://download.nvidia.com/XFree86/Linux-x86_64/565.77/README/kernel_open.html
open = true;
};
boot.kernelPackages = lib.mkForce pkgs.linuxKernel.packages.linux_xanmod;
565.77 is the latest driver, and actually a stable release, the whole “certified” thing is mostly aimed at commercial users AIUI.
YMMV of course, this is mostly for reference. However, there are loads of snippets out there, and many of them are bad advice like not using the open driver and not enabling the powermanagement daemon, which is exactly how you would get issues with sleep.