Bug 499036 - KWin freezes, then crashes when running Vulkan applcation on AMD GPU
Summary: KWin freezes, then crashes when running Vulkan applcation on AMD GPU
Status: RESOLVED DUPLICATE of bug 497180
Alias: None
Product: kwin
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 6.2.5
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2025-01-23 04:16 UTC by cyrozap
Modified: 2025-01-23 15:51 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report: https://crash-reports.kde.org/organizations/kde/issues/4603/events/51709e228a3d4dc0a652a23383dac885/


Attachments
New crash information added by DrKonqi (140.49 KB, text/plain)
2025-01-23 04:16 UTC, cyrozap
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cyrozap 2025-01-23 04:16:40 UTC
Application: kwin_wayland (6.2.5)

ApplicationNotResponding [ANR]: false
Qt Version: 6.8.1
Frameworks Version: 6.10.0
Operating System: Linux 6.12.10-arch1-1 x86_64
Windowing System: Wayland
Distribution: "Arch Linux"
DrKonqi: 6.2.5 [CoredumpBackend]

-- Information about the crash:
For the past several months (since about October/November last year), whenever I try to play Baldur's Gate 3 (version 4.1.1.6072089) using its Vulkan backend on my AMD laptop, my whole session freezes. The same issue occurs when I play with using the game's DX11 backend on DXVK (DirectX on Vulkan). The issue does not occur when I play using DX11 on WineD3D (DirectX on OpenGL), but this halves the framerate.

When the issue occurs, the only way I've found to unfreeze my system is to close the lid of the laptop to lock the screen, open the lid again, wait for KWin to crash, then wait for the login screen to appear so I can log back in.

The kernel log has some messages that might be relevant:

```
[  487.492119] amdgpu 0000:c4:00.0: [drm] *ERROR* flip_done timed out
[  487.492129] amdgpu 0000:c4:00.0: [drm] *ERROR* [CRTC:79:crtc-0] commit wait timed out
[  497.518713] amdgpu 0000:c4:00.0: [drm] *ERROR* flip_done timed out
[  497.518722] amdgpu 0000:c4:00.0: [drm] *ERROR* [PLANE:58:plane-3] commit wait timed out
```

Please let me know if you need any more information.

The crash can be reproduced every time.

-- Backtrace (Reduced):
#5  KWin::DrmGpu::presentationClock (this=0x89c00) at /usr/src/debug/kwin/kwin-6.2.5/src/backends/drm/drm_gpu.cpp:138
#6  KWin::DrmGpu::pageFlipHandler (fd=19, sequence=29289, sec=518, usec=573246, crtc_id=79, user_data=0x7a2bb8006dc0) at /usr/src/debug/kwin/kwin-6.2.5/src/backends/drm/drm_gpu.cpp:572
#7  0x00007a2c09277f30 in drmHandleEvent (fd=19, evctx=0x7ffe0fdc2250) at ../libdrm-2.4.124/xf86drmMode.c:1070
#8  0x00007a2c0c6190ad in KWin::DrmGpu::dispatchEvents (this=<optimized out>) at /usr/src/debug/kwin/kwin-6.2.5/src/backends/drm/drm_gpu.cpp:587
#9  0x00007a2c09bb1b29 in QtPrivate::QSlotObjectBase::call (this=<optimized out>, r=<optimized out>, a=<optimized out>, this=<optimized out>, r=<optimized out>, a=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobjectdefs_impl.h:486


Reported using DrKonqi
Comment 1 cyrozap 2025-01-23 04:16:42 UTC
Created attachment 177607 [details]
New crash information added by DrKonqi

DrKonqi auto-attaching complete backtrace.
Comment 2 cyrozap 2025-01-23 04:48:40 UTC
Looking at some other issues, this may be related to bug 496015 or bug 494044. But in this instance, my system is never going to sleep--it's just blanking and locking the screen. Also, this issue *only* occurs when I try to run that Vulkan application--at all other times, blanking or locking the screen or suspending and resuming the system won't trigger the freeze or the segfault.
Comment 3 Nate Graham 2025-01-23 15:51:27 UTC

*** This bug has been marked as a duplicate of bug 497180 ***