You are not logged in.

#1 2024-02-19 20:21:23

sebbas
Member
Registered: 2023-09-25
Posts: 6

System unresponsive on suspend when specific apps are open

I am running into a problem on my laptop where the system freezes when trying to suspend after closing the lid.
This however only happens when I have specific apps open.
Namely Thunderbird and Only-Office-desktop-editors
When I close these apps suspend works just fine.
But when they're open the system starts showing the lock screen and will then become entirely unresponsive (no touchpad, no mouse inputs, no keyboard, can't switch to a tty, etc.)

Here is some info about my setup:

Host:          Lenovo E14 gen 3
Kernel:       6.7.1-arch1-1
DE:              Plasma 5.27.10
WM:            kwin
CPU:           AMD Ryzen 5 5500U with Radeon Graphics (12) @ 4.056GHz
GPU:           AMD ATI 05:00.0 Lucienne
Memory:    8GB (shows up as 6.7ish GB using htop)

I gathered some stuff from journalctl where it seems the suspend process goes off the rails:

feb 19 20:28:17 thinkpad-arch systemd[1]: Reached target Sleep.
feb 19 20:28:17 thinkpad-arch systemd[1]: Starting System Suspend...
feb 19 20:28:17 thinkpad-arch systemd-sleep[7750]: Performing sleep operation 'suspend'...
feb 19 20:28:17 thinkpad-arch kernel: PM: suspend entry (deep)
feb 19 20:28:17 thinkpad-arch iwd[790]: Could not register frame watch type 00d0: -114
feb 19 20:28:17 thinkpad-arch wpa_supplicant[890]: wlan0: CTRL-EVENT-DSCP-POLICY clear_all
feb 19 20:28:17 thinkpad-arch wpa_supplicant[890]: wlan0: CTRL-EVENT-DSCP-POLICY clear_all
feb 19 20:28:17 thinkpad-arch wpa_supplicant[890]: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
feb 19 20:28:17 thinkpad-arch kernel: Filesystems sync: 0.277 seconds
feb 19 20:28:17 thinkpad-arch kernel: Freezing user space processes
feb 19 20:28:17 thinkpad-arch kernel: Freezing user space processes completed (elapsed 0.006 seconds)
feb 19 20:28:17 thinkpad-arch kernel: OOM killer disabled.
feb 19 20:28:17 thinkpad-arch kernel: Freezing remaining freezable tasks
feb 19 20:28:17 thinkpad-arch kernel: Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
feb 19 20:28:17 thinkpad-arch kernel: printk: Suspending console(s) (use no_console_suspend to debug)
feb 19 20:28:17 thinkpad-arch kernel: systemd-sleep: page allocation failure: order:0, mode:0x100c02(GFP_NOIO|__GFP_HIGHMEM|__GFP_HARDWALL), nodemask=(null),cpuset=/,mems_allowed=0
feb 19 20:28:17 thinkpad-arch kernel: CPU: 5 PID: 7750 Comm: systemd-sleep Tainted: G           OE      6.7.4-arch1-1 #1 20d30c48b78a04be2046f4b305b40455f0b5b38b
feb 19 20:28:17 thinkpad-arch kernel: Hardware name: LENOVO 20Y70074MH/20Y70074MH, BIOS R1OET27W (1.06 ) 05/17/2021
feb 19 20:28:17 thinkpad-arch kernel: Call Trace:
feb 19 20:28:17 thinkpad-arch kernel:  <TASK>
feb 19 20:28:17 thinkpad-arch kernel:  dump_stack_lvl+0x47/0x60
feb 19 20:28:17 thinkpad-arch kernel:  warn_alloc+0x165/0x1e0
feb 19 20:28:17 thinkpad-arch kernel:  __alloc_pages_slowpath.constprop.0+0xd4f/0xdb0
feb 19 20:28:17 thinkpad-arch kernel:  __alloc_pages+0x32d/0x350
feb 19 20:28:17 thinkpad-arch kernel:  ttm_pool_alloc+0x19f/0x600 [ttm 1273ae4ec48a6ae3e7d30151b1d1b132b37ecf62]
feb 19 20:28:17 thinkpad-arch kernel:  amdgpu_ttm_tt_populate+0x7c/0xb0 [amdgpu 86195570dd0349beaa25d0ae99677ea65c8e11ea]
feb 19 20:28:17 thinkpad-arch kernel:  ttm_tt_populate+0xa1/0x130 [ttm 1273ae4ec48a6ae3e7d30151b1d1b132b37ecf62]
feb 19 20:28:17 thinkpad-arch kernel:  ttm_bo_handle_move_mem+0x162/0x170 [ttm 1273ae4ec48a6ae3e7d30151b1d1b132b37ecf62]
feb 19 20:28:17 thinkpad-arch kernel:  ttm_mem_evict_first+0x201/0x530 [ttm 1273ae4ec48a6ae3e7d30151b1d1b132b37ecf62]
feb 19 20:28:17 thinkpad-arch kernel:  ? srso_return_thunk+0x5/0x5f
feb 19 20:28:17 thinkpad-arch kernel:  ttm_resource_manager_evict_all+0xa7/0x1d0 [ttm 1273ae4ec48a6ae3e7d30151b1d1b132b37ecf62]
feb 19 20:28:17 thinkpad-arch kernel:  ? __pfx_pci_pm_prepare+0x10/0x10
feb 19 20:28:17 thinkpad-arch kernel:  amdgpu_device_prepare+0x4e/0xd0 [amdgpu 86195570dd0349beaa25d0ae99677ea65c8e11ea]
feb 19 20:28:17 thinkpad-arch kernel:  pci_pm_prepare+0x34/0x70
feb 19 20:28:17 thinkpad-arch kernel:  dpm_prepare+0x27f/0x480
feb 19 20:28:17 thinkpad-arch kernel:  dpm_suspend_start+0x1e/0x90
feb 19 20:28:17 thinkpad-arch kernel:  suspend_devices_and_enter+0x165/0x960
feb 19 20:28:17 thinkpad-arch kernel:  pm_suspend+0x25e/0x590
feb 19 20:28:17 thinkpad-arch kernel:  state_store+0x6c/0xd0
feb 19 20:28:17 thinkpad-arch kernel:  kernfs_fop_write_iter+0x136/0x1d0
feb 19 20:28:17 thinkpad-arch kernel:  vfs_write+0x23d/0x400
feb 19 20:28:17 thinkpad-arch kernel:  ksys_write+0x6f/0xf0
feb 19 20:28:17 thinkpad-arch kernel:  do_syscall_64+0x64/0xe0
feb 19 20:28:17 thinkpad-arch kernel:  ? srso_return_thunk+0x5/0x5f
feb 19 20:28:17 thinkpad-arch kernel:  ? __count_memcg_events+0x42/0x90
feb 19 20:28:17 thinkpad-arch kernel:  ? srso_return_thunk+0x5/0x5f
feb 19 20:28:17 thinkpad-arch kernel:  ? count_memcg_events.constprop.0+0x1a/0x30
feb 19 20:28:17 thinkpad-arch kernel:  ? srso_return_thunk+0x5/0x5f
feb 19 20:28:17 thinkpad-arch kernel:  ? handle_mm_fault+0xa2/0x360
feb 19 20:28:17 thinkpad-arch kernel:  ? srso_return_thunk+0x5/0x5f
feb 19 20:28:17 thinkpad-arch kernel:  ? do_user_addr_fault+0x304/0x670
feb 19 20:28:17 thinkpad-arch kernel:  ? srso_return_thunk+0x5/0x5f
feb 19 20:28:17 thinkpad-arch kernel:  ? exc_page_fault+0x7f/0x180
feb 19 20:28:17 thinkpad-arch kernel:  entry_SYSCALL_64_after_hwframe+0x6e/0x76
feb 19 20:28:17 thinkpad-arch kernel: RIP: 0033:0x73831e0f5184
feb 19 20:28:17 thinkpad-arch 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 3e 0e 00 00 74 13 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 54 c3 0f 1f 00 48 83 ec 28 48 89 54 24 18 48
feb 19 20:28:17 thinkpad-arch kernel: RSP: 002b:00007ffc367e6ad8 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
feb 19 20:28:17 thinkpad-arch kernel: RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 000073831e0f5184
feb 19 20:28:17 thinkpad-arch kernel: RDX: 0000000000000004 RSI: 00005a75a6abc500 RDI: 0000000000000005
feb 19 20:28:17 thinkpad-arch kernel: RBP: 00005a75a6abc500 R08: 0000000000000000 R09: 0000000000000001
feb 19 20:28:17 thinkpad-arch kernel: R10: 0000000000000004 R11: 0000000000000202 R12: 0000000000000004
feb 19 20:28:17 thinkpad-arch kernel: R13: 00005a75a6ab82d0 R14: 000073831e1cff00 R15: 00000000fffffff7
feb 19 20:28:17 thinkpad-arch kernel:  </TASK>
feb 19 20:28:17 thinkpad-arch kernel: Mem-Info:
feb 19 20:28:17 thinkpad-arch kernel: active_anon:384612 inactive_anon:226401 isolated_anon:0
                                       active_file:151728 inactive_file:484972 isolated_file:0
                                       unevictable:384 dirty:62 writeback:0
                                       slab_reclaimable:26525 slab_unreclaimable:48628
                                       mapped:157847 shmem:14747 pagetables:14004
                                       sec_pagetables:0 bounce:0
                                       kernel_misc_reclaimable:0
                                       free:38234 free_pcp:1951 free_cma:0
feb 19 20:28:17 thinkpad-arch kernel: Node 0 active_anon:1538448kB inactive_anon:905604kB active_file:606912kB inactive_file:1939888kB unevictable:1536kB isolated(anon):0kB isolated(file):0kB mapped:631388kB dirty:248kB writeback:0kB shmem:58988kB shmem_thp:0kB shmem_pmdmapped:0kB anon_thp:354304kB writeback_tmp:0kB kernel_stack:30128kB pagetables:56016kB sec_pagetables:0kB all_unreclaimable? no
feb 19 20:28:17 thinkpad-arch kernel: Node 0 DMA free:14336kB boost:0kB min:148kB low:184kB high:220kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
feb 19 20:28:17 thinkpad-arch kernel: lowmem_reserve[]: 0 3011 6692 6692 6692
feb 19 20:28:17 thinkpad-arch kernel: Node 0 DMA32 free:85744kB boost:40960kB min:71300kB low:78884kB high:86468kB reserved_highatomic:0KB active_anon:668924kB inactive_anon:490372kB active_file:269192kB inactive_file:884348kB unevictable:512kB writepending:24kB present:3235660kB managed:3130916kB mlocked:512kB bounce:0kB free_pcp:4864kB local_pcp:4864kB free_cma:0kB
feb 19 20:28:17 thinkpad-arch kernel: lowmem_reserve[]: 0 0 3680 3680 3680
feb 19 20:28:17 thinkpad-arch kernel: Node 0 Normal free:52856kB boost:16384kB min:53472kB low:62744kB high:72016kB reserved_highatomic:0KB active_anon:869832kB inactive_anon:415456kB active_file:337720kB inactive_file:1055540kB unevictable:1024kB writepending:224kB present:3902464kB managed:3769132kB mlocked:1024kB bounce:0kB free_pcp:2940kB local_pcp:2940kB free_cma:0kB
feb 19 20:28:17 thinkpad-arch kernel: lowmem_reserve[]: 0 0 0 0 0
feb 19 20:28:17 thinkpad-arch kernel: Node 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 1*2048kB (M) 3*4096kB (M) = 14336kB
feb 19 20:28:17 thinkpad-arch kernel: Node 0 DMA32: 3656*4kB (ME) 1152*8kB (ME) 321*16kB (UME) 264*32kB (UME) 159*64kB (UME) 88*128kB (UME) 43*256kB (UME) 21*512kB (UME) 5*1024kB (M) 0*2048kB 0*4096kB = 85744kB
feb 19 20:28:17 thinkpad-arch kernel: Node 0 Normal: 1318*4kB (UME) 596*8kB (ME) 440*16kB (ME) 250*32kB (UME) 124*64kB (UME) 67*128kB (UME) 32*256kB (UME) 2*512kB (M) 0*1024kB 1*2048kB (U) 0*4096kB = 52856kB
feb 19 20:28:17 thinkpad-arch kernel: Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB
feb 19 20:28:17 thinkpad-arch kernel: Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
feb 19 20:28:17 thinkpad-arch kernel: 665962 total pagecache pages
feb 19 20:28:17 thinkpad-arch kernel: 14505 pages in swap cache
feb 19 20:28:17 thinkpad-arch kernel: Free swap  = 19027964kB
feb 19 20:28:17 thinkpad-arch kernel: Total swap = 20971516kB
feb 19 20:28:17 thinkpad-arch kernel: 1788529 pages RAM
feb 19 20:28:17 thinkpad-arch kernel: 0 pages HighMem/MovableOnly
feb 19 20:28:17 thinkpad-arch kernel: 59677 pages reserved
feb 19 20:28:17 thinkpad-arch kernel: 0 pages cma reserved
feb 19 20:28:17 thinkpad-arch kernel: 0 pages hwpoisoned
feb 19 20:28:17 thinkpad-arch kernel: [TTM] Buffer eviction failed
feb 19 20:28:17 thinkpad-arch kernel: [drm] evicting device resources failed
feb 19 20:28:17 thinkpad-arch kernel: amdgpu 0000:05:00.0: PM: device_prepare(): pci_pm_prepare+0x0/0x70 returns -12
feb 19 20:28:17 thinkpad-arch kernel: amdgpu 0000:05:00.0: PM: not prepared for power transition: code -12
feb 19 20:28:17 thinkpad-arch kernel: PM: Some devices failed to suspend, or early wake event detected
feb 19 20:28:17 thinkpad-arch kernel: OOM killer enabled.
feb 19 20:28:17 thinkpad-arch kernel: Restarting tasks ... done.
feb 19 20:28:17 thinkpad-arch kernel: random: crng reseeded on system resumption
feb 19 20:28:17 thinkpad-arch kernel: PM: suspend exit
feb 19 20:28:17 thinkpad-arch kernel: PM: suspend entry (s2idle)

The systemd-sleep page allocation failure stands out to me, but I have checked and it is not like I'm out of memory when I have these apps open.
Anyone else running into this problem, or any ideas about what could be causing this problem?

Offline

#2 2024-02-19 22:39:51

seth
Member
Registered: 2012-09-03
Posts: 51,796

Re: System unresponsive on suspend when specific apps are open

Add some swap (can be a swap file)

Offline

#3 2024-02-21 21:12:05

sebbas
Member
Registered: 2023-09-25
Posts: 6

Re: System unresponsive on suspend when specific apps are open

Sorry forgot to mention: system has 20G of swap in a swapfile (shows up on htop) (made it a bit big in case I want to do a memory upgrade)

Offline

#4 2024-02-21 21:47:21

seth
Member
Registered: 2012-09-03
Posts: 51,796

Re: System unresponsive on suspend when specific apps are open

Is it active? Output of

swapon

Ftr, https://gitlab.freedesktop.org/drm/amd/-/issues/2125

Offline

#5 2024-02-24 08:03:45

sebbas
Member
Registered: 2023-09-25
Posts: 6

Re: System unresponsive on suspend when specific apps are open

 NAME      TYPE      SIZE USED PRIO
/dev/dm-2 partition  20G 3,7G   -2

Looks like it is active
Also looks like I got confused, this one is setup with LVM partitions om LUKS e.g. https://wiki.archlinux.org/title/Dm-cry … VM_on_LUKS with a dedicated swap partition.

Offline

#6 2024-02-24 08:52:44

seth
Member
Registered: 2012-09-03
Posts: 51,796

Re: System unresponsive on suspend when specific apps are open

The LUKS might have been closed and the swap lost - can you add some unencrypted swap?

Offline

#7 2024-02-27 05:38:46

matt90
Member
From: New Mexico
Registered: 2014-05-23
Posts: 7

Re: System unresponsive on suspend when specific apps are open

I have a very similar problem:

  - Thinkpad X395 with Radeon Vega graphics
  - 8 GB swap file and 8 GB swap partition, both inside a LUKS-encrypted container
  - "not prepared for power transition: code -12" followed by system freezes

In case it's not clear, systemd immediately tries suspend-to-idle if suspend-to-RAM fails -- you can see that at the end of the log in the first post.  In my experience, the suspend-to-idle *sometimes* succeeds, meaning the computer appears frozen but pops back to life when I press the power button.  About half the time, the computer seems to freeze instead, which looks the same except that pressing power doesn't bring it back.  If you' haven't tried yet, you could check whether the power button fixes your "freezes".

I don't like the idea of unencrypted swap, but I can try to find some time to try it For Science.  But on my previous kernel (6.5.9-zen2-1-zen), suspend worked fine with my current swap setup, so something else must have changed.  I might try downgrading my kernel before moving partitions around.

Offline

#8 2024-02-27 08:28:26

seth
Member
Registered: 2012-09-03
Posts: 51,796

Re: System unresponsive on suspend when specific apps are open

From the looks of the backtrace, amdgpu seems to try to preserve VRAM in RAM and runs OOM - what by the OPs account "8GB (shows up as 6.7ish GB using htop)"is most likely pointless as the VRAM is actually shared RAM.

According to https://gitlab.freedesktop.org/drm/amd/-/issues/3172 there's a patch coming up in 6.8

Offline

#9 2024-03-04 22:51:59

cantabile
Member
Registered: 2010-06-29
Posts: 33

Re: System unresponsive on suspend when specific apps are open

I just experienced the same problem. I found the laptop with a black screen. The power, FnLock, and Caps Lock lights were on (this is normal). The Num Lock light would not turn on, and my Bluetooth headphones were not connecting to the laptop, so I assumed it was frozen.

Thunderbird was open at the time.

Thunderbird and OnlyOffice both use GTK3. I'm sure that's just a coincidence.


Host:          Lenovo Ideapad 3 15ADA6
Kernel:       6.7.5-arch1-1
DE:              Plasma 5.27.10
WM:            kwin
CPU:           AMD Athlon Gold 3150U with Radeon Graphics
GPU:           03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Picasso/Raven 2 [Radeon Vega Series / Radeon Vega Mobile Series] [1002:15d8] (rev ce)
Memory:    12 GB + 8 GB swap

Mar 04 23:30:54 ideapad2 systemd[518]: Started Thunderbird - Mail Client.
Mar 04 23:30:55 ideapad2 krunner[15181]: [ImapModuleLoader] Using nsImapService.cpp
Mar 04 23:30:56 ideapad2 krunner[15181]: ATTENTION: default value of option mesa_glthread overridden by environment.
Mar 04 23:30:56 ideapad2 krunner[15181]: ATTENTION: default value of option mesa_glthread overridden by environment.
Mar 04 23:30:58 ideapad2 krunner[15181]: console.debug: "Found 0 public keys and 0 secret keys (0 protected, 0 unprotected)"
Mar 04 23:31:04 ideapad2 plasmashell[660]: Could not find the Plasmoid for Plasma::FrameSvgItem(0x60010373b3f0) QQmlContext(0x6001016a8e20) QUrl("file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/global/Globals.qml")
Mar 04 23:31:04 ideapad2 plasmashell[660]: Could not find the Plasmoid for Plasma::FrameSvgItem(0x60010373b3f0) QQmlContext(0x6001016a8e20) QUrl("file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/global/Globals.qml")
Mar 04 23:31:04 ideapad2 plasmashell[660]: Could not find the Plasmoid for Plasma::FrameSvgItem(0x6001036d2180) QQmlContext(0x6001016a8e20) QUrl("file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/global/Globals.qml")
Mar 04 23:31:04 ideapad2 plasmashell[660]: Could not find the Plasmoid for Plasma::FrameSvgItem(0x6001036d2180) QQmlContext(0x6001016a8e20) QUrl("file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/global/Globals.qml")
Mar 04 23:31:15 ideapad2 plasmashell[660]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/CompactRepresentation.qml:61:17: Unable to assign [undefined] to int
Mar 04 23:31:45 ideapad2 plasmashell[660]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/CompactRepresentation.qml:61:17: Unable to assign [undefined] to int
Mar 04 23:31:45 ideapad2 plasmashell[660]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/CompactRepresentation.qml:61:17: Unable to assign [undefined] to int
Mar 04 23:31:46 ideapad2 rtkit-daemon[581]: Supervising 7 threads of 4 processes of 1 users.
Mar 04 23:31:46 ideapad2 rtkit-daemon[581]: Supervising 7 threads of 4 processes of 1 users.
Mar 04 23:32:15 ideapad2 plasmashell[660]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/CompactRepresentation.qml:61:17: Unable to assign [undefined] to int
Mar 04 23:32:45 ideapad2 plasmashell[660]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/CompactRepresentation.qml:61:17: Unable to assign [undefined] to int
Mar 04 23:33:16 ideapad2 plasmashell[660]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/CompactRepresentation.qml:61:17: Unable to assign [undefined] to int
Mar 04 23:33:45 ideapad2 systemd[1]: Started dbus-:1.2-org.kde.powerdevil.backlighthelper@50.service.
Mar 04 23:33:46 ideapad2 plasmashell[660]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/CompactRepresentation.qml:61:17: Unable to assign [undefined] to int
Mar 04 23:33:55 ideapad2 systemd[1]: dbus-:1.2-org.kde.powerdevil.backlighthelper@50.service: Deactivated successfully.
Mar 04 23:33:56 ideapad2 systemd[1]: Started dbus-:1.2-org.kde.powerdevil.backlighthelper@51.service.
Mar 04 23:34:06 ideapad2 systemd[1]: dbus-:1.2-org.kde.powerdevil.backlighthelper@51.service: Deactivated successfully.
Mar 04 23:34:16 ideapad2 plasmashell[660]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/CompactRepresentation.qml:61:17: Unable to assign [undefined] to int
Mar 04 23:34:46 ideapad2 plasmashell[660]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/CompactRepresentation.qml:61:17: Unable to assign [undefined] to int
Mar 04 23:35:16 ideapad2 plasmashell[660]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/CompactRepresentation.qml:61:17: Unable to assign [undefined] to int
Mar 04 23:35:22 ideapad2 plasmashell[660]: org.kde.plasma.pulseaudio: No object for name "bluez_output.XX_XX_XX_XX_XX_XX.1"
Mar 04 23:35:28 ideapad2 bluetoothd[382]: profiles/audio/avdtp.c:avdtp_connect_cb() connect to XX:XX:XX:XX:XX:XX: Host is down (112)
Mar 04 23:35:35 ideapad2 bluetoothd[382]: profiles/audio/avdtp.c:avdtp_connect_cb() connect to XX:XX:XX:XX:XX:XX: Host is down (112)
Mar 04 23:35:44 ideapad2 bluetoothd[382]: profiles/audio/avdtp.c:avdtp_connect_cb() connect to XX:XX:XX:XX:XX:XX: Host is down (112)
Mar 04 23:35:46 ideapad2 plasmashell[660]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/CompactRepresentation.qml:61:17: Unable to assign [undefined] to int
Mar 04 23:35:58 ideapad2 bluetoothd[382]: profiles/audio/avdtp.c:avdtp_connect_cb() connect to XX:XX:XX:XX:XX:XX: Host is down (112)
Mar 04 23:35:59 ideapad2 systemd[1]: Started dbus-:1.2-org.kde.powerdevil.backlighthelper@52.service.
Mar 04 23:36:04 ideapad2 rtkit-daemon[581]: Supervising 7 threads of 4 processes of 1 users.
Mar 04 23:36:04 ideapad2 rtkit-daemon[581]: Supervising 7 threads of 4 processes of 1 users.
Mar 04 23:36:08 ideapad2 systemd[1]: dbus-:1.2-org.kde.powerdevil.backlighthelper@52.service: Deactivated successfully.
Mar 04 23:36:16 ideapad2 plasmashell[660]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/CompactRepresentation.qml:61:17: Unable to assign [undefined] to int
Mar 04 23:36:21 ideapad2 bluetoothd[382]: profiles/audio/avdtp.c:avdtp_connect_cb() connect to XX:XX:XX:XX:XX:XX: Host is down (112)
Mar 04 23:36:46 ideapad2 plasmashell[660]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/CompactRepresentation.qml:61:17: Unable to assign [undefined] to int
Mar 04 23:36:58 ideapad2 bluetoothd[382]: profiles/audio/avdtp.c:avdtp_connect_cb() connect to XX:XX:XX:XX:XX:XX: Host is down (112)
Mar 04 23:37:17 ideapad2 plasmashell[660]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/CompactRepresentation.qml:61:17: Unable to assign [undefined] to int
Mar 04 23:37:47 ideapad2 plasmashell[660]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/CompactRepresentation.qml:61:17: Unable to assign [undefined] to int
Mar 04 23:38:09 ideapad2 bluetoothd[382]: profiles/audio/avdtp.c:avdtp_connect_cb() connect to XX:XX:XX:XX:XX:XX: Host is down (112)
Mar 04 23:38:17 ideapad2 plasmashell[660]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/CompactRepresentation.qml:61:17: Unable to assign [undefined] to int
Mar 04 23:38:46 ideapad2 plasmashell[660]: Could not find the Plasmoid for Plasma::FrameSvgItem(0x600103a84ca0) QQmlContext(0x6001016a8e20) QUrl("file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/global/Globals.qml")
Mar 04 23:38:46 ideapad2 plasmashell[660]: Could not find the Plasmoid for Plasma::FrameSvgItem(0x600103a84ca0) QQmlContext(0x6001016a8e20) QUrl("file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/global/Globals.qml")
Mar 04 23:38:47 ideapad2 plasmashell[660]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/CompactRepresentation.qml:61:17: Unable to assign [undefined] to int
Mar 04 23:39:17 ideapad2 plasmashell[660]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/CompactRepresentation.qml:61:17: Unable to assign [undefined] to int
Mar 04 23:39:47 ideapad2 plasmashell[660]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/CompactRepresentation.qml:61:17: Unable to assign [undefined] to int
Mar 04 23:40:18 ideapad2 plasmashell[660]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/CompactRepresentation.qml:61:17: Unable to assign [undefined] to int
Mar 04 23:40:48 ideapad2 plasmashell[660]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/CompactRepresentation.qml:61:17: Unable to assign [undefined] to int
Mar 04 23:41:18 ideapad2 plasmashell[660]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/CompactRepresentation.qml:61:17: Unable to assign [undefined] to int
Mar 04 23:41:48 ideapad2 plasmashell[660]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/CompactRepresentation.qml:61:17: Unable to assign [undefined] to int
Mar 04 23:42:18 ideapad2 plasmashell[660]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/CompactRepresentation.qml:61:17: Unable to assign [undefined] to int
Mar 04 23:42:48 ideapad2 plasmashell[660]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/CompactRepresentation.qml:61:17: Unable to assign [undefined] to int
Mar 04 23:43:18 ideapad2 plasmashell[660]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/CompactRepresentation.qml:61:17: Unable to assign [undefined] to int
Mar 04 23:43:48 ideapad2 plasmashell[660]: file:///usr/share/plasma/plasmoids/org.kde.plasma.battery/contents/ui/CompactRepresentation.qml:61:17: Unable to assign [undefined] to int
Mar 04 23:43:59 ideapad2 systemd-logind[383]: The system will suspend now!
Mar 04 23:43:59 ideapad2 NetworkManager[381]: <info>  [1709588639.1089] manager: sleep: sleep requested (sleeping: no  enabled: yes)
Mar 04 23:43:59 ideapad2 NetworkManager[381]: <info>  [1709588639.1097] device (YY:YY:YY:YY:YY:YY): state change: disconnected -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
Mar 04 23:43:59 ideapad2 NetworkManager[381]: <info>  [1709588639.1131] device (p2p-dev-wlp3s0f3u2): state change: disconnected -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
Mar 04 23:43:59 ideapad2 NetworkManager[381]: <info>  [1709588639.1137] manager: NetworkManager state is now ASLEEP
Mar 04 23:43:59 ideapad2 NetworkManager[381]: <info>  [1709588639.1143] device (wlp3s0f3u2): state change: activated -> deactivating (reason 'sleeping', sys-iface-state: 'managed')
Mar 04 23:43:59 ideapad2 kded5[592]: org.kde.plasma.nm.kded: Unhandled active connection state change:  3
Mar 04 23:43:59 ideapad2 systemd[1]: Starting Network Manager Script Dispatcher Service...
Mar 04 23:43:59 ideapad2 systemd[1]: Started Network Manager Script Dispatcher Service.
Mar 04 23:43:59 ideapad2 kernel: wlp3s0f3u2: deauthenticating from ZZ:ZZ:ZZ:ZZ:ZZ:ZZ by local choice (Reason: 3=DEAUTH_LEAVING)
Mar 04 23:43:59 ideapad2 wpa_supplicant[1474]: wlp3s0f3u2: CTRL-EVENT-DISCONNECTED bssid=ZZ:ZZ:ZZ:ZZ:ZZ:ZZ reason=3 locally_generated=1
Mar 04 23:43:59 ideapad2 wpa_supplicant[1474]: wlp3s0f3u2: CTRL-EVENT-DSCP-POLICY clear_all
Mar 04 23:43:59 ideapad2 wpa_supplicant[1474]: wlp3s0f3u2: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
Mar 04 23:43:59 ideapad2 wpa_supplicant[1474]: wlp3s0f3u2: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=RO
Mar 04 23:43:59 ideapad2 NetworkManager[381]: <info>  [1709588639.3730] device (wlp3s0f3u2): supplicant interface state: completed -> disconnected
Mar 04 23:43:59 ideapad2 NetworkManager[381]: <info>  [1709588639.3737] device (wlp3s0f3u2): state change: deactivating -> disconnected (reason 'sleeping', sys-iface-state: 'managed')
Mar 04 23:43:59 ideapad2 kscreenlocker_greet[15544]: Qt: Session management error: networkIdsList argument is NULL
Mar 04 23:43:59 ideapad2 NetworkManager[381]: <info>  [1709588639.4234] device (wlp3s0f3u2): set-hw-addr: set MAC address to DA:1F:AC:0E:D5:65 (scanning)
Mar 04 23:44:02 ideapad2 NetworkManager[381]: <info>  [1709588642.7992] device (wlp3s0f3u2): supplicant interface state: disconnected -> interface_disabled
Mar 04 23:44:02 ideapad2 NetworkManager[381]: <info>  [1709588642.7994] device (wlp3s0f3u2): supplicant interface state: interface_disabled -> disconnected
Mar 04 23:44:02 ideapad2 NetworkManager[381]: <info>  [1709588642.7999] device (wlp3s0f3u2): state change: disconnected -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
Mar 04 23:44:02 ideapad2 NetworkManager[381]: <info>  [1709588642.9518] device (wlp3s0f3u2): set-hw-addr: reset MAC address to AA:AA:AA:AA:AA:AA (unmanage)
Mar 04 23:44:04 ideapad2 systemd-logind[383]: Delay lock is active (UID 1000/asdf, PID 590/ksmserver) but inhibitor timeout is reached.
Mar 04 23:44:04 ideapad2 systemd[1]: Reached target Sleep.
Mar 04 23:44:04 ideapad2 systemd[1]: Starting System Suspend...
Mar 04 23:44:04 ideapad2 systemd-sleep[15586]: Performing sleep operation 'suspend'...
Mar 04 23:44:04 ideapad2 kernel: PM: suspend entry (deep)
Mar 04 23:44:04 ideapad2 kernel: Filesystems sync: 0.016 seconds
Mar 04 23:44:04 ideapad2 kernel: Freezing user space processes
Mar 04 23:44:06 ideapad2 kernel: Freezing user space processes completed (elapsed 1.909 seconds)
Mar 04 23:44:06 ideapad2 kernel: OOM killer disabled.
Mar 04 23:44:06 ideapad2 kernel: Freezing remaining freezable tasks
Mar 04 23:44:06 ideapad2 kernel: Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
Mar 04 23:44:06 ideapad2 kernel: printk: Suspending console(s) (use no_console_suspend to debug)
Mar 04 23:44:06 ideapad2 kernel: systemd-sleep: page allocation failure: order:0, mode:0x100c02(GFP_NOIO|__GFP_HIGHMEM|__GFP_HARDWALL), nodemask=(null),cpuset=/,mems_allowed=0
Mar 04 23:44:06 ideapad2 kernel: CPU: 2 PID: 15586 Comm: systemd-sleep Tainted: G           OE      6.7.5-arch1-1 #1 32ac08bf335c0e36bba629af337d0f9b5fa2013e
Mar 04 23:44:06 ideapad2 kernel: Hardware name: LENOVO 82KR/LNVNB161216, BIOS HBCN18WW 08/27/2021
Mar 04 23:44:06 ideapad2 kernel: Call Trace:
Mar 04 23:44:06 ideapad2 kernel:  <TASK>
Mar 04 23:44:06 ideapad2 kernel:  dump_stack_lvl+0x47/0x60
Mar 04 23:44:06 ideapad2 kernel:  warn_alloc+0x165/0x1e0
Mar 04 23:44:06 ideapad2 kernel:  __alloc_pages_slowpath.constprop.0+0xd4f/0xdb0
Mar 04 23:44:06 ideapad2 kernel:  __alloc_pages+0x32d/0x350
Mar 04 23:44:06 ideapad2 kernel:  ttm_pool_alloc+0x19f/0x600 [ttm e7a3a13d9c54489e356bc6f8822bcbb33a1553aa]
Mar 04 23:44:06 ideapad2 kernel:  amdgpu_ttm_tt_populate+0x7c/0xb0 [amdgpu 65a71d893fe859901f70ee7a0d0869ae55521ce8]
Mar 04 23:44:06 ideapad2 kernel:  ttm_tt_populate+0xa1/0x130 [ttm e7a3a13d9c54489e356bc6f8822bcbb33a1553aa]
Mar 04 23:44:06 ideapad2 kernel:  ttm_bo_handle_move_mem+0x162/0x170 [ttm e7a3a13d9c54489e356bc6f8822bcbb33a1553aa]
Mar 04 23:44:06 ideapad2 kernel:  ttm_mem_evict_first+0x201/0x530 [ttm e7a3a13d9c54489e356bc6f8822bcbb33a1553aa]
Mar 04 23:44:06 ideapad2 kernel:  ttm_resource_manager_evict_all+0xa7/0x1d0 [ttm e7a3a13d9c54489e356bc6f8822bcbb33a1553aa]
Mar 04 23:44:06 ideapad2 kernel:  ? __pfx_pci_pm_prepare+0x10/0x10
Mar 04 23:44:06 ideapad2 kernel:  amdgpu_device_prepare+0x4e/0xd0 [amdgpu 65a71d893fe859901f70ee7a0d0869ae55521ce8]
Mar 04 23:44:06 ideapad2 kernel:  pci_pm_prepare+0x34/0x70
Mar 04 23:44:06 ideapad2 kernel:  dpm_prepare+0x27f/0x480
Mar 04 23:44:06 ideapad2 kernel:  dpm_suspend_start+0x1e/0x90
Mar 04 23:44:06 ideapad2 kernel:  suspend_devices_and_enter+0x165/0x960
Mar 04 23:44:06 ideapad2 kernel:  pm_suspend+0x25e/0x590
Mar 04 23:44:06 ideapad2 kernel:  state_store+0x6c/0xd0
Mar 04 23:44:06 ideapad2 kernel:  kernfs_fop_write_iter+0x136/0x1d0
Mar 04 23:44:06 ideapad2 kernel:  vfs_write+0x23d/0x400
Mar 04 23:44:06 ideapad2 kernel:  ksys_write+0x6f/0xf0
Mar 04 23:44:06 ideapad2 kernel:  do_syscall_64+0x64/0xe0
Mar 04 23:44:06 ideapad2 kernel:  ? srso_return_thunk+0x5/0x5f
Mar 04 23:44:06 ideapad2 kernel:  ? exc_page_fault+0x7f/0x180
Mar 04 23:44:06 ideapad2 kernel:  entry_SYSCALL_64_after_hwframe+0x6e/0x76
Mar 04 23:44:06 ideapad2 kernel: RIP: 0033:0x73edbc91a184
Mar 04 23:44:06 ideapad2 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 3e 0e 00 00 74 13 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 54 c3 0f 1f 00 48 83 ec 28 48 89 54 24 18 48
Mar 04 23:44:06 ideapad2 kernel: RSP: 002b:00007fffc21720d8 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
Mar 04 23:44:06 ideapad2 kernel: RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 000073edbc91a184
Mar 04 23:44:06 ideapad2 kernel: RDX: 0000000000000004 RSI: 0000621fe599d400 RDI: 0000000000000005
Mar 04 23:44:06 ideapad2 kernel: RBP: 0000621fe599d400 R08: 0000000000000000 R09: 0000000000000001
Mar 04 23:44:06 ideapad2 kernel: R10: 0000000000000004 R11: 0000000000000202 R12: 0000000000000004
Mar 04 23:44:06 ideapad2 kernel: R13: 0000621fe59992d0 R14: 000073edbc9f4f00 R15: 00000000fffffff7
Mar 04 23:44:06 ideapad2 kernel:  </TASK>
Mar 04 23:44:06 ideapad2 kernel: Mem-Info:
Mar 04 23:44:06 ideapad2 kernel: active_anon:379866 inactive_anon:61875 isolated_anon:0
                                  active_file:1092068 inactive_file:733781 isolated_file:0
                                  unevictable:128 dirty:14 writeback:0
                                  slab_reclaimable:33052 slab_unreclaimable:31757
                                  mapped:1333413 shmem:7962 pagetables:17308
                                  sec_pagetables:0 bounce:0
                                  kernel_misc_reclaimable:0
                                  free:40371 free_pcp:610 free_cma:0
Mar 04 23:44:06 ideapad2 kernel: Node 0 active_anon:1519464kB inactive_anon:247500kB active_file:4368272kB inactive_file:2935124kB unevictable:512kB isolated(anon):0kB isolated(file):0kB mapped:5333652kB dirty:56kB writeback:0kB shmem:31848kB shmem_thp:0kB shmem_pmdmapped:0kB anon_thp:630784kB writeback_tmp:0kB kernel_stack:16240kB pagetables:69232kB sec_pagetables:0kB all_unreclaimable? no
Mar 04 23:44:06 ideapad2 kernel: Node 0 DMA free:13312kB boost:0kB min:88kB low:108kB high:128kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
Mar 04 23:44:06 ideapad2 kernel: lowmem_reserve[]: 0 2807 11280 11280 11280
Mar 04 23:44:06 ideapad2 kernel: Node 0 DMA32 free:87916kB boost:37800kB min:54600kB low:58800kB high:63000kB reserved_highatomic:0KB active_anon:424368kB inactive_anon:29596kB active_file:1214868kB inactive_file:634076kB unevictable:0kB writepending:4kB present:3019408kB managed:2914300kB mlocked:0kB bounce:0kB free_pcp:1164kB local_pcp:600kB free_cma:0kB
Mar 04 23:44:06 ideapad2 kernel: lowmem_reserve[]: 0 0 8472 8472 8472
Mar 04 23:44:06 ideapad2 kernel: Node 0 Normal free:60256kB boost:10240kB min:60932kB low:73604kB high:86276kB reserved_highatomic:0KB active_anon:1095096kB inactive_anon:217904kB active_file:3153404kB inactive_file:2301048kB unevictable:512kB writepending:52kB present:8896512kB managed:8676108kB mlocked:512kB bounce:0kB free_pcp:1276kB local_pcp:1004kB free_cma:0kB
Mar 04 23:44:06 ideapad2 kernel: lowmem_reserve[]: 0 0 0 0 0
Mar 04 23:44:06 ideapad2 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
Mar 04 23:44:06 ideapad2 kernel: Node 0 DMA32: 4973*4kB (UME) 5403*8kB (UM) 1550*16kB (UME) 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 87916kB
Mar 04 23:44:06 ideapad2 kernel: Node 0 Normal: 1702*4kB (UME) 689*8kB (ME) 736*16kB (UME) 342*32kB (UME) 290*64kB (UME) 4*128kB (UM) 4*256kB (UM) 4*512kB (UM) 1*1024kB (M) 1*2048kB (U) 0*4096kB = 60256kB
Mar 04 23:44:06 ideapad2 kernel: Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB
Mar 04 23:44:06 ideapad2 kernel: Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
Mar 04 23:44:06 ideapad2 kernel: 1859160 total pagecache pages
Mar 04 23:44:06 ideapad2 kernel: 25349 pages in swap cache
Mar 04 23:44:06 ideapad2 kernel: Free swap  = 5899516kB
Mar 04 23:44:06 ideapad2 kernel: Total swap = 8129532kB
Mar 04 23:44:06 ideapad2 kernel: 2982978 pages RAM
Mar 04 23:44:06 ideapad2 kernel: 0 pages HighMem/MovableOnly
Mar 04 23:44:06 ideapad2 kernel: 81536 pages reserved
Mar 04 23:44:06 ideapad2 kernel: 0 pages cma reserved
Mar 04 23:44:06 ideapad2 kernel: 0 pages hwpoisoned
Mar 04 23:44:06 ideapad2 kernel: [TTM] Buffer eviction failed
Mar 04 23:44:06 ideapad2 kernel: [drm] evicting device resources failed
Mar 04 23:44:06 ideapad2 kernel: amdgpu 0000:03:00.0: PM: device_prepare(): pci_pm_prepare+0x0/0x70 returns -12
Mar 04 23:44:06 ideapad2 kernel: amdgpu 0000:03:00.0: PM: not prepared for power transition: code -12
Mar 04 23:44:06 ideapad2 kernel: PM: Some devices failed to suspend, or early wake event detected
Mar 04 23:44:06 ideapad2 kernel: OOM killer enabled.
Mar 04 23:44:06 ideapad2 kernel: Restarting tasks ... done.
Mar 04 23:44:06 ideapad2 kernel: random: crng reseeded on system resumption
Mar 04 23:44:06 ideapad2 wpa_supplicant[1474]: wlp3s0f3u2: CTRL-EVENT-DSCP-POLICY clear_all
Mar 04 23:44:06 ideapad2 wpa_supplicant[1474]: wlp3s0f3u2: CTRL-EVENT-DSCP-POLICY clear_all
Mar 04 23:44:06 ideapad2 wpa_supplicant[1474]: nl80211: deinit ifname=wlp3s0f3u2 disabled_11b_rates=0
Mar 04 23:44:06 ideapad2 kernel: PM: suspend exit
Mar 04 23:44:06 ideapad2 kernel: PM: suspend entry (s2idle)
Mar 04 23:44:06 ideapad2 bluetoothd[382]: Controller resume with wake event 0x0

Offline

#10 2024-03-05 10:19:36

sebbas
Member
Registered: 2023-09-25
Posts: 6

Re: System unresponsive on suspend when specific apps are open

Hey I might have found the problem

When i run

swapoff <path to the lvm swap partition>

suspend works fine even with both apps open.
Also I narrowed down the emacs issue to where it is specifically when emacs runs AND it has started a language server e.g. clangd
Anyway I'm going to try setting up a swapfile to replace the swap partition to check if the issue is specific to having a lvm swap partition on luks

Offline

#11 2024-03-05 10:47:51

sebbas
Member
Registered: 2023-09-25
Posts: 6

Re: System unresponsive on suspend when specific apps are open

Ok no so if I make a swapfile it still freezes, I only get working suspend now without any swapspace enabled

Offline

#12 2024-03-05 14:04:58

seth
Member
Registered: 2012-09-03
Posts: 51,796

Re: System unresponsive on suspend when specific apps are open

seth wrote:

From the looks of the backtrace, amdgpu seems to try to preserve VRAM in RAM and runs OOM - what by the OPs account "8GB (shows up as 6.7ish GB using htop)"is most likely pointless as the VRAM is actually shared RAM.

According to https://gitlab.freedesktop.org/drm/amd/-/issues/3172 there's a patch coming up in 6.8

Offline

#13 2024-03-05 14:34:29

loqs
Member
Registered: 2014-03-06
Posts: 17,464

Re: System unresponsive on suspend when specific apps are open

drm/amd: Stop evicting resources on APUs in suspend is in 6.8-rc5 and later.  You could try linux-mainline to see if that resolves the issue.

Offline

#14 2024-03-19 02:57:58

matt90
Member
From: New Mexico
Registered: 2014-05-23
Posts: 7

Re: System unresponsive on suspend when specific apps are open

Well, I upgraded to 6.7.9 (6.7.9-zen1-1-zen) and suspend has not been giving me any problems in several days of routinely suspending, while I had significant problems on 6.7.8.  So maybe something that went into 6.7.9 fixed it?

Offline

#15 2024-04-07 19:05:21

median_arch_user
Member
From: Poland
Registered: 2024-04-07
Posts: 3

Re: System unresponsive on suspend when specific apps are open

Kernel:       6.8.4-arch1-1
DE:              Plasma 6.0.3
WM:            kwin
CPU:           Intel i5-8600K (6) @ 4.300GHz
GPU:           AMD Radeon RX 6700 XT
Memory:    16 GiB + 20 GiB swap (or 48 GiB zram)

I still have the same problem on my desktop PC with RX 6700 XT and 6.8.4-arch1-1 kernel. I also had 20 GiB of the swapfile, then I tried 20 GiB of the swap partition, then I tried using swap on zram instead. None of these have resolved the problem, except turning off swap completely.
I've noticed that the problem does not occur when there are a lot of free RAM, but when I launch some programs to fill ~60% of RAM, it fails to suspend.

RX 6700 XT has 12 GiB of VRAM, I have 16 GiB of RAM and I had 20 GiB of disk swap, so I'm sure that even with 60% of RAM used there are enough swap space to move all of the VRAM.

There are mine systemd logs, they are very similar to the ones published earlier though:

kwi 07 18:54:38 archklim systemd[1]: Reached target Sleep.
kwi 07 18:54:38 archklim openrazer-daemon[1541]: 2024-04-07 18:54:38 | razer.device0                  | INFO     | Suspending RazerDeathAdderEssential
kwi 07 18:54:38 archklim systemd[1]: Starting System Suspend...
kwi 07 18:54:38 archklim systemd-sleep[777386]: Performing sleep operation 'suspend'...
kwi 07 18:54:38 archklim kernel: PM: suspend entry (deep)
kwi 07 18:54:38 archklim kernel: Filesystems sync: 0.044 seconds
kwi 07 18:54:38 archklim pipewire-media-session[1646]: spa.bluez5.sink.media: 0x606834e34fb8: error 24
kwi 07 18:54:38 archklim bluetoothd[1367]: No matching connection for device
kwi 07 18:54:43 archklim kernel: Freezing user space processes
kwi 07 18:54:43 archklim kernel: Freezing user space processes completed (elapsed 0.003 seconds)
kwi 07 18:54:43 archklim kernel: OOM killer disabled.
kwi 07 18:54:43 archklim kernel: Freezing remaining freezable tasks
kwi 07 18:54:43 archklim kernel: Freezing remaining freezable tasks completed (elapsed 0.003 seconds)
kwi 07 18:54:43 archklim kernel: printk: Suspending console(s) (use no_console_suspend to debug)
kwi 07 18:54:43 archklim kernel: systemd-sleep: page allocation failure: order:0, mode:0x100c02(GFP_NOIO|__GFP_HIGHMEM|__GFP_HARDWALL), nodemask=(null),cpuset=/,mems_allowed=0
kwi 07 18:54:43 archklim kernel: CPU: 0 PID: 777386 Comm: systemd-sleep Tainted: G           OE      6.8.2-arch2-1 #1 a430fb92f7ba43092b62bbe6bac995458d3d442d
kwi 07 18:54:43 archklim kernel: Hardware name: System manufacturer System Product Name/PRIME Z370-P II, BIOS 2801 01/14/2021
kwi 07 18:54:43 archklim kernel: Call Trace:
kwi 07 18:54:43 archklim kernel:  <TASK>
kwi 07 18:54:43 archklim kernel:  dump_stack_lvl+0x47/0x60
kwi 07 18:54:43 archklim kernel:  warn_alloc+0x165/0x1e0
kwi 07 18:54:43 archklim kernel:  __alloc_pages_slowpath.constprop.0+0xd7d/0xde0
kwi 07 18:54:43 archklim kernel:  __alloc_pages+0x32d/0x350
kwi 07 18:54:43 archklim kernel:  ttm_pool_alloc+0x19f/0x600 [ttm 0bd92a9d9dccc3a4f19554535860aaeda76eb4f4]
kwi 07 18:54:43 archklim kernel:  amdgpu_ttm_tt_populate+0x7c/0xb0 [amdgpu 000d0a1576c028afd71f61fd649578a985522e9f]
kwi 07 18:54:43 archklim kernel:  ttm_tt_populate+0x9e/0x130 [ttm 0bd92a9d9dccc3a4f19554535860aaeda76eb4f4]
kwi 07 18:54:43 archklim kernel:  ttm_bo_handle_move_mem+0x162/0x170 [ttm 0bd92a9d9dccc3a4f19554535860aaeda76eb4f4]
kwi 07 18:54:43 archklim kernel:  ttm_mem_evict_first+0x201/0x530 [ttm 0bd92a9d9dccc3a4f19554535860aaeda76eb4f4]
kwi 07 18:54:43 archklim kernel:  ttm_resource_manager_evict_all+0xa7/0x1d0 [ttm 0bd92a9d9dccc3a4f19554535860aaeda76eb4f4]
kwi 07 18:54:43 archklim kernel:  ? __pfx_pci_pm_prepare+0x10/0x10
kwi 07 18:54:43 archklim kernel:  amdgpu_device_prepare+0x54/0xf0 [amdgpu 000d0a1576c028afd71f61fd649578a985522e9f]
kwi 07 18:54:43 archklim kernel:  pci_pm_prepare+0x31/0x70
kwi 07 18:54:43 archklim kernel:  dpm_prepare+0x27c/0x480
kwi 07 18:54:43 archklim kernel:  dpm_suspend_start+0x1e/0x90
kwi 07 18:54:43 archklim kernel:  suspend_devices_and_enter+0x165/0x960
kwi 07 18:54:43 archklim kernel:  pm_suspend+0x25e/0x590
kwi 07 18:54:43 archklim kernel:  state_store+0x6c/0xd0
kwi 07 18:54:43 archklim kernel:  kernfs_fop_write_iter+0x133/0x1d0
kwi 07 18:54:43 archklim kernel:  vfs_write+0x29b/0x470
kwi 07 18:54:43 archklim kernel:  ksys_write+0x6f/0xf0
kwi 07 18:54:43 archklim kernel:  do_syscall_64+0x86/0x170
kwi 07 18:54:43 archklim kernel:  ? __count_memcg_events+0x4d/0xc0
kwi 07 18:54:43 archklim kernel:  ? count_memcg_events.constprop.0+0x1a/0x30
kwi 07 18:54:43 archklim kernel:  ? handle_mm_fault+0xa2/0x360
kwi 07 18:54:43 archklim kernel:  ? do_user_addr_fault+0x304/0x670
kwi 07 18:54:43 archklim kernel:  ? exc_page_fault+0x7f/0x180
kwi 07 18:54:43 archklim kernel:  entry_SYSCALL_64_after_hwframe+0x6e/0x76
kwi 07 18:54:43 archklim kernel: RIP: 0033:0x7ae5b8ed5184
kwi 07 18:54:43 archklim 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 3e 0e 00 00 74 13 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 54 c3 0f 1f 
00 48 83 ec 28 48 89 54 24 18 48
kwi 07 18:54:43 archklim kernel: RSP: 002b:00007fff0a9575f8 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
kwi 07 18:54:43 archklim kernel: RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007ae5b8ed5184
kwi 07 18:54:43 archklim kernel: RDX: 0000000000000004 RSI: 000059fc4b7e54a0 RDI: 0000000000000005
kwi 07 18:54:43 archklim kernel: RBP: 000059fc4b7e54a0 R08: 0000000000000000 R09: 0000000000000001
kwi 07 18:54:43 archklim kernel: R10: 0000000000000004 R11: 0000000000000202 R12: 0000000000000004
kwi 07 18:54:43 archklim kernel: R13: 000059fc4b7e12d0 R14: 00007ae5b8faff00 R15: 00000000fffffff7
kwi 07 18:54:43 archklim kernel:  </TASK>
kwi 07 18:54:43 archklim kernel: Mem-Info:
kwi 07 18:54:43 archklim kernel: active_anon:521256 inactive_anon:119137 isolated_anon:0
                                  active_file:1123745 inactive_file:1017562 isolated_file:0
                                  unevictable:43 dirty:68 writeback:0
                                  slab_reclaimable:66826 slab_unreclaimable:63186
                                  mapped:517566 shmem:50093 pagetables:46920
                                  sec_pagetables:0 bounce:0
                                  kernel_misc_reclaimable:0
                                  free:70119 free_pcp:2702 free_cma:0
kwi 07 18:54:43 archklim kernel: Node 0 active_anon:2085024kB inactive_anon:476548kB active_file:4494980kB inactive_file:4070248kB unevictable:172kB isolated(anon):0kB isolated(file):0kB mapped:207026
4kB dirty:272kB writeback:0kB shmem:200372kB shmem_thp:0kB shmem_pmdmapped:0kB anon_thp:169984kB writeback_tmp:0kB kernel_stack:32224kB pagetables:187680kB sec_pagetables:0kB all_unreclaimable? no
kwi 07 18:54:43 archklim kernel: Node 0 DMA free:13308kB boost:0kB min:60kB low:72kB high:84kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0
kB writepending:0kB present:15988kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
kwi 07 18:54:43 archklim kernel: lowmem_reserve[]: 0 3038 15878 15878 15878
kwi 07 18:54:43 archklim kernel: Node 0 DMA32 free:92364kB boost:29064kB min:41984kB low:45212kB high:48440kB reserved_highatomic:0KB active_anon:193968kB inactive_anon:45932kB active_file:1097968kB i
nactive_file:611124kB unevictable:0kB writepending:16kB present:3215336kB managed:3149336kB mlocked:0kB bounce:0kB free_pcp:2432kB local_pcp:2432kB free_cma:0kB
kwi 07 18:54:43 archklim kernel: lowmem_reserve[]: 0 0 12839 12839 12839
kwi 07 18:54:43 archklim kernel: Node 0 Normal free:174804kB boost:122836kB min:177432kB low:191080kB high:204728kB reserved_highatomic:0KB active_anon:1891056kB inactive_anon:430616kB active_file:339
7012kB inactive_file:3459124kB unevictable:172kB writepending:256kB present:13484032kB managed:13154340kB mlocked:172kB bounce:0kB free_pcp:8376kB local_pcp:8360kB free_cma:0kB
kwi 07 18:54:43 archklim kernel: lowmem_reserve[]: 0 0 0 0 0
kwi 07 18:54:43 archklim kernel: Node 0 DMA: 1*4kB (U) 1*8kB (U) 1*16kB (U) 1*32kB (U) 1*64kB (U) 1*128kB (U) 1*256kB (U) 1*512kB (U) 0*1024kB 2*2048kB (UM) 2*4096kB (M) = 13308kB
kwi 07 18:54:43 archklim kernel: Node 0 DMA32: 22769*4kB (UM) 35*8kB (U) 9*16kB (U) 7*32kB (U) 6*64kB (U) 2*128kB (U) 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 92364kB
kwi 07 18:54:43 archklim kernel: Node 0 Normal: 43189*4kB (UME) 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 1*2048kB (U) 0*4096kB = 174804kB
kwi 07 18:54:43 archklim kernel: Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB
kwi 07 18:54:43 archklim kernel: Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
kwi 07 18:54:43 archklim kernel: 2274901 total pagecache pages
kwi 07 18:54:43 archklim kernel: 83489 pages in swap cache
kwi 07 18:54:43 archklim kernel: Free swap  = 43922684kB
kwi 07 18:54:43 archklim kernel: Total swap = 48955388kB
kwi 07 18:54:43 archklim kernel: 4178839 pages RAM
kwi 07 18:54:43 archklim kernel: 0 pages HighMem/MovableOnly
kwi 07 18:54:43 archklim kernel: 99080 pages reserved
kwi 07 18:54:43 archklim kernel: 0 pages cma reserved
kwi 07 18:54:43 archklim kernel: 0 pages hwpoisoned
kwi 07 18:54:43 archklim kernel: [TTM] Buffer eviction failed
kwi 07 18:54:43 archklim kernel: [drm] evicting device resources failed
kwi 07 18:54:43 archklim kernel: amdgpu 0000:03:00.0: PM: device_prepare(): pci_pm_prepare+0x0/0x70 returns -12
kwi 07 18:54:43 archklim kernel: amdgpu 0000:03:00.0: PM: not prepared for power transition: code -12
kwi 07 18:54:43 archklim kernel: PM: Some devices failed to suspend, or early wake event detected
kwi 07 18:54:43 archklim kernel: OOM killer enabled.
kwi 07 18:54:43 archklim kernel: Restarting tasks ... done.
kwi 07 18:54:43 archklim kernel: random: crng reseeded on system resumption
kwi 07 18:54:43 archklim bluetoothd[1367]: src/profile.c:ext_io_disconnected() Unable to get io data for Hands-Free Voice gateway: getpeername: Transport endpoint is not connected (107)
kwi 07 18:54:43 archklim pipewire-media-session[1646]: pw.node: (bluez_output.D8_37_3B_60_33_7D.a2dp-sink-82) running -> error (Received error event)
kwi 07 18:54:43 archklim pipewire-media-session[1646]: spa.bluez5: Failure in Bluetooth audio transport /org/bluez/hci0/dev_D8_37_3B_60_33_7D/fd1
kwi 07 18:54:43 archklim pipewire[1637]: pw.node: (bluez_output.D8_37_3B_60_33_7D.a2dp-sink-82) running -> error (Received error event)
kwi 07 18:54:43 archklim pipewire-media-session[1646]: ms.core: error id:111 seq:51882 res:-14 (Bad address): Received error event
kwi 07 18:54:43 archklim bluetoothd[1367]: Controller resume with wake event 0x0
kwi 07 18:54:43 archklim kernel: PM: suspend exit
kwi 07 18:54:43 archklim kernel: PM: suspend entry (s2idle)

Offline

#16 2024-04-07 19:39:09

seth
Member
Registered: 2012-09-03
Posts: 51,796

Re: System unresponsive on suspend when specific apps are open

The  AMD Radeon RX 6700 XT isn't an APU, the the bug/patch in #12/#13 don't meet your situation - the eviction is on purpose.

 I also had 20 GiB of the swapfile, then I tried 20 GiB of the swap partition, then I tried using swap on zram instead. None of these have resolved the problem, except turning off swap completely.
I've noticed that the problem does not occur when there are a lot of free RAM, but when I launch some programs to fill ~60% of RAM, it fails to suspend.

Do you have zswap enabled? (The default answer is "yes") - what if you disable that?
https://wiki.archlinux.org/title/Zswap

(There're known issues w/ zswap and 6.8, though iirc those are fixed in 6.8.4)

Offline

#17 2024-04-07 22:44:49

median_arch_user
Member
From: Poland
Registered: 2024-04-07
Posts: 3

Re: System unresponsive on suspend when specific apps are open

I've disabled Zswap using the

zswap.enabled=0

kernel parameter and checked if it is really disabled using

cat /sys/module/zswap/parameters/enabled

which gives me

N

However, that didn't change anything. I've also tried using linux-mainline 6.9.0-rc2-1 and 40 GiB swap file, but no luck.

Offline

#18 2024-04-08 08:01:20

seth
Member
Registered: 2012-09-03
Posts: 51,796

Re: System unresponsive on suspend when specific apps are open

https://gitlab.freedesktop.org/drm/amd/ … te_1708592 theorizes that the driver tries to allocate RAM after access to the swap is lost and has a service that mlocks enough RAM to buffer the VRAM
If that works it probably needs to go into the wiki.

Offline

#19 2024-04-08 12:55:12

median_arch_user
Member
From: Poland
Registered: 2024-04-07
Posts: 3

Re: System unresponsive on suspend when specific apps are open

Yes, it works! If I launch this program just before suspending the PC, it suspends and resumes successfully. It takes a few seconds to reserve memory, but that's not a problem smile
I wrote a systemd unit that runs the memreserver program automatically before sleep:

File: /etc/systemd/system/memreserver.service

[Unit]
Description=Reserving RAM space for VRAM
Before=sleep.target

[Service]
Type=oneshot
ExecStart=/opt/memreserver/memreserver

[Install]
WantedBy=sleep.target

And then enabled it with

# systemctl enable memreserver

And it works now, I didn't test it very thoroughly yet though.

Offline

#20 2024-04-08 15:04:15

seth
Member
Registered: 2012-09-03
Posts: 51,796

Re: System unresponsive on suspend when specific apps are open

There's one in the repo, https://git.dolansoft.org/lorenz/memres … type=heads

Thanks for confirmation, I'll add a paragraph to the wiki.

Offline

Board footer

Powered by FluxBB