[amdgpu]: random freezes with flip_done timed out on kernel 6.6.0
Brief summary of the problem:
The system randomly freezes (cursor might still move, though it might also get stuck for a while) when using some newer kernel than 6.1.46 and I have noticed it happening most frequently while using CLion (once in roughly ~2h).
This is the part of the kernel log where it happens:
Oct 30 19:04:48 gentoo kernel: amdgpu 0000:03:00.0: [drm] *ERROR* [CRTC:91:crtc-0] flip_done timed out
Oct 30 19:05:17 gentoo kernel: amdgpu 0000:03:00.0: [drm] *ERROR* flip_done timed out
Oct 30 19:05:17 gentoo kernel: amdgpu 0000:03:00.0: [drm] *ERROR* [CRTC:91:crtc-0] commit wait timed out
Oct 30 19:05:27 gentoo kernel: amdgpu 0000:03:00.0: [drm] *ERROR* flip_done timed out
Oct 30 19:05:27 gentoo kernel: amdgpu 0000:03:00.0: [drm] *ERROR* [PLANE:70:plane-5] commit wait timed out
Oct 30 19:05:49 gentoo kernel: ------------[ cut here ]------------
Oct 30 19:05:49 gentoo kernel: WARNING: CPU: 1 PID: 2339 at drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:8278 amdgpu_dm_atomic_commit_tail+0x254d/0x29d0
Oct 30 19:05:49 gentoo kernel: Modules linked in:
Oct 30 19:05:49 gentoo kernel: CPU: 1 PID: 2339 Comm: X Tainted: G W 6.6.0-gentoo #2
Oct 30 19:05:49 gentoo kernel: Hardware name: Micro-Star International Co., Ltd. MS-7D25/PRO Z690-A DDR4(MS-7D25), BIOS 1.C0 05/16/2023
Oct 30 19:05:49 gentoo kernel: RIP: 0010:amdgpu_dm_atomic_commit_tail+0x254d/0x29d0
Oct 30 19:05:49 gentoo kernel: Code: 85 20 ff ff ff 48 8b 84 24 b0 00 00 00 48 2b 81 f0 02 00 00 48 3d 01 65 cd 1d 0f 82 05 ff ff ff e8 88 b0 00 00 e9 fb fe ff ff <0f> 0b e9 4d fb ff ff 0f 0b e9 64 fb ff ff c7 44 24 54 00 00 00 00
Oct 30 19:05:49 gentoo kernel: RSP: 0018:ffffa2cf04b93a00 EFLAGS: 00010002
Oct 30 19:05:49 gentoo kernel: RAX: 0000000000000286 RBX: ffff889888c5c000 RCX: 0000000000000001
Oct 30 19:05:49 gentoo kernel: RDX: 0000000000000007 RSI: ffff889885f69800 RDI: ffff889884380178
Oct 30 19:05:49 gentoo kernel: RBP: ffff88991d0bd580 R08: ffffa2cf04b93954 R09: 0000000000000000
Oct 30 19:05:49 gentoo kernel: R10: ffffa2cf04b9394c R11: 0000000000000003 R12: ffff889885f69800
Oct 30 19:05:49 gentoo kernel: R13: ffffa2cf04b93b38 R14: ffff88996f109e00 R15: 0000000000000001
Oct 30 19:05:49 gentoo kernel: FS: 00007fb30b1d58c0(0000) GS:ffff889fdf440000(0000) knlGS:0000000000000000
Oct 30 19:05:49 gentoo kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Oct 30 19:05:49 gentoo kernel: CR2: 00007f2b731ff088 CR3: 00000001127aa000 CR4: 0000000000750ee0
Oct 30 19:05:49 gentoo kernel: PKRU: 55555554
Oct 30 19:05:49 gentoo kernel: Call Trace:
Oct 30 19:05:49 gentoo kernel: <TASK>
Oct 30 19:05:49 gentoo kernel: ? __warn+0xaf/0x140
Oct 30 19:05:49 gentoo kernel: ? amdgpu_dm_atomic_commit_tail+0x254d/0x29d0
Oct 30 19:05:49 gentoo kernel: ? report_bug+0x165/0x200
Oct 30 19:05:49 gentoo kernel: ? handle_bug+0x3d/0x70
Oct 30 19:05:49 gentoo kernel: ? exc_invalid_op+0x16/0x40
Oct 30 19:05:49 gentoo kernel: ? asm_exc_invalid_op+0x16/0x20
Oct 30 19:05:49 gentoo kernel: ? amdgpu_dm_atomic_commit_tail+0x254d/0x29d0
Oct 30 19:05:49 gentoo kernel: ? optc1_get_crtc_scanoutpos+0xb5/0xd0
Oct 30 19:05:49 gentoo kernel: commit_tail+0x8d/0x170
Oct 30 19:05:49 gentoo kernel: drm_atomic_helper_commit+0x26a/0x280
Oct 30 19:05:49 gentoo kernel: drm_atomic_commit+0x8b/0xa0
Oct 30 19:05:49 gentoo kernel: ? __drm_printfn_seq_file+0x20/0x20
Oct 30 19:05:49 gentoo kernel: drm_mode_obj_set_property_ioctl+0x11f/0x350
Oct 30 19:05:49 gentoo kernel: ? drm_mode_obj_find_prop_id+0x30/0x30
Oct 30 19:05:49 gentoo kernel: drm_ioctl_kernel+0xb3/0x110
Oct 30 19:05:49 gentoo kernel: drm_ioctl+0x25a/0x3b0
Oct 30 19:05:49 gentoo kernel: ? drm_mode_obj_find_prop_id+0x30/0x30
Oct 30 19:05:49 gentoo kernel: ? vfs_writev+0xf5/0x150
Oct 30 19:05:49 gentoo kernel: ? do_setitimer+0x18b/0x1a0
Oct 30 19:05:49 gentoo kernel: amdgpu_drm_ioctl+0x3c/0x70
Oct 30 19:05:49 gentoo kernel: __x64_sys_ioctl+0x5b/0xa0
Oct 30 19:05:49 gentoo kernel: do_syscall_64+0x3d/0x90
Oct 30 19:05:49 gentoo kernel: ? exit_to_user_mode_prepare+0x5c/0x80
Oct 30 19:05:49 gentoo kernel: entry_SYSCALL_64_after_hwframe+0x46/0xb0
Oct 30 19:05:49 gentoo kernel: RIP: 0033:0x7fb30b48ac6b
Oct 30 19:05:49 gentoo kernel: Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <3d> 00 f0 ff ff 89 c2 77 1c 48 8b 44 24 18 64 48 2b 04 25 28 00 00
Oct 30 19:05:49 gentoo kernel: RSP: 002b:00007ffc7d7f8550 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
Oct 30 19:05:49 gentoo kernel: RAX: ffffffffffffffda RBX: 000000000000000c RCX: 00007fb30b48ac6b
Oct 30 19:05:49 gentoo kernel: RDX: 00007ffc7d7f85b0 RSI: 00000000c01864ba RDI: 000000000000000c
Oct 30 19:05:49 gentoo kernel: RBP: 0000000000000002 R08: 000000000000009f R09: 0000000000001000
Oct 30 19:05:49 gentoo kernel: R10: 0000000000001000 R11: 0000000000000246 R12: 0000000000000000
Oct 30 19:05:49 gentoo kernel: R13: 0000559a127fe770 R14: 0000559a13a47d30 R15: 0000000000000000
Oct 30 19:05:49 gentoo kernel: </TASK>
Oct 30 19:05:49 gentoo kernel: ---[ end trace 0000000000000000 ]---
Oct 30 19:05:49 gentoo kernel: ------------[ cut here ]------------
Oct 30 19:05:49 gentoo kernel: WARNING: CPU: 1 PID: 2339 at drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:7816 amdgpu_dm_atomic_commit_tail+0x2554/0x29d0
Oct 30 19:05:49 gentoo kernel: Modules linked in:
Oct 30 19:05:49 gentoo kernel: CPU: 1 PID: 2339 Comm: X Tainted: G W 6.6.0-gentoo #2
Oct 30 19:05:49 gentoo kernel: Hardware name: Micro-Star International Co., Ltd. MS-7D25/PRO Z690-A DDR4(MS-7D25), BIOS 1.C0 05/16/2023
Oct 30 19:05:49 gentoo kernel: RIP: 0010:amdgpu_dm_atomic_commit_tail+0x2554/0x29d0
Oct 30 19:05:49 gentoo kernel: Code: 84 24 b0 00 00 00 48 2b 81 f0 02 00 00 48 3d 01 65 cd 1d 0f 82 05 ff ff ff e8 88 b0 00 00 e9 fb fe ff ff 0f 0b e9 4d fb ff ff <0f> 0b e9 64 fb ff ff c7 44 24 54 00 00 00 00 83 7d 28 00 0f 8e fb
Oct 30 19:05:49 gentoo kernel: RSP: 0018:ffffa2cf04b93a00 EFLAGS: 00010082
Oct 30 19:05:49 gentoo kernel: RAX: 0000000000000286 RBX: ffff889888c5c000 RCX: ffff889884380010
Oct 30 19:05:49 gentoo kernel: RDX: 0000000000000007 RSI: ffff889885f69800 RDI: ffff889884380178
Oct 30 19:05:49 gentoo kernel: RBP: ffff88991d0bd580 R08: ffffa2cf04b93954 R09: 0000000000000000
Oct 30 19:05:49 gentoo kernel: R10: ffffa2cf04b9394c R11: 0000000000000003 R12: ffff889885f69800
Oct 30 19:05:49 gentoo kernel: R13: ffffa2cf04b93b38 R14: ffff88996f109e00 R15: 0000000000000001
Oct 30 19:05:49 gentoo kernel: FS: 00007fb30b1d58c0(0000) GS:ffff889fdf440000(0000) knlGS:0000000000000000
Oct 30 19:05:49 gentoo kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Oct 30 19:05:49 gentoo kernel: CR2: 00007f2b731ff088 CR3: 00000001127aa000 CR4: 0000000000750ee0
Oct 30 19:05:49 gentoo kernel: PKRU: 55555554
Oct 30 19:05:49 gentoo kernel: Call Trace:
Oct 30 19:05:49 gentoo kernel: <TASK>
Oct 30 19:05:49 gentoo kernel: ? __warn+0xaf/0x140
Oct 30 19:05:49 gentoo kernel: ? amdgpu_dm_atomic_commit_tail+0x2554/0x29d0
Oct 30 19:05:49 gentoo kernel: ? report_bug+0x165/0x200
Oct 30 19:05:49 gentoo kernel: ? handle_bug+0x3d/0x70
Oct 30 19:05:49 gentoo kernel: ? exc_invalid_op+0x16/0x40
Oct 30 19:05:49 gentoo kernel: ? asm_exc_invalid_op+0x16/0x20
Oct 30 19:05:49 gentoo kernel: ? amdgpu_dm_atomic_commit_tail+0x2554/0x29d0
Oct 30 19:05:49 gentoo kernel: ? optc1_get_crtc_scanoutpos+0xb5/0xd0
Oct 30 19:05:49 gentoo kernel: commit_tail+0x8d/0x170
Oct 30 19:05:49 gentoo kernel: drm_atomic_helper_commit+0x26a/0x280
Oct 30 19:05:49 gentoo kernel: drm_atomic_commit+0x8b/0xa0
Oct 30 19:05:49 gentoo kernel: ? __drm_printfn_seq_file+0x20/0x20
Oct 30 19:05:49 gentoo kernel: drm_mode_obj_set_property_ioctl+0x11f/0x350
Oct 30 19:05:49 gentoo kernel: ? drm_mode_obj_find_prop_id+0x30/0x30
Oct 30 19:05:49 gentoo kernel: drm_ioctl_kernel+0xb3/0x110
Oct 30 19:05:49 gentoo kernel: drm_ioctl+0x25a/0x3b0
Oct 30 19:05:49 gentoo kernel: ? drm_mode_obj_find_prop_id+0x30/0x30
Oct 30 19:05:49 gentoo kernel: ? vfs_writev+0xf5/0x150
Oct 30 19:05:49 gentoo kernel: ? do_setitimer+0x18b/0x1a0
Oct 30 19:05:49 gentoo kernel: amdgpu_drm_ioctl+0x3c/0x70
Oct 30 19:05:49 gentoo kernel: __x64_sys_ioctl+0x5b/0xa0
Oct 30 19:05:49 gentoo kernel: do_syscall_64+0x3d/0x90
Oct 30 19:05:49 gentoo kernel: ? exit_to_user_mode_prepare+0x5c/0x80
Oct 30 19:05:49 gentoo kernel: entry_SYSCALL_64_after_hwframe+0x46/0xb0
Oct 30 19:05:49 gentoo kernel: RIP: 0033:0x7fb30b48ac6b
Oct 30 19:05:49 gentoo kernel: Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <3d> 00 f0 ff ff 89 c2 77 1c 48 8b 44 24 18 64 48 2b 04 25 28 00 00
Oct 30 19:05:49 gentoo kernel: RSP: 002b:00007ffc7d7f8550 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
Oct 30 19:05:49 gentoo kernel: RAX: ffffffffffffffda RBX: 000000000000000c RCX: 00007fb30b48ac6b
Oct 30 19:05:49 gentoo kernel: RDX: 00007ffc7d7f85b0 RSI: 00000000c01864ba RDI: 000000000000000c
Oct 30 19:05:49 gentoo kernel: RBP: 0000000000000002 R08: 000000000000009f R09: 0000000000001000
Oct 30 19:05:49 gentoo kernel: R10: 0000000000001000 R11: 0000000000000246 R12: 0000000000000000
Oct 30 19:05:49 gentoo kernel: R13: 0000559a127fe770 R14: 0000559a13a47d30 R15: 0000000000000000
Oct 30 19:05:49 gentoo kernel: </TASK>
Oct 30 19:05:49 gentoo kernel: ---[ end trace 0000000000000000 ]---
Oct 30 19:05:59 gentoo kernel: amdgpu 0000:03:00.0: [drm] *ERROR* [CRTC:91:crtc-0] flip_done timed out
Hardware description:
- CPU: Intel I5-13600k
- GPU: AMD Radeon RX 6800 XT
- System Memory: 32gb ddr4
- Display(s): One 1080p monitor
- Type of Display Connection: DP
System information:
- Distro name and Version: Gentoo latest
- Kernel version: 6.6.0 (I also remember it happening on some 6.5.x versions, I haven't tried the other versions)
- Linux firmware: 20230919
- VariableRefresh set to "true" in xorg.conf
Attached files:
Log files (for system lockups / game freezes / crashes)
- Dmesg log (full log) kern.log
- Xorg log Xorg.0.log.old
- Any other log
Edited by Qwinci