Suspend/resume cycling on system resume

After upgrading to nixpkgs ~18324978d632ffc55ef1d928e81630c620f4f447 (when I first noticed the issue), my system is unable to effectively resume from sleep. When I resume the system, it will forcibly re-suspend itself… until it doesn’t. It usually takes between 3-10 attempts for system to stay awake, with anywhere from 5-30 seconds between resumes and re-suspends.

In the journalctl logs below, you’ll see:

Aug 29 10:47:59 nixos systemd-sleep[137498]: System returned from sleep state.
...
Aug 29 10:48:23 nixos systemd-logind[1156]: The system will suspend now!

Not sure where to start with debugging, since the journal doesn’t (to me) show any obvious kernel/login errors.


Relevant details from neofetch:

OS: NixOS 23.11.20230827.a999c1c (Tapir) x86_64
Kernel: 6.1.47
DE: GNOME 44.3
WM: Mutter
CPU: AMD Ryzen 7 2700X (16) @ 3.700GHz
GPU: NVIDIA GeForce RTX 3060 Ti


Here’s the bits of my configuration.nix relating to graphics & DE config:

{
  boot.kernelModules = [
    "nvidia"
  ];

  hardware.nvidia = {
    modesetting.enable = true;
    powerManagement.enable = true;
  };

  hardware.opengl = {
    enable = true;

    driSupport = true;
    driSupport32Bit = true;

    extraPackages = with pkgs; [
      nvidia-vaapi-driver
    ];
  };

  services.xserver = {
    enable = true;

    videoDrivers = [ "nvidia" ];

    desktopManager.gnome.enable = true;
    displayManager.gdm.enable = true;
  };
}

Here’s my full journalctl, starting from the suspend last night, resume this morning, and subsequent 8-ish suspend/resume cycles: https://fars.ee/fH2w