You are not logged in.
Hi!
I've been trying to diagnose a recent problem that has emerged in the last month or so when it comes to closing my laptop lid and having my laptop enter a suspend-then-hibernate state. Previously, if I closed my laptop lid, it would suspend itself and, if left alone for long enough, hibernate based on delay I configured. Now, my laptop no longer does that. It fails to sleep if I close the lid or leave it idle.
After digging in the system logs and trying to reproduce the issue, I believe it's because the systemd-suspend-then-hibernate service is not triggering the correct nvidia-suspend service.
This is what journalctl contains when I close the laptop lid when I have my laptop set to suspend-then-hibernate.
Nov 01 18:44:47 barristan systemd-logind[1069]: Lid closed.
Nov 01 18:44:47 barristan systemd-logind[1069]: The system will suspend and later hibernate now!
Nov 01 18:44:47 barristan NetworkManager[1067]: <info> [1730504687.1471] manager: sleep: sleep requested (sleeping: no enabled: yes)
Nov 01 18:44:47 barristan NetworkManager[1067]: <info> [1730504687.1472] device (p2p-dev-wlp0s20f3): state change: disconnected -> unmanaged (reason 'unmanaged-sleeping', managed-type: 'full')
Nov 01 18:44:47 barristan NetworkManager[1067]: <info> [1730504687.1474] manager: NetworkManager state is now ASLEEP
Nov 01 18:44:47 barristan NetworkManager[1067]: <info> [1730504687.1474] device (wlp0s20f3): state change: activated -> deactivating (reason 'sleeping', managed-type: 'full')
Nov 01 18:44:47 barristan kded6[1406]: org.kde.plasma.nm.kded: Unhandled active connection state change: 3
Nov 01 18:44:47 barristan systemd[1]: Starting Network Manager Script Dispatcher Service...
Nov 01 18:44:47 barristan systemd[1]: Started dbus-:1.2-org.kde.powerdevil.backlighthelper@15.service.
Nov 01 18:44:47 barristan systemd[1]: Started Network Manager Script Dispatcher Service.
Nov 01 18:44:47 barristan kernel: wlp0s20f3: deauthenticating from XX:XX:XX:XX:XX:XX by local choice (Reason: 3=DEAUTH_LEAVING)
Nov 01 18:44:47 barristan wpa_supplicant[1132]: nl80211: send_event_marker failed: Source based routing not supported
Nov 01 18:44:47 barristan wpa_supplicant[1132]: wlp0s20f3: CTRL-EVENT-DISCONNECTED bssid=XX:XX:XX:XX:XX:XX reason=3 locally_generated=1
Nov 01 18:44:47 barristan wpa_supplicant[1132]: wlp0s20f3: CTRL-EVENT-DSCP-POLICY clear_all
Nov 01 18:44:47 barristan NetworkManager[1067]: <info> [1730504687.4428] device (wlp0s20f3): state change: deactivating -> disconnected (reason 'sleeping', managed-type: 'full')
Nov 01 18:44:47 barristan NetworkManager[1067]: <info> [1730504687.4429] dhcp4 (wlp0s20f3): canceled DHCP transaction
Nov 01 18:44:47 barristan NetworkManager[1067]: <info> [1730504687.4429] dhcp4 (wlp0s20f3): activation: beginning transaction (timeout in 45 seconds)
Nov 01 18:44:47 barristan NetworkManager[1067]: <info> [1730504687.4429] dhcp4 (wlp0s20f3): state changed no lease
Nov 01 18:44:47 barristan NetworkManager[1067]: <info> [1730504687.4882] device (wlp0s20f3): set-hw-addr: set MAC address to XX:XX:XX:XX:XX:XX (scanning)
Nov 01 18:44:47 barristan NetworkManager[1067]: <info> [1730504687.6067] device (wlp0s20f3): supplicant interface state: completed -> disconnected
Nov 01 18:44:47 barristan NetworkManager[1067]: <info> [1730504687.6069] device (wlp0s20f3): state change: disconnected -> unmanaged (reason 'unmanaged-sleeping', managed-type: 'full')
Nov 01 18:44:47 barristan NetworkManager[1067]: <info> [1730504687.7511] device (wlp0s20f3): set-hw-addr: reset MAC address to XX:XX:XX:XX:XX:XX (unmanage)
Nov 01 18:44:47 barristan systemd[1]: Reached target Sleep.
Nov 01 18:44:47 barristan systemd[1]: Starting System Suspend then Hibernate...
Nov 01 18:44:47 barristan wpa_supplicant[1132]: p2p-dev-wlp0s20: CTRL-EVENT-DSCP-POLICY clear_all
Nov 01 18:44:47 barristan wpa_supplicant[1132]: p2p-dev-wlp0s20: CTRL-EVENT-DSCP-POLICY clear_all
Nov 01 18:44:47 barristan wpa_supplicant[1132]: nl80211: deinit ifname=p2p-dev-wlp0s20 disabled_11b_rates=0
Nov 01 18:44:47 barristan systemd-sleep[34521]: User sessions remain unfrozen on explicit request ($SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=0).
Nov 01 18:44:47 barristan systemd-sleep[34521]: This is not recommended, and might result in unexpected behavior, particularly
Nov 01 18:44:47 barristan systemd-sleep[34521]: in suspend-then-hibernate operations or setups with encrypted home directories.
Nov 01 18:44:47 barristan wpa_supplicant[1132]: wlp0s20f3: CTRL-EVENT-DSCP-POLICY clear_all
Nov 01 18:44:47 barristan wpa_supplicant[1132]: wlp0s20f3: CTRL-EVENT-DSCP-POLICY clear_all
Nov 01 18:44:47 barristan wpa_supplicant[1132]: nl80211: deinit ifname=wlp0s20f3 disabled_11b_rates=0
Nov 01 18:44:47 barristan kernel: PM: suspend entry (s2idle)
Nov 01 18:44:47 barristan systemd-sleep[34521]: Performing sleep operation 'suspend'...
Nov 01 18:44:47 barristan kernel: Filesystems sync: 0.009 seconds
Nov 01 18:44:50 barristan kernel: Freezing user space processes
Nov 01 18:44:50 barristan kernel: Freezing user space processes completed (elapsed 0.001 seconds)
Nov 01 18:44:50 barristan kernel: OOM killer disabled.
Nov 01 18:44:50 barristan kernel: Freezing remaining freezable tasks
Nov 01 18:44:50 barristan kernel: Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
Nov 01 18:44:50 barristan kernel: printk: Suspending console(s) (use no_console_suspend to debug)
Nov 01 18:44:50 barristan kernel: cs35l41-hda i2c-CSC3551:00-cs35l41-hda.0: Asserting Reset
Nov 01 18:44:50 barristan kernel: NVRM: GPU 0000:01:00.0: PreserveVideoMemoryAllocations module parameter is set. System Power Management attempted without driver procfs suspend interface. Please refer to the '>
Nov 01 18:44:50 barristan kernel: nvidia 0000:01:00.0: PM: pci_pm_suspend(): nv_pmops_suspend [nvidia] returns -5
Nov 01 18:44:50 barristan kernel: nvidia 0000:01:00.0: PM: dpm_run_callback(): pci_pm_suspend returns -5
Nov 01 18:44:50 barristan kernel: nvidia 0000:01:00.0: PM: failed to suspend async: error -5
Nov 01 18:44:50 barristan kernel: PM: Some devices failed to suspend, or early wake event detected
Nov 01 18:44:50 barristan kernel: spd5118 12-0050: PM: dpm_run_callback(): spd5118_resume [spd5118] returns -6
Nov 01 18:44:50 barristan kernel: spd5118 12-0050: PM: failed to resume async: error -6
Nov 01 18:44:50 barristan kernel: spd5118 12-0052: PM: dpm_run_callback(): spd5118_resume [spd5118] returns -6
Nov 01 18:44:50 barristan kernel: spd5118 12-0052: PM: failed to resume async: error -6
<snip>
Nov 01 18:44:52 barristan kernel: random: crng reseeded on system resumption
Nov 01 18:44:52 barristan pipewire[1334]: pw.node: (alsa_output.pci-0000_01_00.1.hdmi-stereo-172) graph xrun not-triggered (0 suppressed)
Nov 01 18:44:52 barristan pipewire[1334]: pw.node: (alsa_output.pci-0000_01_00.1.hdmi-stereo-172) xrun state:0x7917ba3ec008 pending:0/2 s:32634034019837 a:32634034128799 f:32634034138715 waiting:108962 process:>
Nov 01 18:44:52 barristan kernel: cs35l41-hda i2c-CSC3551:00-cs35l41-hda.0: DSP1: Firmware: 400a4 vendor: 0x2 v0.43.1, 2 algorithms
Nov 01 18:44:52 barristan kernel: cs35l41-hda i2c-CSC3551:00-cs35l41-hda.0: DSP1: cirrus/cs35l41-dsp1-spk-prot-17aa2316-spkid0-r0.bin: v0.43.1
Nov 01 18:44:52 barristan kernel: cs35l41-hda i2c-CSC3551:00-cs35l41-hda.0: DSP1: spk-prot: C:\Working\Project\LCH3\2023-03-15-SZ\LS\17AA2316_20230113_V0_A0.bin
Nov 01 18:44:52 barristan systemd-sleep[34521]: Failed to put system to sleep. System resumed again: Input/output error
Nov 01 18:44:52 barristan kernel: PM: suspend exit
Nov 01 18:44:52 barristan systemd[1]: systemd-suspend-then-hibernate.service: Main process exited, code=exited, status=1/FAILURE
Nov 01 18:44:52 barristan systemd[1]: systemd-suspend-then-hibernate.service: Failed with result 'exit-code'.
Nov 01 18:44:52 barristan systemd[1]: Failed to start System Suspend then Hibernate.
If I configure my system to just suspend, not suspend-then-hibernate, not hybrid-sleep, the laptop goes to sleep as expected. This is what I see in journalctl
Nov 01 19:04:06 barristan systemd-logind[1069]: Lid closed.
Nov 01 19:04:07 barristan systemd-logind[1069]: The system will suspend now!
Nov 01 19:04:07 barristan NetworkManager[1067]: <info> [1730505847.0114] manager: sleep: sleep requested (sleeping: no enabled: yes)
Nov 01 19:04:07 barristan NetworkManager[1067]: <info> [1730505847.0115] device (p2p-dev-wlp0s20f3): state change: disconnected -> unmanaged (reason 'unmanaged-sleeping', managed-type: 'full')
Nov 01 19:04:07 barristan NetworkManager[1067]: <info> [1730505847.0116] manager: NetworkManager state is now ASLEEP
Nov 01 19:04:07 barristan NetworkManager[1067]: <info> [1730505847.0117] device (wlp0s20f3): state change: activated -> deactivating (reason 'sleeping', managed-type: 'full')
Nov 01 19:04:07 barristan kded6[1406]: org.kde.plasma.nm.kded: Unhandled active connection state change: 3
Nov 01 19:04:07 barristan systemd[1]: Starting Network Manager Script Dispatcher Service...
Nov 01 19:04:07 barristan systemd[1]: Started Network Manager Script Dispatcher Service.
Nov 01 19:04:07 barristan kernel: wlp0s20f3: deauthenticating from XX:XX:XX:XX:XX:XX by local choice (Reason: 3=DEAUTH_LEAVING)
Nov 01 19:04:07 barristan wpa_supplicant[1132]: nl80211: send_event_marker failed: Source based routing not supported
Nov 01 19:04:07 barristan wpa_supplicant[1132]: wlp0s20f3: CTRL-EVENT-DISCONNECTED bssid=XX:XX:XX:XX:XX:XX reason=3 locally_generated=1
Nov 01 19:04:07 barristan wpa_supplicant[1132]: wlp0s20f3: CTRL-EVENT-DSCP-POLICY clear_all
Nov 01 19:04:07 barristan NetworkManager[1067]: <info> [1730505847.2395] device (wlp0s20f3): supplicant interface state: completed -> disconnected
Nov 01 19:04:07 barristan NetworkManager[1067]: <info> [1730505847.2396] device (wlp0s20f3): state change: deactivating -> disconnected (reason 'sleeping', managed-type: 'full')
Nov 01 19:04:07 barristan NetworkManager[1067]: <info> [1730505847.2398] dhcp4 (wlp0s20f3): canceled DHCP transaction
Nov 01 19:04:07 barristan NetworkManager[1067]: <info> [1730505847.2398] dhcp4 (wlp0s20f3): activation: beginning transaction (timeout in 45 seconds)
Nov 01 19:04:07 barristan NetworkManager[1067]: <info> [1730505847.2398] dhcp4 (wlp0s20f3): state changed no lease
Nov 01 19:04:07 barristan NetworkManager[1067]: <info> [1730505847.2689] device (wlp0s20f3): set-hw-addr: set MAC address to XX:XX:XX:XX:XX:XX (scanning)
Nov 01 19:04:07 barristan NetworkManager[1067]: <info> [1730505847.3902] device (wlp0s20f3): state change: disconnected -> unmanaged (reason 'unmanaged-sleeping', managed-type: 'full')
Nov 01 19:04:07 barristan NetworkManager[1067]: <info> [1730505847.5274] device (wlp0s20f3): set-hw-addr: reset MAC address to XX:XX:XX:XX:XX:XX (unmanage)
Nov 01 19:04:07 barristan systemd[1]: Reached target Sleep.
Nov 01 19:04:07 barristan systemd[1]: Starting NVIDIA system suspend actions...
Nov 01 19:04:07 barristan wpa_supplicant[1132]: p2p-dev-wlp0s20: CTRL-EVENT-DSCP-POLICY clear_all
Nov 01 19:04:07 barristan wpa_supplicant[1132]: p2p-dev-wlp0s20: CTRL-EVENT-DSCP-POLICY clear_all
Nov 01 19:04:07 barristan wpa_supplicant[1132]: nl80211: deinit ifname=p2p-dev-wlp0s20 disabled_11b_rates=0
Nov 01 19:04:07 barristan suspend[36554]: nvidia-suspend.service
Nov 01 19:04:07 barristan logger[36554]: <13>Nov 1 19:04:07 suspend: nvidia-suspend.service
Nov 01 19:04:07 barristan kwin_wayland[1275]: kwin_wayland_drm: atomic commit failed: Permission denied
Nov 01 19:04:07 barristan wpa_supplicant[1132]: wlp0s20f3: CTRL-EVENT-DSCP-POLICY clear_all
Nov 01 19:04:07 barristan wpa_supplicant[1132]: wlp0s20f3: CTRL-EVENT-DSCP-POLICY clear_all
Nov 01 19:04:07 barristan wpa_supplicant[1132]: nl80211: deinit ifname=wlp0s20f3 disabled_11b_rates=0
Nov 01 19:04:08 barristan kded6[1406]: org.kde.pulseaudio: No object for name "alsa_input.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Mic1__source"
Nov 01 19:04:08 barristan kded6[1406]: org.kde.pulseaudio: No object for name "alsa_output.pci-0000_01_00.1.hdmi-stereo"
Nov 01 19:04:08 barristan kded6[1406]: org.kde.pulseaudio: No object for name "alsa_input.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Mic1__source"
Nov 01 19:04:08 barristan kded6[1406]: org.kde.pulseaudio: No object for name "@DEFAULT_SINK@"
Nov 01 19:04:08 barristan kded6[1406]: org.kde.pulseaudio: No object for name "@DEFAULT_SOURCE@"
Nov 01 19:04:08 barristan plasmashell[1463]: org.kde.pulseaudio: No object for name "alsa_input.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Mic1__source"
Nov 01 19:04:08 barristan kded6[1406]: org.kde.pulseaudio: No object for name "@DEFAULT_SINK@"
Nov 01 19:04:08 barristan kded6[1406]: org.kde.pulseaudio: No object for name "@DEFAULT_SOURCE@"
Nov 01 19:04:08 barristan plasmashell[1463]: file:///usr/share/plasma/plasmoids/org.kde.plasma.volume/contents/ui/main.qml:91: TypeError: Cannot read property 'description' of undefined
Nov 01 19:04:08 barristan plasmashell[1463]: org.kde.pulseaudio: No object for name "alsa_output.pci-0000_01_00.1.hdmi-stereo"
Nov 01 19:04:08 barristan plasmashell[1463]: org.kde.pulseaudio: No object for name "alsa_input.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Mic1__source"
Nov 01 19:04:08 barristan plasmashell[1463]: org.kde.pulseaudio: No object for name "@DEFAULT_SINK@"
Nov 01 19:04:08 barristan plasmashell[1463]: org.kde.pulseaudio: No object for name "@DEFAULT_SOURCE@"
Nov 01 19:04:08 barristan plasmashell[1463]: org.kde.pulseaudio: No object for name "@DEFAULT_SINK@"
Nov 01 19:04:08 barristan plasmashell[1463]: org.kde.pulseaudio: No object for name "@DEFAULT_SOURCE@"
Nov 01 19:04:08 barristan kded6[1406]: org.kde.pulseaudio: No object for name "auto_null.monitor"
Nov 01 19:04:08 barristan plasmashell[1463]: org.kde.pulseaudio: No object for name "auto_null.monitor"
<snip>
Nov 01 19:04:09 barristan systemd[1]: nvidia-suspend.service: Deactivated successfully.
Nov 01 19:04:09 barristan systemd[1]: Finished NVIDIA system suspend actions.
Nov 01 19:04:09 barristan systemd[1]: Starting System Suspend...
Nov 01 19:04:09 barristan systemd-sleep[36581]: User sessions remain unfrozen on explicit request ($SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=0).
Nov 01 19:04:09 barristan systemd-sleep[36581]: This is not recommended, and might result in unexpected behavior, particularly
Nov 01 19:04:09 barristan systemd-sleep[36581]: in suspend-then-hibernate operations or setups with encrypted home directories.
Nov 01 19:04:09 barristan systemd-sleep[36581]: Performing sleep operation 'suspend'...
The big thing I noticed is that when the laptop is just set to sleep/suspend, it triggers the nvidia-suspend service and suceeds in going to sleep.
Based on what I've read in on the Arch Wiki (here: https://wiki.archlinux.org/title/NVIDIA … r_suspend), it doesn't look like I need to go fiddle with PreserveVideoMemory or enable the nvidia services. Rather, I just need to make sure that the services trigger on suspending, resuming, and hibernating.
To save and restore all video memory contents, NVreg_PreserveVideoMemoryAllocations=1 kernel module parameter for the nvidia kernel module needs to be set. While NVIDIA does not set this by default, Arch Linux does for the supported drivers.
You also need to have the services nvidia-suspend.service, nvidia-hibernate.service, and nvidia-resume.service enabled. Arch Linux enables them by default on supported drivers, as per upstream requirements.
What's the best way to restoring this functionality so that I can have my laptop suspend, then hibernate and have the modification persist across package upgrades?
Offline