Suspend problem

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.

Yeah. Even before i forked the nixpkgs repo and such, i was still using the default channels and had tons of problems with getting the GPU working correctly.

Ill be honest though, ive not tried the new 565 drivers as ive been a bit gun shy about it. Ive never had a fun time when i mess with the NVIDIA drivers.

Ill give them a whirl though and see if they fixed some stuff.

Consider filing a nix bug, if you’re actually building vanilla nixpkgs you’ve hit some serious reproducibility holes.

Probably, but i’ve dealt with NVIDIA driver bullshit for so long on different distros that i hadnt really though about it given the proprietary nature of NVIDIA’s driverset. (until recently)

To correct tho, the default open source novo drivers DID work and did display and such, just at 30hz refresh and bad scaling and the kernel did compile. But it took some tweaking to get the NVIDIA drivers to build and work correctly.

The default kernel didnt build with the nvidia drivers, i tried probably about 25+ kernels before finally settling on zen1 6.8.9. Some of them built, most did not. Those that did often didnt work well or had some really annoying bugs. This kernel seems to work smoothly, the new kernels will fail when building the NVIDIA modules.

Maybe i just have really shit luck.

I am on driver version 565.77 as well.