Announcement

Collapse
No announcement yet.

Suspend using deep sleep mode causes full shutdown / possible premature power cut

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [System] Suspend using deep sleep mode causes full shutdown / possible premature power cut

    Sometime within the last week or so I realized that my PC was cold booting when I had previously put it to sleep. I can't pinpoint exactly when it started, but now every suspend attempt results in a hard shutdown, specifically when using the deep sleep mode (not s2idle). I also suspect intentional shutdowns aren't happening cleanly. Normally the LED on my motherboard will go out with a shutdown but it's staying on, which is what usually happens when it suddenly loses and then regains power.

    After some searching online, I tried various things to try to diagnose the problem but have come up empty.
    Has anyone run into this issue and/or know of a workaround?

    PC Details
    • CPU: AMD Ryzen 7 7700X
    • GPU: NVIDIA GeForce RTX 4070, drivers: nvidia-driver-595-open (595.99.02)
    • Motherboard: ASrock B650E PG Riptide WiFi, firmware: v4.43
    • OS: Kubuntu 26.04.1 (upgraded from 24.04 in early October, suspend functional after upgrade until recently)
    • Kernel: 7.0.0-44
    Notes
    • The journal logs cut cut off abruptly after "kernel: PM: suspend entry (deep)".
    • Google suggested that there might be an issue with the nvidia drivers. Tried changing the configuration in modprobe.d, specifically NVreg_UseKernelSuspendNotifiers=1, but this did not help.
    • Tested systemctl suspend with the full range of stages in /sys/power/pm_test. No power loss / shutdown occurred until setting pm_test back to none.
    • Apt history showed that the issues roughly coincided with a recent upgrade to kernel 7.0.0-44, so on boot I used the grub menu to boot with kernel 7.0.0-43. At first I was able to suspend normally (repeatedly) and thought I had found the issue but then then the next day the problem resumed while still using 7.0.0-43 and I have not been able to replicate the successful suspend.
    • I had not changed any BIOS settings prior to this problem starting. I tried adjusting a few based on some search results but none seemed to improve anything.
    • I also tried updating to the latest non-beta BIOS release for my motherboard since I was previously running an older version, but there was no improvement.
    • I currently have MemorySleepMode=s2idle via a drop-in config in /etc/systemd/sleep.conf.d, and that is working to avoid the shutdowns from deep suspend for the time being, but I want to get deep sleep mode working as before.
    ​

    #2
    what is the output of these commands:

    cat /etc/systemd/sleep.conf

    ls-al /etc/systemd/sleep.conf​.d

    cat /sys/power/state
    ​
    cat /sys/power/mem_sleep
    ​
    cat /sys/power/disk
    ​
    ​
    please preview your reply to ensure the output is in monospace for readability.

    ​
    some stuff i did: https://github.com/droidgoo

    Intel® Core™ i7-14700K | 64 GiB of RAM | AMD RX 6800

    Comment


      #3
      (AI Generated based on my input)

      Your ASRock B650E PG Riptide WiFi (including on BIOS v4.43) fully supports ACPI S3 (deep) sleep—the board's power LED is designed to blink in S3 while fans and the PSU relay power down cleanly.

      The reason every S3 (mem_sleep_default=deep) suspend attempt ends in an abrupt hard shutdown—even though pm_test passes up through core and only fails at none—is a known regression specifically affecting your exact combination of RTX 4070 + nvidia-driver-595-open (595.99.02) + Linux Kernel 7.0.x.

      Why This Is Happening
      • Linux 7.0 + nvidia-open 595 S3/GSP Bug: There is a documented upstream bug with the 595-open driver on 7.0.x kernels (NVIDIA open-gpu-kernel-modules #1117 / #1250). Right as the kernel writes the ACPI S3 sleep transition at PM: suspend entry (deep), the GPU's GSP firmware fails to tear down its PCIe/VRAM state cleanly, tripping the motherboard's power-good signal and causing an immediate hard shutdown.
      • Why Rolling Back to 7.0.0-43 Didn't Fix It: When Ubuntu updated to 7.0.0-44 or refreshed nvidia-driver-595-open, DKMS rebuilt the 595-open modules against the 7.0 kernel headers/toolchain, carrying the same S3 GSP power-transition bug over to 7.0.0-43.
      • Why NVreg_UseKernelSuspendNotifiers=1 Didn't Help: In the 595 driver branch, enabling kernel suspend notifiers bypasses the systemd nvidia-sleep.sh script path, which triggers a known GSP/modeset power-transition fault during S3 on Linux 7.0.


      How to Restore True S3 (Deep) Sleep

      Option 1: Switch Off nvidia-driver-595-open (Recommended)
      Because the RTX 4070 is Ada Lovelace (unlike RTX 50-series Blackwell cards, it does not require the -open kernel module), switching to the standard proprietary module or a different driver branch is the fastest fix on Kubuntu 26.04:
      1. First, remove any custom NVreg_UseKernelSuspendNotifiers=1 line you added in /etc/modprobe.d/.
      2. Check which NVIDIA driver packages are available on your system:
        Code:
        ubuntu-drivers list
      3. Install either the proprietary (non-open) 595 package, the 580 branch, or a newer 615+ driver if listed (for example):
        Code:
        sudo apt install nvidia-driver-580
      4. Reboot and test S3 (deep) suspend.


      Option 2: Stay on 595-open, but Revert to the Systemd Sleep Path
      If you want to stay on nvidia-driver-595-open, explicitly disable kernel suspend notifiers so nvidia-suspend.service handles VRAM preservation before S3 entry:
      1. Create or edit /etc/modprobe.d/nvidia-sleep.conf and add:
        Code:
        options nvidia NVreg_UseKernelSuspendNotifiers=0 NVreg_PreserveVideoMemoryAllocations=1 NVreg_TemporaryFilePath=/var/tmp
      2. Make sure all three NVIDIA systemd sleep units are enabled:
        Code:
        sudo systemctl enable nvidia-suspend.service nvidia-resume.service nvidia-hibernate.service
      3. Update initramfs and reboot:
        Code:
        sudo update-initramfs -u


      Option 3: Check BIOS ACPI & IOMMU Settings (If Power Cut Persists)
      If the board still cuts power at PM: suspend entry (deep) after fixing the NVIDIA suspend path, check two UEFI settings on your B650E PG Riptide WiFi:
      • Advanced → ACPI Configuration → Deep Sleep: Set to Disabled (this controls S4/S5 standby rail cutoff; keeping it Disabled ensures +5VSB/DDR5 self-refresh power stays stable during Linux S3).
      • IOMMU: Try adding iommu=pt to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub (followed by sudo update-grub), which resolves S3 entry/resume power drops on several B650E boards under newer kernels.


      (Note: Upstream testers have also confirmed that nvidia-open 595 suspends cleanly to S3 deep on 6.17 / 6.18 kernels, so booting a 6.x kernel from GRUB is another quick way to verify this if you still have one installed.)

      ​
      Slava Ukraini! 🇺🇦
      Windows no longer obstruct my view.
      Using Kubuntu Linux since March 23, 2007.
      "It is a capital mistake to theorize before one has data." - Sherlock Holmes​

      Comment


        #4
        Originally posted by skyfishgoo View Post
        what is the output of these commands:

        cat /etc/systemd/sleep.conf

        ls-al /etc/systemd/sleep.conf​.d

        cat /sys/power/state
        ​
        cat /sys/power/mem_sleep
        ​
        cat /sys/power/disk
        ​
        ​
        please preview your reply to ensure the output is in monospace for readability.

        ​
        Contents of sleep.conf.d:
        Code:
        $ ls -al /etc/systemd/sleep.conf.d/
        total 16
        drwxr-xr-x 2 root root 4096 Nov 24 13:02 .
        drwxr-xr-x 7 root root 4096 Nov 21 15:16 ..
        -rw-r--r-- 1 root root  101 Nov 24 13:01 disable-hibernate.conf
        -rw-r--r-- 1 root root   67 Nov 24 13:01 sleep-mode.conf​
        Here are all the config contents as seen by systemd-analyze:
        Code:
        $ systemd-analyze cat-config --no-pager systemd/sleep.conf
        # /etc/systemd/sleep.conf
        #  This file is part of systemd.
        #
        #  systemd is free software; you can redistribute it and/or modify it under the
        #  terms of the GNU Lesser General Public License as published by the Free
        #  Software Foundation; either version 2.1 of the License, or (at your option)
        #  any later version.
        #
        # Entries in this file show the compile time defaults. Local configuration
        # should be created by either modifying this file (or a copy of it placed in
        # /etc/ if the original file is shipped in /usr/), or by creating "drop-ins" in
        # the /etc/systemd/sleep.conf.d/ directory. The latter is generally
        # recommended. Defaults can be restored by simply deleting the main
        # configuration file and all drop-ins located in /etc/.
        #
        # Use 'systemd-analyze cat-config systemd/sleep.conf' to display the full config.
        #
        # See systemd-sleep.conf(5) for details.
        
        [Sleep]
        #AllowSuspend=yes
        #AllowHibernation=yes
        #AllowSuspendThenHibernate=yes
        #AllowHybridSleep=yes
        #SuspendState=mem standby freeze
        #HibernateMode=platform shutdown
        #MemorySleepMode=
        #HibernateDelaySec=
        #HibernateOnACPower=yes
        #SuspendEstimationSec=60min
        
        # /etc/systemd/sleep.conf.d/disable-hibernate.conf
        # Disable hibernation
        
        [Sleep]
        AllowHibernation=no
        AllowSuspendThenHibernate=no
        AllowHybridSleep=no
        
        
        # /etc/systemd/sleep.conf.d/sleep-mode.conf
        # Set sleep mode
        
        [Sleep]
        SuspendState=mem
        MemorySleepMode=s2idle​
        Lastly, the files in /sys/power:
        Code:
        $ cat /sys/power/{state,mem_sleep,disk}
        freeze mem disk
        s2idle [deep]
        [platform] shutdown reboot suspend test_resume

        Comment


          #5
          Originally posted by Snowhog View Post
          The reason every S3 (mem_sleep_default=deep) suspend attempt ends in an abrupt hard shutdown—even though pm_test passes up through core and only fails at none—is a known regression specifically affecting your exact combination of RTX 4070 + nvidia-driver-595-open (595.99.02) + Linux Kernel 7.0.x.

          Why This Is Happening
          • Linux 7.0 + nvidia-open 595 S3/GSP Bug: There is a documented upstream bug with the 595-open driver on 7.0.x kernels (NVIDIA open-gpu-kernel-modules #1117 / #1250). Right as the kernel writes the ACPI S3 sleep transition at PM: suspend entry (deep), the GPU's GSP firmware fails to tear down its PCIe/VRAM state cleanly, tripping the motherboard's power-good signal and causing an immediate hard shutdown.
          • Why Rolling Back to 7.0.0-43 Didn't Fix It: When Ubuntu updated to 7.0.0-44 or refreshed nvidia-driver-595-open, DKMS rebuilt the 595-open modules against the 7.0 kernel headers/toolchain, carrying the same S3 GSP power-transition bug over to 7.0.0-43.
          • Why NVreg_UseKernelSuspendNotifiers=1 Didn't Help: In the 595 driver branch, enabling kernel suspend notifiers bypasses the systemd nvidia-sleep.sh script path, which triggers a known GSP/modeset power-transition fault during S3 on Linux 7.0.


          How to Restore True S3 (Deep) Sleep

          Option 1: Switch Off nvidia-driver-595-open (Recommended)
          Because the RTX 4070 is Ada Lovelace (unlike RTX 50-series Blackwell cards, it does not require the -open kernel module), switching to the standard proprietary module or a different driver branch is the fastest fix on Kubuntu 26.04:
          1. First, remove any custom NVreg_UseKernelSuspendNotifiers=1 line you added in /etc/modprobe.d/.
          2. Check which NVIDIA driver packages are available on your system:
            Code:
            ubuntu-drivers list
          3. Install either the proprietary (non-open) 595 package, the 580 branch, or a newer 615+ driver if listed (for example):
            Code:
            sudo apt install nvidia-driver-580
          4. Reboot and test S3 (deep) suspend.

          ​
          Re: option 2, I had already re-enabled the nvidia-(suspend|resume|hibernate) units and reverted the modprobe.d configuration to what it was originally, all while still on the 595 driver with no luck.

          Re: option 1, I had not yet tried using a different nvidia driver version.
          • I checked some journal logs from before the upgraded to Kubuntu 26.0.4.1 and I was previously using the 580 nvidia driver, so I decided to try downgrading to that.
          • I used sudo ubuntu-drivers install nvidia-driver-580-open to downgrade from the 595 driver to 580 and then rebooted.
          • After reboot, I updated the sleep-mode.conf drop-in config in sleep.conf.d and set back MemorySleepMode=deep, then suspended the system, and it worked like before!
          So it seems like the 595 driver was the culprit, as your post suggested. Thanks for the assist!

          Comment

          Users Viewing This Topic

          Collapse

          There are 2 users viewing this topic.

          Working...
          X