Can't wake pc after suspend

Hi!

I’ve been trying to setup possibility to suspend my pc and then wake it up. systemctl suspend makes my pc sleep though all the lights in case are still glowing. When I try to press any buttons on the keyboard it starts glowing though the neither the monitor nor pc wakes up.

Here is journalctl logs:

    Aug 01 01:24:15 nixos polkitd[1906]: Registered Authentication Agent for unix-process:3239:16986 (system bus nam>
    Aug 01 01:24:15 nixos systemd-logind[1425]: The system will suspend now!
    Aug 01 01:24:15 nixos polkitd[1906]: Unregistered Authentication Agent for unix-process:unknown (system bus name>
    Aug 01 01:24:15 nixos systemd[1]: Starting Pre-Sleep Actions...
    Aug 01 01:24:15 nixos systemd[1]: pre-sleep.service: Deactivated successfully.
    Aug 01 01:24:15 nixos systemd[1]: Finished Pre-Sleep Actions.
    Aug 01 01:24:15 nixos systemd[1]: Reached target Sleep.
    Aug 01 01:24:15 nixos systemd[1]: Starting System Suspend...
    Aug 01 01:24:15 nixos systemd-sleep[3260]: Performing sleep operation 'suspend'...
    Aug 01 01:24:15 nixos kernel: PM: suspend entry (deep)
    
    
    ------ this is were I hard reset the pc with reset button
    
    
    -- Boot 2e1df8a0440646c4a5be6ed447351311 --
    Aug 01 01:25:20 nixos kernel: Linux version 6.9.9 (nixbld@localhost) (gcc (GCC) 13.3.0, GNU ld (GNU Binutils) 2.>
    Aug 01 01:25:20 nixos kernel: Command line: initrd=\EFI\nixos\jl7y884qshw5w8bhcrrk2g11szvv4q6b-initrd-linux-6.9.>
    Aug 01 01:25:20 nixos kernel: x86/tme: not enabled by BIOS
    Aug 01 01:25:20 nixos kernel: x86/split lock detection: #AC: crashing the kernel on kernel split_locks and warni>
    Aug 01 01:25:20 nixos kernel: BIOS-provided physical RAM map:

Note, that there is no logs which would correspond to trying to wake up even.

I have RTX 4090 and I thought that the reason might be it. I tried open/proprietary drivers, different options untill decided to comment all the nvidia related stuff from my config and go even further as to disconnect the power cord from the video card (it is still connected to motherboard though). Needless to say: it didn’t help.

I am not sure which my options are now. I used disko to create my partitions (not sure why I have two swaps there to be honest):

    {
      disko.devices = {
        disk = {
          vdb = {
            type = "disk";
            device = "/dev/nvme1n1";
            content = {
              type = "gpt";
              partitions = {
                ESP = {
                  priority = 1;
                  name = "ESP";
                  start = "1M";
                  end = "128M";
                  type = "EF00";
                  content = {
                    type = "filesystem";
                    format = "vfat";
                    mountpoint = "/boot";
                  };
                };
                root = {
                  size = "100%";
                  content = {
                    type = "btrfs";
                    extraArgs = [ "-f" ]; # Override existing partition
                    # Subvolumes must set a mountpoint in order to be mounted,
                    # unless their parent is mounted
                    subvolumes = {
                      # Subvolume name is different from mountpoint
                      "/rootfs" = {
                        mountpoint = "/";
                      };
                      # Subvolume name is the same as the mountpoint
                      "/home" = {
                        mountOptions = [ "compress=zstd" ];
                        mountpoint = "/home";
                      };
                      # Parent is not mounted so the mountpoint must be set
                      "/nix" = {
                        mountOptions = [ "compress=zstd" "noatime" ];
                        mountpoint = "/nix";
                      };
                      # Subvolume for the swapfile
                      "/swap" = {
                        mountpoint = "/.swapvol";
                        swap = {
                          swapfile.size = "72G";
                        };
                      };
                    };
    
                    mountpoint = "/partition-root";
                    swap = {
                      swapfile = {
                        size = "70G";
                      };
                    };
                  };
                };
              };
            };
          };
        };
      };
    }

My specs:
i9 14900k RTX 4090
Gigabyte Z790 Aorus Elite X Wi-Fi7 v. 1.0
G.Skill DDR5-6400 4x16 (had to turn off xmp1 - it prevented nvidia drivers from compiling on latest kernel)

More than happy to provide more info if needed

First, could you try physically pulling out the gpu? I know its annoying but it would help, if not verify that it doesnt show up as a PCI device at all, if it does it might still be be breaking things.

Second try the suspend&resume with

echo 1 | sudo tee /sys/power/pm_debug_messages

According to How to achieve S0ix states in Linux* and then send the logs

Next try to suspend to s2idle,

echo s2idle | sudo tee /sys/power/mem_sleep  

It doesnt need BIOS cooperation but isn’t nearly as power saving unless you manage to enter s0ix (refer to the above link if curious). S0ix might not be supported by your cpu, im not sure whats the state of it but my laptop 12th gen i7 has only s0ix. Your machine already enters deep (a.k.a. s3) by default, so thats good.

To get back to s3 (“normal” suspend) do

echo deep | sudo tee /sys/power/mem_sleep  

Youre already running the latest kernel, so you can’t update, do try updating your BIOS if you havent done that already.

1 Like

Thank you for so detailed reply!

Eventually I fixed the issue by… drum rolls… resetting the bios to its defaults (which was in default state btw). I wish, I do wish I tried that before I unmounted the videocard from motherboard ))

I also had to enable nvidia power management in order to have a successful awake which won’t break hyprland window manager.

Glad you fixed it! Enabling nvidia power management is generally a good idea by now, when I run nvidia, modeset, pm and finegrained pm all get enabled. Finegrained is more important on laptops but evwn in desktops its nice. Well, it depends on if you have two GPUs, finegrained is able to power off the gpu fully when not in use.

1 Like