You are not logged in.

#1 2024-12-31 18:35:08

gal673
Member
Registered: 2024-12-31
Posts: 2

[SOLVED] System is unresponsive on resume from suspend (NVIDIA)

Hello, this is my first post so I apologize in advance if I make any mistakes.

I am having an issue with resuming from suspend where the system successfully powers back on, but becomes completely unresponsive with no display output. Switching TTYs does not work, and keyboard input does not register.
This occurs regardless of whether or not a display manager or X server is running, and is present on on both the base kernel and the zen kernel.
Even running systemctl suspend from a TTY will trigger the issue.

The only way I have been able to get the system out of this state is by force-power-off, which is obviously not ideal.

I am using an NVIDIA RTX 4060 GPU with an AMD Ryzen 7700X CPU.

I have tried a billion different things, none of which have worked.
Below are some of my current configuration files:

/etc/default/grub

# GRUB boot loader configuration

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet modules-load=nvidia nvidia_drm.modeset=1 nvidia_drm.fbdev=1"
GRUB_CMDLINE_LINUX=""

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y

# Set to 'countdown' or 'hidden' to change timeout behavior,
# press ESC key to display menu.
GRUB_TIMEOUT_STYLE=menu

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `videoinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
#GRUB_THEME="/path/to/gfxtheme"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

# Uncomment to make GRUB remember the last selection. This requires
# setting 'GRUB_DEFAULT=saved' above.
#GRUB_SAVEDEFAULT=true

# Uncomment to disable submenus in boot menu
#GRUB_DISABLE_SUBMENU=y

# Probing for other operating systems is disabled for security reasons. Read
# documentation on GRUB_DISABLE_OS_PROBER, if still want to enable this
# functionality install os-prober and uncomment to detect and include other
# operating systems.
GRUB_DISABLE_OS_PROBER=false

/etc/mkinitcpio.conf

# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(usbhid xhci_hcd)
#MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)
MODULES=()
# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
FILES=()

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No RAID, lvm2, or encrypted root is needed.
#    HOOKS=(base)
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS=(base udev autodetect modconf block filesystems fsck)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev modconf block filesystems fsck)
#
##   This setup assembles a mdadm array with an encrypted root file system.
##   Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices.
#    HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck)
#
##   This setup loads an lvm2 volume group.
#    HOOKS=(base udev modconf block lvm2 filesystems fsck)
#
##   This will create a systemd based initramfs which loads an encrypted root filesystem.
#    HOOKS=(base systemd autodetect modconf kms keyboard sd-vconsole sd-encrypt block filesystems fsck)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr and fsck hooks.
HOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont block filesystems fsck)

# COMPRESSION
# Use this to compress the initramfs image. By default, zstd compression
# is used for Linux ≥ 5.9 and gzip compression is used for Linux < 5.9.
# Use 'cat' to create an uncompressed image.
#COMPRESSION="zstd"
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()

# MODULES_DECOMPRESS
# Decompress loadable kernel modules and their firmware during initramfs
# creation. Switch (yes/no).
# Enable to allow further decreasing image size when using high compression
# (e.g. xz -9e or zstd --long --ultra -22) at the expense of increased RAM usage
# at early boot.
# Note that any compressed files will be placed in the uncompressed early CPIO
# to avoid double compression.
#MODULES_DECOMPRESS="no"

/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=no
AllowSuspendThenHibernate=no
AllowHybridSleep=no
#SuspendState=mem standby freeze
#HibernateMode=platform shutdown
#MemorySleepMode=
#HibernateDelaySec=
#HibernateOnACPower=yes
#SuspendEstimationSec=60min
[galaxy@brightstone ~]$ cat /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=no
AllowSuspendThenHibernate=no
AllowHybridSleep=no
#SuspendState=mem standby freeze
#HibernateMode=platform shutdown
#MemorySleepMode=
#HibernateDelaySec=
#HibernateOnACPower=yes
#SuspendEstimationSec=60min

/etc/X11/xorg.conf

#Section "ServerLayout"
#    Identifier     "Layout0"
#    Screen 0       "amd" 0 0
#    Inactive       "nvidia"
#    Option         "AllowNVIDIAGPUScreens" "True"
#    InputDevice    "Keyboard0" "CoreKeyboard"
#    InputDevice    "Mouse0" "CorePointer"
#EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Device"
    Identifier     "nvidia"
    Driver         "nvidia"
    BusID          "PCI:1:0:0"
EndSection

Section "Device"
    Identifier     "amd"
    Driver         "amdgpu"
    BusID          "PCI:12:0:0"
EndSection

One very important thing that I have no explanation for is that the system resumed successfully a single time, seemingly randomly, WITHOUT changing any configuration options, and failed to resume again on the very next boot.
Here is the journal log from the successful resume (file was too big for pastebin, I'll make a new link when this one expires
And here is the journal log from an unsuccessful resume (failures look mostly identical but I can post more if requested)

Any help would be greatly appreciated!

Last edited by gal673 (2025-01-03 01:05:45)

Offline

#2 2025-01-02 09:01:03

obelisk
Member
Registered: 2021-01-10
Posts: 67

Re: [SOLVED] System is unresponsive on resume from suspend (NVIDIA)

Please check the output of your services. For me they are:

systemctl list-unit-files | grep -i nvidia
nvidia-hibernate.service                                                  enabled         disabled
nvidia-persistenced.service                                               disabled        disabled
nvidia-powerd.service                                                     disabled        disabled
nvidia-resume.service                                                     enabled         disabled
nvidia-suspend.service                                                    enabled         disabled

Please check also if you can access from another computer via SSH. It it s a laptop, use a LAN cable if wifi is gets not connected.
Just to be sure that the computer is still running and not hanging. And an output of your Xorg.0.log may help

Last edited by obelisk (2025-01-02 09:02:40)

Offline

#3 2025-01-02 14:19:12

seth
Member
Registered: 2012-09-03
Posts: 63,054

Re: [SOLVED] System is unresponsive on resume from suspend (NVIDIA)

Dec 31 09:25:15 brightstone kernel: mt7921e 0000:09:00.0: enabling device (0000 -> 0002)

This most likely isn't nvidia related, https://bbs.archlinux.org/viewtopic.php?id=296954 and also https://bbs.archlinux.org/viewtopic.php … 7#p2217017
Your best chance is to disconnect the Wifi and unload mt7921e before the sleep, then load and reconnect the wifi after the sleep using networkmanager dispatcher scripts or sleep hooks.

Offline

#4 2025-01-03 01:04:51

gal673
Member
Registered: 2024-12-31
Posts: 2

Re: [SOLVED] System is unresponsive on resume from suspend (NVIDIA)

seth wrote:

Your best chance is to disconnect the Wifi and unload mt7921e before the sleep, then load and reconnect the wifi after the sleep using networkmanager dispatcher scripts or sleep hooks.

Thanks, this fixed it!

I created a systemd unit that disables Wi-Fi and Bluetooth on suspend, and resuming seems to be functional now.

Here is said system unit:

/etc/systemd/system/suspend-btkill.service

[Unit]
Description=
Before=sleep.target
StopWhenUnneeded=yes

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/rfkill block all
ExecStop=/usr/bin/rfkill unblock all

[Install]
WantedBy=sleep.target

I'm not 100% confident this solution will last, but I'm still marking the thread as solved.

Offline

#5 2025-01-03 09:22:59

seth
Member
Registered: 2012-09-03
Posts: 63,054

Re: [SOLVED] System is unresponsive on resume from suspend (NVIDIA)

Actually (sorry) disabling BT should™ be sufficient - you do not seem to make use of it (going by your failure log)?
In case the temprary deactivation is not sufficient, try to completely un- and reload the module.

In case this doesn't work out, please bump this thread next to withdrawing the solved tag.

Offline

Board footer

Powered by FluxBB