Hibernation (S4) bails from failed buffer eviction on heavy games in 780M
Before submitting your bug report:
Related issues #2635 and
Brief summary of the problem:
With ample swap (60gb), running a heavy game (here, Spiderman Miles Morales), makes hibernation attempts fail with an oops. Moreover, after the bail, the screen remains off. This is while running in gamescope.
Hardware description:
- Legion Go
- CPU: Z1 Extreme
- System Memory: 16 GB
- Display(s): 144hz 2k
- Type of Display Connection: eDP to MIPS
System information:
- Distro name and Version: Bazzite
- Kernel version: 6.11.9
- Custom kernel: https://github.com/hhd-dev/patchwork/tree/6.11.9-303
- Note: hibernation on stock 6.11.9 is broken due to the mediatek bluetooth driver
How to reproduce the issue:
Hibernating on miles morales causes the following:
[ 207.674270] printk: Suspending console(s) (use no_console_suspend to debug)
[ 207.686110] queueing ieee80211 work while going to suspend
[ 207.958192] kworker/u64:26: page allocation failure: order:0, mode:0x100c02(GFP_NOIO|__GFP_HIGHMEM|__GFP_HARDWALL), nodemask=(null),cpuset=/,mems_allowed=0
[ 207.958210] CPU: 10 UID: 0 PID: 5225 Comm: kworker/u64:26 Tainted: P W O 6.11.9-303.bazzite.fc41.x86_64 #1
[ 207.958216] Tainted: [P]=PROPRIETARY_MODULE, [W]=WARN, [O]=OOT_MODULE
[ 207.958217] Hardware name: LENOVO 83E1/LNVNB161216, BIOS N3CN35WW 07/05/2024
[ 207.958220] Workqueue: async async_run_entry_fn
[ 207.958228] Call Trace:
[ 207.958232] <TASK>
[ 207.958238] dump_stack_lvl+0x5d/0x80
[ 207.958244] warn_alloc+0x164/0x190
[ 207.958253] __alloc_pages_slowpath.constprop.0+0xcf2/0xe00
[ 207.958263] __alloc_pages_noprof+0x321/0x350
[ 207.958273] ttm_pool_alloc+0x11d/0x7b0 [ttm]
[ 207.958287] amdgpu_ttm_tt_populate+0xac/0x100 [amdgpu]
[ 207.958546] ttm_tt_populate+0x9e/0x130 [ttm]
[ 207.958553] ttm_bo_handle_move_mem+0x176/0x1b0 [ttm]
[ 207.958561] ttm_mem_evict_first+0x3de/0x5a0 [ttm]
[ 207.958571] ttm_resource_manager_evict_all+0x9e/0x210 [ttm]
[ 207.958581] amdgpu_device_suspend+0xaa/0x170 [amdgpu]
[ 207.958816] amdgpu_pmops_freeze+0x25/0x70 [amdgpu]
[ 207.959040] pci_pm_freeze+0x55/0xc0
[ 207.959045] ? __pfx_pci_pm_freeze+0x10/0x10
[ 207.959048] dpm_run_callback+0x47/0x150
[ 207.959053] device_suspend+0x141/0x510
[ 207.959058] async_suspend+0x1d/0x30
[ 207.959062] async_run_entry_fn+0x31/0x130
[ 207.959067] process_one_work+0x176/0x330
[ 207.959073] worker_thread+0x252/0x390
[ 207.959078] ? __pfx_worker_thread+0x10/0x10
[ 207.959081] kthread+0xcf/0x100
[ 207.959085] ? __pfx_kthread+0x10/0x10
[ 207.959088] ret_from_fork+0x31/0x50
[ 207.959092] ? __pfx_kthread+0x10/0x10
[ 207.959094] ret_from_fork_asm+0x1a/0x30
[ 207.959102] </TASK>
[ 207.959113] Mem-Info:
[ 207.959118] active_anon:23540 inactive_anon:14621 isolated_anon:0
active_file:2977 inactive_file:2796 isolated_file:0
unevictable:1555 dirty:0 writeback:238
slab_reclaimable:18162 slab_unreclaimable:64293
mapped:4355 shmem:209 pagetables:9531
sec_pagetables:1106 bounce:0
kernel_misc_reclaimable:0
free:107342 free_pcp:3220 free_cma:0
[ 207.959124] Node 0 active_anon:94160kB inactive_anon:58484kB active_file:11908kB inactive_file:11184kB unevictable:6220kB isolated(anon):0kB isolated(file):0kB mapped:17420kB dirty:0kB writeback:952kB shmem:836kB shmem_thp:0kB shmem_pmdmapped:0kB anon_thp:0kB writeback_tmp:0kB kernel_stack:17464kB pagetables:38124kB sec_pagetables:4424kB all_unreclaimable? yes
[ 207.959131] Node 0 DMA free:1084kB boost:0kB min:152kB low:188kB high:224kB reserved_highatomic:0KB active_anon:16kB 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
[ 207.959137] lowmem_reserve[]: 0 1029 12479 0 0
[ 207.959143] Node 0 DMA32 free:61760kB boost:4096kB min:16056kB low:19044kB high:22032kB reserved_highatomic:0KB active_anon:55720kB inactive_anon:42088kB active_file:0kB inactive_file:136kB unevictable:0kB writepending:800kB present:1263868kB managed:1196380kB mlocked:0kB bounce:0kB free_pcp:7328kB local_pcp:560kB free_cma:0kB
[ 207.959149] lowmem_reserve[]: 0 0 11450 0 0
[ 207.959154] Node 0 Normal free:366524kB boost:263956kB min:381272kB low:410600kB high:439928kB reserved_highatomic:0KB active_anon:39260kB inactive_anon:15456kB active_file:11600kB inactive_file:12352kB unevictable:6220kB writepending:1796kB present:12028928kB managed:11732048kB mlocked:6220kB bounce:0kB free_pcp:5552kB local_pcp:216kB free_cma:0kB
[ 207.959160] lowmem_reserve[]: 0 0 0 0 0
[ 207.959165] Node 0 DMA: 7*4kB (UM) 6*8kB (UM) 3*16kB (UM) 2*32kB (U) 2*64kB (U) 2*128kB (U) 0*256kB 1*512kB (U) 0*1024kB 0*2048kB 0*4096kB = 1084kB
[ 207.959183] Node 0 DMA32: 296*4kB (UME) 207*8kB (UME) 492*16kB (UME) 451*32kB (UME) 408*64kB (UME) 80*128kB (UM) 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 61496kB
[ 207.959200] Node 0 Normal: 32506*4kB (UME) 10583*8kB (UME) 212*16kB (UE) 582*32kB (UE) 158*64kB (UE) 10*128kB (UE) 3*256kB (U) 4*512kB (U) 2*1024kB (U) 3*2048kB (U) 26*4096kB (U) = 365600kB
[ 207.959221] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB
[ 207.959224] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
[ 207.959225] 7543 total pagecache pages
[ 207.959226] 323 pages in swap cache
[ 207.959227] Free swap = 62682544kB
[ 207.959229] Total swap = 67108856kB
[ 207.959230] 3327197 pages RAM
[ 207.959231] 0 pages HighMem/MovableOnly
[ 207.959232] 91250 pages reserved
[ 207.959233] 0 pages cma reserved
[ 207.959234] 0 pages hwpoisoned
[ 207.959251] [TTM] Buffer eviction failed
[ 207.959254] [drm] evicting device resources failed
[ 207.959258] amdgpu 0000:c2:00.0: PM: pci_pm_freeze(): amdgpu_pmops_freeze [amdgpu] returns -12
[ 207.959491] amdgpu 0000:c2:00.0: PM: dpm_run_callback(): pci_pm_freeze returns -12
[ 207.959496] amdgpu 0000:c2:00.0: PM: failed to freeze async: error -12
Here is the oups after:
208.742092] ------------[ cut here ]------------
[ 208.742096] WARNING: CPU: 14 PID: 5234 at drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_enc_cfg.c:738 link_enc_cfg_validate+0x33b/0x5c0 [amdgpu]
[ 208.742500] Modules linked in: snd_seq_dummy snd_hrtimer rfcomm acpi_call hid_sensor_accel_3d hid_sensor_als hid_sensor_gyro_3d hid_sensor_trigger hid_sensor_iio_common industrialio_triggered_buffer kfifo_buf industrialio hid_sensor_hub nf_conntrack_netbios_ns nf_conntrack_broadcast nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_set nf_tables qrtr bnep sunrpc binfmt_misc vfat fat wl(PO) snd_sof_amd_acp63 snd_sof_amd_vangogh snd_sof_amd_rembrandt snd_sof_amd_renoir snd_sof_amd_acp snd_sof_pci spd5118 snd_sof_xtensa_dsp snd_sof snd_hda_codec_realtek mt7921e intel_rapl_msr mt7921_common snd_hda_codec_generic amd_atl snd_sof_utils intel_rapl_common snd_hda_scodec_component mt792x_lib snd_hda_codec_hdmi mt76_connac_lib edac_mce_amd snd_pci_ps btusb snd_amd_sdw_acpi soundwire_amd mt76 snd_hda_intel btrtl snd_intel_dspcfg btintel snd_intel_sdw_acpi soundwire_generic_allocation btbcm soundwire_bus
[ 208.742566] kvm_amd snd_hda_codec snd_soc_core btmtk snd_hda_core mac80211 snd_compress kvm ac97_bus snd_hwdep snd_pcm_dmaengine bluetooth snd_seq snd_rpl_pci_acp6x snd_pci_acp6x libarc4 rapl snd_pci_acp5x snd_seq_device snd_rn_pci_acp3x pcspkr snd_acp_config snd_pcm wmi_bmof thunderbolt cfg80211 snd_timer snd_soc_acpi snd i2c_piix4 snd_pci_acp3x soundcore k10temp ideapad_laptop i2c_smbus sparse_keymap rfkill amd_pmf legion_laptop xpad amdtee tee joydev platform_profile amd_pmc tcp_bbr sch_fq vhba(O) ryzen_smu(O) hid_playstation led_class_multicolor ff_memless loop nfnetlink lz4 lz4_compress zram dm_crypt amdgpu amdxcp drm_exec gpu_sched drm_buddy i2c_algo_bit rtsx_pci_sdmmc crct10dif_pclmul drm_suballoc_helper crc32_pclmul crc32c_intel drm_display_helper polyval_clmulni nvme polyval_generic mmc_core cec nvme_core ghash_clmulni_intel drm_ttm_helper video ucsi_acpi sha512_ssse3 ttm amd_sfh sha256_ssse3 sha1_ssse3 typec_ucsi rtsx_pci sp5100_tco typec nvme_auth wmi i2c_hid_acpi i2c_hid serio_raw hid_multitouch
[ 208.742651] v4l2loopback(O) videodev mc scsi_dh_rdac scsi_dh_emc scsi_dh_alua kvmfr(O) gcadapter_oc(O) fuse i2c_dev dm_multipath
[ 208.742663] Unloaded tainted modules: nct6687(O):2
[ 208.742669] CPU: 14 UID: 0 PID: 5234 Comm: kworker/u64:35 Tainted: P W O 6.11.9-303.bazzite.fc41.x86_64 #1
[ 208.742674] Tainted: [P]=PROPRIETARY_MODULE, [W]=WARN, [O]=OOT_MODULE
[ 208.742675] Hardware name: LENOVO 83E1/LNVNB161216, BIOS N3CN35WW 07/05/2024
[ 208.742677] Workqueue: events_unbound commit_work
[ 208.742684] RIP: 0010:link_enc_cfg_validate+0x33b/0x5c0 [amdgpu]
[ 208.743024] Code: 24 37 8b 44 24 28 44 8b 4c 24 20 44 0f b6 5c 24 18 48 8b 54 24 10 e9 a4 fe ff ff 0f b6 1c 24 45 89 f2 44 89 fa 49 89 e8 31 f6 <0f> 0b 49 8b 80 78 04 00 00 48 8b 40 10 48 8b 38 48 85 ff 0f 84 27
[ 208.743028] RSP: 0018:ffffa90fc7cc77b8 EFLAGS: 00010246
[ 208.743031] RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000001
[ 208.743032] RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffff91cb9477f000
[ 208.743034] RBP: ffff91cba8800000 R08: ffff91cba8800000 R09: 0000000000000000
[ 208.743036] R10: 0000000000000001 R11: 0000000000000031 R12: ffff91cb8ec18000
[ 208.743037] R13: 0000000000000001 R14: 0000000000000001 R15: 0000000000000000
[ 208.743039] FS: 0000000000000000(0000) GS:ffff91ce51100000(0000) knlGS:0000000000000000
[ 208.743041] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 208.743042] CR2: 00005616049cb280 CR3: 000000016b22c000 CR4: 0000000000f50ef0
[ 208.743044] PKRU: 55555554
[ 208.743046] Call Trace:
[ 208.743052] <TASK>
[ 208.743054] ? link_enc_cfg_validate+0x33b/0x5c0 [amdgpu]
[ 208.743352] ? __warn.cold+0x8e/0xe8
[ 208.743358] ? link_enc_cfg_validate+0x33b/0x5c0 [amdgpu]
[ 208.743662] ? report_bug+0xff/0x140
[ 208.743670] ? handle_bug+0x58/0x90
[ 208.743688] ? exc_invalid_op+0x17/0x70
[ 208.743691] ? asm_exc_invalid_op+0x1a/0x20
[ 208.743696] ? link_enc_cfg_validate+0x33b/0x5c0 [amdgpu]
[ 208.743978] ? link_enc_cfg_validate+0x27f/0x5c0 [amdgpu]
[ 208.744258] ? srso_alias_return_thunk+0x5/0xfbef5
[ 208.744265] link_enc_cfg_link_encs_assign+0x23f/0x8d0 [amdgpu]
[ 208.744552] ? srso_alias_return_thunk+0x5/0xfbef5
[ 208.744556] ? dcn314_validate_bandwidth+0x100/0x2d0 [amdgpu]
[ 208.744875] dc_validate_global_state+0x3a5/0x520 [amdgpu]
[ 208.745162] ? srso_alias_return_thunk+0x5/0xfbef5
[ 208.745167] dc_validate_with_context+0x78a/0xfa0 [amdgpu]
[ 208.745457] ? srso_alias_return_thunk+0x5/0xfbef5
[ 208.745461] ? __kmalloc_large_node_noprof+0x21/0xb0
[ 208.745468] dc_commit_streams+0x160/0x610 [amdgpu]
[ 208.745760] amdgpu_dm_atomic_commit_tail+0x6c5/0x4530 [amdgpu]
[ 208.746096] ? select_task_rq_fair+0x86c/0x2700
[ 208.746105] ? clear_state_bit+0xe1/0x160
[ 208.746108] ? __entry_text_end+0x101e46/0x101e49
[ 208.746113] ? sched_clock_cpu+0xf/0x1f0
[ 208.746117] ? srso_alias_return_thunk+0x5/0xfbef5
[ 208.746119] ? ttwu_queue_wakelist+0x11d/0x1a0
[ 208.746123] ? srso_alias_return_thunk+0x5/0xfbef5
[ 208.746125] ? __slab_free+0xdf/0x2e0
[ 208.746129] ? srso_alias_return_thunk+0x5/0xfbef5
[ 208.746131] ? dma_fence_default_wait+0x8c/0x260
[ 208.746136] ? srso_alias_return_thunk+0x5/0xfbef5
[ 208.746138] ? wait_for_completion_timeout+0x13b/0x170
[ 208.746142] ? srso_alias_return_thunk+0x5/0xfbef5
[ 208.746144] ? dma_fence_wait_timeout+0x108/0x140
[ 208.746150] commit_tail+0xac/0x160
[ 208.746156] process_one_work+0x176/0x330
[ 208.746161] worker_thread+0x252/0x390
[ 208.746165] ? __pfx_worker_thread+0x10/0x10
[ 208.746168] kthread+0xcf/0x100
[ 208.746172] ? __pfx_kthread+0x10/0x10
[ 208.746174] ret_from_fork+0x31/0x50
[ 208.746178] ? __pfx_kthread+0x10/0x10
[ 208.746180] ret_from_fork_asm+0x1a/0x30
[ 208.746187] </TASK>
[ 208.746189] ---[ end trace 0000000000000000 ]---
[ 208.746514] amdgpu 0000:c2:00.0: [drm] *ERROR* link_enc_cfg_validate: Invalid link encoder assignments - 0x17
[ 209.264249] amdgpu 0000:c2:00.0: [drm] enabling link 0 failed: 15
Need to test more games. GTA IV on an ally X hibernates just fine. We will probably need a benchmark for the dev setup fixing this. If it is worth fixing.
Log files (for system lockups / game freezes / crashes)
Dmesg log of the crash: hibernation-fail.log
Edited by Antheas Kapenekakis