Sleep is broken, memory allocation error (related to AMD GPU?)

Hi,

I’ve seen this post, and edited the systemd config file as suggested, but systemctl suspend doesn’t always work. It’s been about a month.

Here is an excerpt from the system journal that talks about sleep / suspend

oct. 21 23:22:50 shibboleth systemd-logind[2125]: The system will suspend now!
oct. 21 23:22:50 shibboleth NetworkManager[2122]: <info>  [1729545770.8786] manager: sleep: sleep requested (sleeping: no  enabled: yes)
oct. 21 23:22:50 shibboleth NetworkManager[2122]: <info>  [1729545770.8786] device (enp3s0): state change: unavailable -> unmanaged (reason 'unmanaged-sleeping', sys-iface-state: 'managed')
oct. 21 23:22:50 shibboleth NetworkManager[2122]: <info>  [1729545770.8810] device (p2p-dev-wlp0s20u9): state change: disconnected -> unmanaged (reason 'unmanaged-sleeping', sys-iface-state: 'man>
oct. 21 23:22:50 shibboleth NetworkManager[2122]: <info>  [1729545770.8813] manager: NetworkManager state is now ASLEEP
oct. 21 23:22:50 shibboleth NetworkManager[2122]: <info>  [1729545770.8814] device (wlp0s20u9): state change: activated -> deactivating (reason 'sleeping', sys-iface-state: 'managed')
oct. 21 23:22:50 shibboleth systemd[1]: Starting Network Manager Script Dispatcher Service...
oct. 21 23:22:50 shibboleth systemd[1]: Started Network Manager Script Dispatcher Service.
oct. 21 23:22:50 shibboleth wpa_supplicant[2862]: nl80211: send_event_marker failed: Source based routing not supported
oct. 21 23:22:50 shibboleth wpa_supplicant[2862]: wlp0s20u9: CTRL-EVENT-DISCONNECTED bssid=38:b5:c9:53:a3:15 reason=3 locally_generated=1
oct. 21 23:22:50 shibboleth wpa_supplicant[2862]: wlp0s20u9: CTRL-EVENT-DSCP-POLICY clear_all
oct. 21 23:22:50 shibboleth wpa_supplicant[2862]: wlp0s20u9: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
oct. 21 23:22:50 shibboleth NetworkManager[2122]: <info>  [1729545770.9277] device (wlp0s20u9): supplicant interface state: completed -> disconnected
oct. 21 23:22:50 shibboleth NetworkManager[2122]: <info>  [1729545770.9281] device (wlp0s20u9): state change: deactivating -> disconnected (reason 'sleeping', sys-iface-state: 'managed')
oct. 21 23:22:50 shibboleth avahi-daemon[2123]: Withdrawing address record for 2a01:cb0c:e42:4000:465a:5945:8aa1:fdb1 on wlp0s20u9.
oct. 21 23:22:50 shibboleth avahi-daemon[2123]: Leaving mDNS multicast group on interface wlp0s20u9.IPv6 with address 2a01:cb0c:e42:4000:465a:5945:8aa1:fdb1.
oct. 21 23:22:50 shibboleth NetworkManager[2122]: <info>  [1729545770.9286] dhcp4 (wlp0s20u9): canceled DHCP transaction
oct. 21 23:22:50 shibboleth NetworkManager[2122]: <info>  [1729545770.9287] dhcp4 (wlp0s20u9): activation: beginning transaction (timeout in 45 seconds)
oct. 21 23:22:50 shibboleth NetworkManager[2122]: <info>  [1729545770.9287] dhcp4 (wlp0s20u9): state changed no lease
oct. 21 23:22:50 shibboleth NetworkManager[2122]: <info>  [1729545770.9288] dhcp6 (wlp0s20u9): canceled DHCP transaction
oct. 21 23:22:50 shibboleth NetworkManager[2122]: <info>  [1729545770.9288] dhcp6 (wlp0s20u9): activation: beginning transaction (timeout in 45 seconds)
oct. 21 23:22:50 shibboleth NetworkManager[2122]: <info>  [1729545770.9288] dhcp6 (wlp0s20u9): state changed no lease
oct. 21 23:22:50 shibboleth avahi-daemon[2123]: Joining mDNS multicast group on interface wlp0s20u9.IPv6 with address fe80::f67a:3356:6a4:a6bd.
oct. 21 23:22:50 shibboleth avahi-daemon[2123]: Registering new address record for fe80::f67a:3356:6a4:a6bd on wlp0s20u9.*.
oct. 21 23:22:50 shibboleth avahi-daemon[2123]: Withdrawing address record for fe80::f67a:3356:6a4:a6bd on wlp0s20u9.
oct. 21 23:22:50 shibboleth avahi-daemon[2123]: Leaving mDNS multicast group on interface wlp0s20u9.IPv6 with address fe80::f67a:3356:6a4:a6bd.
oct. 21 23:22:50 shibboleth avahi-daemon[2123]: Interface wlp0s20u9.IPv6 no longer relevant for mDNS.
oct. 21 23:22:50 shibboleth avahi-daemon[2123]: Interface wlp0s20u9.IPv4 no longer relevant for mDNS.
oct. 21 23:22:50 shibboleth avahi-daemon[2123]: Leaving mDNS multicast group on interface wlp0s20u9.IPv4 with address 192.168.1.11.
oct. 21 23:22:50 shibboleth avahi-daemon[2123]: Withdrawing address record for 192.168.1.11 on wlp0s20u9.
oct. 21 23:22:50 shibboleth avahi-daemon[2123]: Joining mDNS multicast group on interface wlp0s20u9.IPv4 with address 192.168.1.11.
oct. 21 23:22:50 shibboleth avahi-daemon[2123]: New relevant interface wlp0s20u9.IPv4 for mDNS.
oct. 21 23:22:50 shibboleth avahi-daemon[2123]: Registering new address record for 192.168.1.11 on wlp0s20u9.IPv4.
oct. 21 23:22:50 shibboleth avahi-daemon[2123]: Interface wlp0s20u9.IPv4 no longer relevant for mDNS.
oct. 21 23:22:50 shibboleth avahi-daemon[2123]: Leaving mDNS multicast group on interface wlp0s20u9.IPv4 with address 192.168.1.11.
oct. 21 23:22:50 shibboleth NetworkManager[2122]: <info>  [1729545770.9314] device (wlp0s20u9): set-hw-addr: set MAC address to 3E:98:34:E6:76:01 (scanning)
oct. 21 23:22:50 shibboleth avahi-daemon[2123]: Withdrawing address record for 192.168.1.11 on wlp0s20u9.
oct. 21 23:22:50 shibboleth avahi-daemon[2123]: Joining mDNS multicast group on interface wlp0s20u9.IPv4 with address 192.168.1.11.
oct. 21 23:22:50 shibboleth avahi-daemon[2123]: New relevant interface wlp0s20u9.IPv4 for mDNS.
oct. 21 23:22:50 shibboleth avahi-daemon[2123]: Registering new address record for 192.168.1.11 on wlp0s20u9.IPv4.
oct. 21 23:22:50 shibboleth avahi-daemon[2123]: Withdrawing address record for 192.168.1.11 on wlp0s20u9.
oct. 21 23:22:50 shibboleth avahi-daemon[2123]: Leaving mDNS multicast group on interface wlp0s20u9.IPv4 with address 192.168.1.11.
oct. 21 23:22:50 shibboleth avahi-daemon[2123]: Interface wlp0s20u9.IPv4 no longer relevant for mDNS.
oct. 21 23:22:51 shibboleth NetworkManager[2122]: <info>  [1729545771.0074] device (wlp0s20u9): state change: disconnected -> unmanaged (reason 'unmanaged-sleeping', sys-iface-state: 'managed')
oct. 21 23:22:51 shibboleth NetworkManager[2122]: <info>  [1729545771.1485] device (wlp0s20u9): set-hw-addr: reset MAC address to 7C:8B:CA:0D:2F:06 (unmanage)
oct. 21 23:22:51 shibboleth systemd[1]: Reached target Sleep.
oct. 21 23:22:51 shibboleth systemd[1]: Starting System Suspend...
oct. 21 23:22:51 shibboleth systemd-sleep[231268]: User sessions remain unfrozen on explicit request ($SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=0).
oct. 21 23:22:51 shibboleth systemd-sleep[231268]: This is not recommended, and might result in unexpected behavior, particularly
oct. 21 23:22:51 shibboleth systemd-sleep[231268]: in suspend-then-hibernate operations or setups with encrypted home directories.
oct. 21 23:22:51 shibboleth systemd-sleep[231268]: Performing sleep operation 'suspend'...
oct. 21 23:22:51 shibboleth kernel: [drm] scheduler comp_1.3.0 is not ready, skipping
oct. 21 23:22:51 shibboleth kernel: PM: suspend entry (deep)
oct. 21 23:22:51 shibboleth wpa_supplicant[2862]: wlp0s20u9: CTRL-EVENT-DSCP-POLICY clear_all
oct. 21 23:22:51 shibboleth wpa_supplicant[2862]: wlp0s20u9: CTRL-EVENT-DSCP-POLICY clear_all
oct. 21 23:22:51 shibboleth wpa_supplicant[2862]: nl80211: deinit ifname=wlp0s20u9 disabled_11b_rates=0
oct. 21 23:22:51 shibboleth kernel: Filesystems sync: 0.091 seconds
oct. 21 23:22:53 shibboleth kernel: Freezing user space processes
oct. 21 23:22:53 shibboleth kernel: Freezing user space processes completed (elapsed 0.002 seconds)
oct. 21 23:22:53 shibboleth kernel: OOM killer disabled.
oct. 21 23:22:53 shibboleth kernel: Freezing remaining freezable tasks
oct. 21 23:22:53 shibboleth kernel: Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
oct. 21 23:22:53 shibboleth kernel: printk: Suspending console(s) (use no_console_suspend to debug)
oct. 21 23:22:53 shibboleth kernel: systemd-sleep: page allocation failure: order:0, mode:0x100c02(GFP_NOIO|__GFP_HIGHMEM|__GFP_HARDWALL), nodemask=(null),cpuset=systemd-suspend.service,mems_allo>
oct. 21 23:22:53 shibboleth kernel: CPU: 2 PID: 231268 Comm: systemd-sleep Tainted: G        W  OE      6.6.54-2-MANJARO #1 3244663a88094124ecc349bdca383b01ef91c395
oct. 21 23:22:53 shibboleth kernel: Hardware name: Gigabyte Technology Co., Ltd. H87-HD3/H87-HD3, BIOS F10 08/18/2015
oct. 21 23:22:53 shibboleth kernel: Call Trace:
oct. 21 23:22:53 shibboleth kernel:  <TASK>
oct. 21 23:22:53 shibboleth kernel:  dump_stack_lvl+0x4d/0x70
oct. 21 23:22:53 shibboleth kernel:  warn_alloc+0x165/0x1e0
oct. 21 23:22:53 shibboleth kernel:  __alloc_pages_slowpath.constprop.0+0xce9/0xde0
oct. 21 23:22:53 shibboleth kernel:  __alloc_pages+0x320/0x340
oct. 21 23:22:53 shibboleth kernel:  ttm_pool_alloc+0x27e/0x730 [ttm c1384c8b1cf707ea4f0dc0c4477b50ea4a5cfda5]
oct. 21 23:22:53 shibboleth kernel:  amdgpu_ttm_tt_populate+0x7c/0xc0 [amdgpu e2507cc73b2dcde47c23d0fdd2e1c9ee5449776f]
oct. 21 23:22:53 shibboleth kernel:  ttm_tt_populate+0xa1/0x130 [ttm c1384c8b1cf707ea4f0dc0c4477b50ea4a5cfda5]
oct. 21 23:22:53 shibboleth kernel:  ttm_bo_handle_move_mem+0x162/0x170 [ttm c1384c8b1cf707ea4f0dc0c4477b50ea4a5cfda5]
oct. 21 23:22:53 shibboleth kernel:  ttm_mem_evict_first+0x2ce/0x650 [ttm c1384c8b1cf707ea4f0dc0c4477b50ea4a5cfda5]
oct. 21 23:22:53 shibboleth kernel:  ? __pfx_pci_pm_prepare+0x10/0x10
oct. 21 23:22:53 shibboleth kernel:  ? __flush_workqueue+0x1a0/0x420
oct. 21 23:22:53 shibboleth kernel:  ? __pfx_pci_pm_prepare+0x10/0x10
oct. 21 23:22:53 shibboleth kernel:  ttm_resource_manager_evict_all+0xae/0x1e0 [ttm c1384c8b1cf707ea4f0dc0c4477b50ea4a5cfda5]
oct. 21 23:22:53 shibboleth kernel:  ? __pfx_pci_pm_prepare+0x10/0x10
oct. 21 23:22:53 shibboleth kernel:  amdgpu_device_prepare+0x4e/0xe0 [amdgpu e2507cc73b2dcde47c23d0fdd2e1c9ee5449776f]
oct. 21 23:22:53 shibboleth kernel:  pci_pm_prepare+0x34/0x70
oct. 21 23:22:53 shibboleth kernel:  dpm_prepare+0x135/0x450
oct. 21 23:22:53 shibboleth kernel:  dpm_suspend_start+0x1e/0x90
oct. 21 23:22:53 shibboleth kernel:  suspend_devices_and_enter+0x165/0x950
oct. 21 23:22:53 shibboleth kernel:  pm_suspend+0x249/0x590
oct. 21 23:22:53 shibboleth kernel:  state_store+0x6c/0xd0
oct. 21 23:22:53 shibboleth kernel:  kernfs_fop_write_iter+0x141/0x1f0
oct. 21 23:22:53 shibboleth kernel:  vfs_write+0x23e/0x410
oct. 21 23:22:53 shibboleth kernel:  ksys_write+0x6d/0xf0
oct. 21 23:22:53 shibboleth kernel:  do_syscall_64+0x5a/0x80
oct. 21 23:22:53 shibboleth kernel:  ? __mod_memcg_lruvec_state+0x4e/0xa0
oct. 21 23:22:53 shibboleth kernel:  ? __mod_lruvec_page_state+0x99/0x130
oct. 21 23:22:53 shibboleth kernel:  ? folio_add_new_anon_rmap+0x45/0xe0
oct. 21 23:22:53 shibboleth kernel:  ? set_ptes.isra.0+0x1e/0xa0
oct. 21 23:22:53 shibboleth kernel:  ? do_anonymous_page+0x2f2/0x3b0
oct. 21 23:22:53 shibboleth kernel:  ? __handle_mm_fault+0xbc5/0xdb0
oct. 21 23:22:53 shibboleth kernel:  ? __count_memcg_events+0x42/0x90
oct. 21 23:22:53 shibboleth kernel:  ? count_memcg_events.constprop.0+0x1a/0x30
oct. 21 23:22:53 shibboleth kernel:  ? handle_mm_fault+0x1f2/0x350
oct. 21 23:22:53 shibboleth kernel:  ? do_user_addr_fault+0x30f/0x620
oct. 21 23:22:53 shibboleth kernel:  ? exc_page_fault+0x7f/0x180
oct. 21 23:22:53 shibboleth kernel:  entry_SYSCALL_64_after_hwframe+0x78/0xe2
oct. 21 23:22:53 shibboleth kernel: RIP: 0033:0x7f2d8a0ed7a4
oct. 21 23:22:53 shibboleth kernel: Code: c7 00 16 00 00 00 b8 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 80 3d c5 28 0e 00 00 74 13 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 54 c>
oct. 21 23:22:53 shibboleth kernel: RSP: 002b:00007ffe398b8278 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
oct. 21 23:22:53 shibboleth kernel: RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007f2d8a0ed7a4
oct. 21 23:22:53 shibboleth kernel: RDX: 0000000000000004 RSI: 000055821cb8f4e0 RDI: 0000000000000005
oct. 21 23:22:53 shibboleth kernel: RBP: 00007ffe398b82a0 R08: 0000000000000000 R09: 0000000000000001
oct. 21 23:22:53 shibboleth kernel: R10: 0000000000000004 R11: 0000000000000202 R12: 0000000000000004
oct. 21 23:22:53 shibboleth kernel: R13: 000055821cb8f4e0 R14: 000055821cb8b2a0 R15: 00007f2d8a1c6ea0
oct. 21 23:22:53 shibboleth kernel:  </TASK>
oct. 21 23:22:53 shibboleth kernel: Mem-Info:
oct. 21 23:22:53 shibboleth kernel: active_anon:1307767 inactive_anon:499501 isolated_anon:0
                                     active_file:163613 inactive_file:52363 isolated_file:0
                                     unevictable:2550 dirty:47 writeback:0
                                     slab_reclaimable:40959 slab_unreclaimable:97686
                                     mapped:487725 shmem:369156 pagetables:25280
                                     sec_pagetables:0 bounce:0
                                     kernel_misc_reclaimable:0
                                     free:70859 free_pcp:179 free_cma:0
oct. 21 23:22:53 shibboleth kernel: Node 0 active_anon:5231068kB inactive_anon:1998004kB active_file:654452kB inactive_file:209452kB unevictable:10200kB isolated(anon):0kB isolated(file):0kB mapp>
oct. 21 23:22:53 shibboleth kernel: Node 0 DMA free:13312kB boost:0kB min:64kB low:80kB high:96kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevi>
oct. 21 23:22:53 shibboleth kernel: lowmem_reserve[]: 0 3113 15813 15813 15813
oct. 21 23:22:53 shibboleth kernel: Node 0 DMA32 free:93956kB boost:29896kB min:43188kB low:46508kB high:49828kB reserved_highatomic:0KB active_anon:550036kB inactive_anon:68568kB active_file:108>
oct. 21 23:22:53 shibboleth kernel: lowmem_reserve[]: 0 0 12699 12699 12699
oct. 21 23:22:53 shibboleth kernel: Node 0 Normal free:176168kB boost:122004kB min:176228kB low:189784kB high:203340kB reserved_highatomic:0KB active_anon:4681032kB inactive_anon:1929408kB active>
oct. 21 23:22:53 shibboleth kernel: lowmem_reserve[]: 0 0 0 0 0
oct. 21 23:22:53 shibboleth kernel: Node 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 1*1024kB (U) 2*2048kB (UM) 2*4096kB (M) = 13312kB
oct. 21 23:22:53 shibboleth kernel: Node 0 DMA32: 1953*4kB (UME) 5282*8kB (UM) 2743*16kB (UME) 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 93956kB
oct. 21 23:22:53 shibboleth kernel: Node 0 Normal: 44042*4kB (UME) 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 176168kB
oct. 21 23:22:53 shibboleth kernel: Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB
oct. 21 23:22:53 shibboleth kernel: Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
oct. 21 23:22:53 shibboleth kernel: 637345 total pagecache pages
oct. 21 23:22:53 shibboleth kernel: 50332 pages in swap cache
oct. 21 23:22:53 shibboleth kernel: Free swap  = 1615448kB
oct. 21 23:22:53 shibboleth kernel: Total swap = 8954560kB
oct. 21 23:22:53 shibboleth kernel: 4163618 pages RAM
oct. 21 23:22:53 shibboleth kernel: 0 pages HighMem/MovableOnly
oct. 21 23:22:53 shibboleth kernel: 99546 pages reserved
oct. 21 23:22:53 shibboleth kernel: 0 pages cma reserved
oct. 21 23:22:53 shibboleth kernel: 0 pages hwpoisoned
oct. 21 23:22:53 shibboleth kernel: [TTM] Buffer eviction failed
oct. 21 23:22:53 shibboleth kernel: [drm] evicting device resources failed
oct. 21 23:22:53 shibboleth kernel: amdgpu 0000:01:00.0: PM: device_prepare(): pci_pm_prepare+0x0/0x70 returns -12
oct. 21 23:22:53 shibboleth kernel: amdgpu 0000:01:00.0: PM: not prepared for power transition: code -12
oct. 21 23:22:53 shibboleth kernel: PM: Some devices failed to suspend, or early wake event detected
oct. 21 23:22:53 shibboleth kernel: OOM killer enabled.
oct. 21 23:22:53 shibboleth kernel: Restarting tasks ... done.
oct. 21 23:22:53 shibboleth kernel: random: crng reseeded on system resumption
oct. 21 23:22:53 shibboleth kernel: PM: suspend exit
oct. 21 23:22:53 shibboleth kernel: PM: suspend entry (s2idle)
oct. 21 23:22:53 shibboleth kernel: Filesystems sync: 0.128 seconds
oct. 21 23:22:53 shibboleth kernel: Freezing user space processes
oct. 21 23:22:53 shibboleth kernel: Freezing user space processes completed (elapsed 0.002 seconds)
oct. 21 23:22:53 shibboleth kernel: OOM killer disabled.
oct. 21 23:22:53 shibboleth kernel: Freezing remaining freezable tasks
oct. 21 23:22:53 shibboleth kernel: Freezing remaining freezable tasks completed (elapsed 0.266 seconds)
oct. 21 23:22:53 shibboleth kernel: printk: Suspending console(s) (use no_console_suspend to debug)
oct. 21 23:22:53 shibboleth kernel: [TTM] Buffer eviction failed
oct. 21 23:22:53 shibboleth kernel: [drm] evicting device resources failed
oct. 21 23:22:53 shibboleth kernel: amdgpu 0000:01:00.0: PM: device_prepare(): pci_pm_prepare+0x0/0x70 returns -12
oct. 21 23:22:53 shibboleth kernel: amdgpu 0000:01:00.0: PM: not prepared for power transition: code -12
oct. 21 23:22:53 shibboleth kernel: PM: Some devices failed to suspend, or early wake event detected
oct. 21 23:22:53 shibboleth kernel: OOM killer enabled.
oct. 21 23:22:53 shibboleth kernel: Restarting tasks ... done.
oct. 21 23:22:53 shibboleth kernel: random: crng reseeded on system resumption
oct. 21 23:22:53 shibboleth kernel: PM: suspend exit
oct. 21 23:22:53 shibboleth systemd-sleep[231268]: Failed to put system to sleep. System resumed again: Cannot allocate memory
oct. 21 23:22:53 shibboleth systemd[1]: systemd-suspend.service: Main process exited, code=exited, status=1/FAILURE
oct. 21 23:22:53 shibboleth systemd[1]: systemd-suspend.service: Failed with result 'exit-code'.
oct. 21 23:22:53 shibboleth systemd[1]: Failed to start System Suspend.
oct. 21 23:22:53 shibboleth systemd[1]: Dependency failed for Suspend.
oct. 21 23:22:53 shibboleth systemd[1]: suspend.target: Job suspend.target/start failed with result 'dependency'.
oct. 21 23:22:53 shibboleth systemd[1]: systemd-suspend.service: Consumed 1.940s CPU time, 1.7M memory peak.
oct. 21 23:22:53 shibboleth systemd-logind[2125]: Operation 'suspend' finished.
oct. 21 23:22:53 shibboleth systemd[1]: Stopped target Sleep.

So, what I understand is that my GPU doesn’t want to go to sleep. How can I troubleshoot this ?

inxi -Farz output:

System:
  Kernel: 6.6.54-2-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 14.2.1
    clocksource: tsc avail: hpet,acpi_pm
    parameters: BOOT_IMAGE=/vmlinuz-6.6-x86_64
    root=UUID=7d7d87bc-ad5b-43ed-9599-3d770e7d6f8c rw quiet apparmor=1
    security=apparmor udev.log_priority=3
  Desktop: Sway v: 1.9 with: waybar tools: swayidle avail: swaylock vt: 2
    lm: greetd Distro: Manjaro base: Arch Linux
Machine:
  Type: Desktop Mobo: Gigabyte model: H87-HD3 v: x.x
    serial: <superuser required> uuid: <superuser required>
    UEFI: American Megatrends v: F10 date: 08/18/2015
CPU:
  Info: model: Intel Core i5-4570 bits: 64 type: MCP arch: Haswell gen: core 4
    level: v3 note: check built: 2013-15 process: Intel 22nm family: 6
    model-id: 0x3C (60) stepping: 3 microcode: 0x28
  Topology: cpus: 1x dies: 1 clusters: 4 cores: 4 smt: <unsupported> cache:
    L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB
    L3: 6 MiB desc: 1x6 MiB
  Speed (MHz): avg: 1098 min/max: 800/3600 scaling: driver: intel_cpufreq
    governor: ondemand cores: 1: 1098 2: 1098 3: 1098 4: 1098 bogomips: 25551
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: KVM: VMX unsupported
  Type: l1tf mitigation: PTE Inversion
  Type: mds mitigation: Clear CPU buffers; SMT disabled
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data status: Unknown: No mitigations
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Retpolines; IBPB: conditional; IBRS_FW;
    STIBP: disabled; RSB filling; PBRSB-eIBRS: Not affected; BHI: Not
    affected
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics
    vendor: Gigabyte driver: i915 v: kernel arch: Gen-7.5 process: Intel 22nm
    built: 2013 ports: active: none empty: HDMI-A-1,HDMI-A-2,VGA-1
    bus-ID: 00:02.0 chip-ID: 8086:0412 class-ID: 0300
  Device-2: Advanced Micro Devices [AMD/ATI] Ellesmere [Radeon Pro WX 5100]
    vendor: Dell driver: amdgpu v: kernel arch: GCN-4 code: Arctic Islands
    process: GF 14nm built: 2016-20 pcie: gen: 3 speed: 8 GT/s lanes: 16
    ports: active: DP-4 empty: DP-1,DP-2,DP-3 bus-ID: 01:00.0
    chip-ID: 1002:67c7 class-ID: 0300 temp: 49.0 C
  Device-3: Microsoft LifeCam VX-5000 driver: snd-usb-audio,uvcvideo
    type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-10:6
    chip-ID: 045e:0728 class-ID: 0102
  Display: wayland server: Xwayland v: 24.1.2 compositor: Sway v: 1.9
    driver: gpu: amdgpu display-ID: 1
  Monitor-1: DP-4 model: Dell S2721QS serial: <filter> built: 2022
    res: 3840x2160 hz: 60 dpi: 163 gamma: 1.2 scale: 1.25
    size: 597x336mm (23.5x13.23") diag: 685mm (27") ratio: 16:9 modes:
    max: 3840x2160 min: 720x400
  API: EGL v: 1.5 hw: drv: intel crocus drv: amd radeonsi platforms:
    device: 0 drv: crocus device: 1 drv: radeonsi device: 2 drv: swrast gbm:
    drv: crocus surfaceless: drv: crocus wayland: drv: radeonsi x11:
    drv: radeonsi
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.2.4-arch1.0.1
    glx-v: 1.4 direct-render: yes renderer: AMD Radeon Pro WX 5100 Graphics
    (radeonsi polaris10 LLVM 18.1.8 DRM 3.54 6.6.54-2-MANJARO)
    device-ID: 1002:67c7 memory: 7.81 GiB unified: no
  API: Vulkan v: 1.3.295 layers: 7 device: 0 type: discrete-gpu name: AMD
    Radeon Pro WX 5100 Graphics (RADV POLARIS10) driver: mesa radv
    v: 24.2.4-arch1.0.1 device-ID: 1002:67c7 surfaces: xcb,xlib,wayland
    device: 1 type: integrated-gpu name: Intel HD Graphics 4600 (HSW GT2)
    driver: mesa intel v: 24.2.4-arch1.0.1 device-ID: 8086:0412
    surfaces: xcb,xlib,wayland device: 2 type: cpu name: llvmpipe (LLVM
    18.1.8 256 bits) driver: mesa llvmpipe v: 24.2.4-arch1.0.1 (LLVM 18.1.8)
    device-ID: 10005:0000 surfaces: xcb,xlib,wayland
Audio:
  Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio
    driver: snd_hda_intel v: kernel bus-ID: 00:03.0 chip-ID: 8086:0c0c
    class-ID: 0403
  Device-2: Intel 8 Series/C220 Series High Definition Audio
    vendor: Gigabyte driver: snd_hda_intel v: kernel bus-ID: 00:1b.0
    chip-ID: 8086:8c20 class-ID: 0403
  Device-3: Advanced Micro Devices [AMD/ATI] Ellesmere HDMI Audio [Radeon
    RX 470/480 / 570/580/590] vendor: Dell driver: snd_hda_intel v: kernel
    pcie: gen: 3 speed: 8 GT/s lanes: 16 bus-ID: 01:00.1 chip-ID: 1002:aaf0
    class-ID: 0403
  Device-4: Microsoft LifeCam VX-5000 driver: snd-usb-audio,uvcvideo
    type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-10:6
    chip-ID: 045e:0728 class-ID: 0102
  Device-5: Focusrite-Novation Scarlett 2i4 driver: snd-usb-audio type: USB
    rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-3:2 chip-ID: 1235:800a
    class-ID: fe01
  API: ALSA v: k6.6.54-2-MANJARO status: kernel-api tools: N/A
  Server-1: sndiod v: N/A status: off tools: aucat,midicat,sndioctl
  Server-2: JACK v: 1.9.22 status: off tools: N/A
  Server-3: PipeWire v: 1.2.5 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: Gigabyte driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 port: d000 bus-ID: 03:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp3s0 state: down mac: <filter>
  Device-2: TP-Link Archer T4UH v2 [Realtek RTL8812AU] driver: rtl8812au
    type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-9:7
    chip-ID: 2357:010e class-ID: 0000 serial: <filter>
  IF: wlp0s20u9 state: up mac: <filter>
  IF-ID-1: docker0 state: down mac: <filter>
  Info: services: NetworkManager, systemd-timesyncd, wpa_supplicant
RAID:
  Hardware-1: Intel SATA Controller [RAID mode] driver: ahci v: 3.0 port: f060
    bus-ID: 00:1f.2 chip-ID: 8086:2822 rev: N/A class-ID: 0104
Drives:
  Local Storage: total: 1.14 TiB used: 384.74 GiB (33.0%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: SSD 980 250GB
    size: 232.89 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: 2B4QFXO7 temp: 27.9 C
    scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Seagate model: ST1000DM003-1SB10C
    size: 931.51 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    tech: HDD rpm: 7200 serial: <filter> fw-rev: CC41 scheme: GPT
Partition:
  ID-1: / raw-size: 232.88 GiB size: 228.17 GiB (97.98%)
    used: 45.96 GiB (20.1%) fs: ext4 dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-2: /boot raw-size: 1024 MiB size: 973.4 MiB (95.06%)
    used: 400.1 MiB (41.1%) fs: ext4 dev: /dev/sda2 maj-min: 8:2
  ID-3: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 296 KiB (0.1%) fs: vfat dev: /dev/sda1 maj-min: 8:1
  ID-4: /home raw-size: 921.68 GiB size: 906.14 GiB (98.31%)
    used: 330.62 GiB (36.5%) fs: ext4 dev: /dev/sda3 maj-min: 8:3
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default) zswap: yes
    compressor: zstd max-pool: 20%
  ID-1: swap-1 type: partition size: 8.54 GiB used: 7.76 GiB (90.9%)
    priority: -2 dev: /dev/sda4 maj-min: 8:4
Sensors:
  System Temperatures: cpu: 36.0 C mobo: N/A gpu: amdgpu temp: 49.0 C
  Fan Speeds (rpm): N/A gpu: amdgpu fan: 1116
Repos:
  Packages: pm: pacman pkgs: 1474 libs: 370 tools: pacseek,pamac,yay
  Active pacman repo servers in: /etc/pacman.d/mirrorlist
    1: https://mirror.ibakerserver.pt/manjaro/stable/$repo/$arch
    2: http://ftp.free.org/mirrors/repo.manjaro.org/repos/stable/$repo/$arch
    3: http://manjaro.grena.ge/stable/$repo/$arch
    4: https://manjaro.mirror.liquidtelecom.com/stable/$repo/$arch
    5: https://mirror.funami.tech/manjaro/stable/$repo/$arch
    6: https://mirror.aarnet.edu.au/pub/manjaro/stable/$repo/$arch
    7: https://mirror.nyist.edu.cn/manjaro/stable/$repo/$arch
Info:
  Memory: total: 16 GiB available: 15.5 GiB used: 12 GiB (77.4%)
  Processes: 300 Power: uptime: 1d 21h 36m states: freeze,mem,disk
    suspend: deep avail: s2idle wakeups: 6 fails: 5 hibernate: platform
    avail: shutdown, reboot, suspend, test_resume image: 6.18 GiB
    services: upowerd Init: systemd v: 256 default: graphical tool: systemctl
  Compilers: clang: 18.1.8 gcc: 14.2.1 Shell: Zsh v: 5.9 running-in: tmux:
    inxi: 3.3.36

Instead use inxi -Farz

Currently we dont see kernel, boot options, and various other possibly important sections.

1 Like

Thanks, I’ve updated the inxi output

These look fairly full when you ran inxi. And one error made me think it was memory related.

It looks like you may be running out of memory (and or swap). But this happens only on sleep, and nothing else?

My RAM use is actually often that high. I haven’t observed a correlation with suspend fails but maybe !

About swap, I wouldn’t know (I don’t monitor it very much). htop currently shows half of the bar filled with grey “frontswap”, but the used/total at the end of the line reads 0K.

The fact that RAM is high ? No, it happens whenever I open firefox :sweat_smile:

You would probably get different errors, but I figured check that off the list since it’s easy to diagnose.

If it was the systemd-256 bug you mentioned, you would fix it by…

Editing:

  • systemd-suspend.service
  • systemd-hibernate.service
  • systemd-hybrid-sleep.service
  • systemd-suspend-then-hibernate.service

And adding the section in each:

[Service]
Environment=SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=false

But that bug was KVM related.

Thanks, as mentioned in the original post, I’ve created a config file but only for the suspend service: /etc/systemd/system/systemd-suspend.service.d/disable_freeze_user_session.conf since I never use any other command. Should I also create other files for every service?

I would think that would be enough, as you are only doing suspend. But doesn’t hurt to copy or symlink it in the others.

The stack trace seemed to be related to the amd_gpu module too. I don’t have an AMD GPU to test this with this. Seems the nvidia-utils does this for us Nvidia users though. I get these files installed which applies that here:

pacman -Ql nvidia-utils | grep systemd                                                                                                                                                                                                 
nvidia-utils /usr/lib/systemd/
nvidia-utils /usr/lib/systemd/system-sleep/
nvidia-utils /usr/lib/systemd/system-sleep/nvidia
nvidia-utils /usr/lib/systemd/system/
nvidia-utils /usr/lib/systemd/system/nvidia-hibernate.service
nvidia-utils /usr/lib/systemd/system/nvidia-persistenced.service
nvidia-utils /usr/lib/systemd/system/nvidia-powerd.service
nvidia-utils /usr/lib/systemd/system/nvidia-resume.service
nvidia-utils /usr/lib/systemd/system/nvidia-suspend.service
nvidia-utils /usr/lib/systemd/system/systemd-hibernate.service.d/
nvidia-utils /usr/lib/systemd/system/systemd-hibernate.service.d/10-nvidia-no-freeze-session.conf
nvidia-utils /usr/lib/systemd/system/systemd-homed.service.d/
nvidia-utils /usr/lib/systemd/system/systemd-homed.service.d/10-nvidia-no-freeze-session.conf
nvidia-utils /usr/lib/systemd/system/systemd-hybrid-sleep.service.d/
nvidia-utils /usr/lib/systemd/system/systemd-hybrid-sleep.service.d/10-nvidia-no-freeze-session.conf
nvidia-utils /usr/lib/systemd/system/systemd-suspend-then-hibernate.service.d/
nvidia-utils /usr/lib/systemd/system/systemd-suspend-then-hibernate.service.d/10-nvidia-no-freeze-session.conf
nvidia-utils /usr/lib/systemd/system/systemd-suspend.service.d/
nvidia-utils /usr/lib/systemd/system/systemd-suspend.service.d/10-nvidia-no-freeze-session.conf

This seems to apply the same fix, even in systemd-homed.service.d

cat /usr/lib/systemd/system/systemd-homed.service.d/10-nvidia-no-freeze-session.conf                                                                                                                                 
[Service]
Environment="SYSTEMD_HOME_LOCK_FREEZE_SESSION=false"

Looks like you are right regarding memory: every time a manual or automatic (through sway-idle) call to systemctl suspend fails, the same error from the sleep service is issued inside the journal:

systemd-sleep[231268]: Failed to put system to sleep. System resumed again: Cannot allocate memory

And whenever I close firefox (and therefore free a lot of RAM), I am able to call systemctl suspend successfully.

The memory error is always preceded by the kernel error about the gpu. Is there a way I can inscpect this further? Or maybe “reserve” some memory in order to be able to sleep?!

This is to be expected. Going that far into swap not only causes slow-downs, but doesn’t leave enough space for hibernate (I’d think sleep would still work, though, up to a point).

Watching lots of YouTube videos (like I do) will cause “creep” of the Firefox memory leaks. I get away with restarting the browser maybe half a dozen times over the course of a few weeks, before a reboot is necessary to clear out the accumulated crud.

Thanks for this piece of info.

Is this going far in swap ? I’m not sure I understand this greyed “frontswap” category

Also, I almost never watch youtube videos on my computer and I don’t think I’m using more RAM than I used to but maybe I have a special very memory-hungy tab open ?!

I’ll have to look into what this “frontswap” is, but it does look free to me. I have about ½G in use on this one, presently. It’s when I get to 4 or 5G usage when problems start to show. (I have 8G of RAM).

You can always resize and grow your swap, but I would make sure you don’t have any applications taking much more than they should. It just seems like ample memory for a standard desktop. I see that you already compress swap with zram, so that’s the probably the easiest thing to do. Just growing it.

The kernel does reserve extra memory for applications that ask for it (overcommitment), and there is a way to change this. I haven’t had to do anything like this in years…

In /etc/sysctl.conf:

vm.overcommit_memory=1

It defaults to 0, and you can even try setting it to 2. But 1 is a little safer to try first. But that setting does expect you to have ample swap, so I would use in conjunction with growing it.

(And make sure to undo that change if you see no difference.)

Source: Chapter 35. Configuring an operating system to optimize memory access | Red Hat Product Documentation

1 Like

It looks as if your system is trying to hibernate but there is insufficient swap to accommodate the data in RAM that must be swapped.

As I say, that’s what it looks like.

Your system seems to be set to deep sleep which is another term for suspend to disk, if memory serves (and it might not), so maybe the same requirements should be met;

that is, extend your swap partition to 16/17 GB to allow the maximum amount of data in RAM to be swapped if/when it’s needed.

I doubt this would be a solution per sé, but it might help to some extent.


I had a quick look to see if Gigabyte had a more recent BIOS for your board; it doesn’t; your F10 is the last BIOS released (in 2015); so, that’s not an issue.

Deep sleep suspends to RAM. Hibernate suspends to disk. And s2idle (suspend-to-idle) basically keeps most stuff running but in low power mode.

The system sleep mode can be checked by running the command:

cat /sys/power/mem_sleep

For example, this shows my mini-PC is using deep sleep:

cat /sys/power/mem_sleep                                                                                                                                        ✔ 
s2idle [deep]

System Sleep States — The Linux Kernel documentation

1 Like

Thanks for the reference, very clear!

My system returns s2idle [deep], as yours, so my system suspends to RAM as well. The documentation doesn’t mention swap so it is unclear to me if this suspend mode makes use of it and if growing my swap partition would change anything?

I’ll try to monitor RAM use in the next few days and see if some website / app makes eats more RAM than it should.