Bug 489534 - "Xwayland has crashed" when playing games
Summary: "Xwayland has crashed" when playing games
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: generic-crash (show other bugs)
Version: 6.1.1
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-01 08:17 UTC by Virkkunen
Modified: 2024-07-01 12:48 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
dump automatically generated after the crash (186.16 KB, application/vnd.tcpdump.pcap)
2024-07-01 08:17 UTC, Virkkunen
Details
dump automatically generated after the crash (186.74 KB, application/vnd.tcpdump.pcap)
2024-07-01 09:45 UTC, Virkkunen
Details
dump automatically generated after the crash (186.38 KB, application/vnd.tcpdump.pcap)
2024-07-01 09:45 UTC, Virkkunen
Details
dump automatically generated after the crash (186.75 KB, application/vnd.tcpdump.pcap)
2024-07-01 09:46 UTC, Virkkunen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Virkkunen 2024-07-01 08:17:52 UTC
Created attachment 171224 [details]
dump automatically generated after the crash

***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY

When playing games over Steam, Xwayland will crash after a while, closing Steam and the game immediately. 

STEPS TO REPRODUCE
1. Run a game from Steam
2. Wait

OBSERVED RESULT
Game and Steam will close after a while, and a notification saying "Xwayland has crashed"

EXPECTED RESULT
Xwayland not to crash and everything running smoothly

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Linux endeavour 6.9.7-1-cachyos #1 SMP PREEMPT_DYNAMIC Mon, 01 Jul 2024 06:45:01 +0000 x86_64 GNU/Linux
KDE Plasma Version: 6.1.1
KDE Frameworks Version:  6.3.0
Qt Version:  6.8.0

ADDITIONAL INFORMATION
nvidia-dkms Version: 555.58-2
GPU: NVIDIA RTX 3080 LHR
/etc/kernel/cmdline: nvidia-drm.fbdev=1 nvidia-drm.modeset=1 nvidia.NVreg_EnableGpuFirmware=0

Very rarely, when Steam is closed to the tray, it'll crash after a few minutes. Most of the times it happens when playing a game and a lot is going on. I have noticed that my GPU usage goes to 100% frequently, while on Windows it never goes beyond 99%.
Comment 1 Virkkunen 2024-07-01 09:45:00 UTC
Created attachment 171229 [details]
dump automatically generated after the crash

Ran mangohud along the game to see if it had any effect on crashing.
Comment 2 Virkkunen 2024-07-01 09:45:58 UTC
Created attachment 171230 [details]
dump automatically generated after the crash

A MainThrd process was still running after a crash, using around 6GB of RAM. I forced closed it and a dumb was generated.
Comment 3 Virkkunen 2024-07-01 09:46:50 UTC
Created attachment 171231 [details]
dump automatically generated after the crash

Ran a game using gamescope and gamemoderun (without mangohud) to see if it had any difference. I suspected mangohud was to blame, but it doesn't seem to be the case.
Comment 4 Virkkunen 2024-07-01 10:01:57 UTC
After the latest crash, while trying to copy the dump I dragged a window and my whole system froze. I have an external system monitor that was still running (it uses turing-smart-screen-python on a systemd service), showing high GPU usage (60%+). I couldn't do anything other than reboot. Running dmesg, I found the following:

[  383.191854] gldriverquery[3253]: segfault at 0 ip 00007464e60cf27f sp 00007fffdf4467e0 error 4 in libxcb.so.1.1.0[7464e60c7000+14000] likely on CPU 22 (core 12, socket 0)
[  383.191865] Code: 00 eb a0 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 41 57 41 56 41 55 45 89 c5 41 54 55 4c 89 cd 53 48 83 ec 78 48 8b 19 89 74 24 1c <8b> 37 48 89 4c 24 08 64 48 8b 04 25 28 00 00 00 48 89 44 24 68 31
[  384.017771] gldriverquery[3494]: segfault at 0 ip 00000000e922a341 sp 00000000ffeeccf0 error 4 in libxcb.so.1.1.0[e9221000+17000] likely on CPU 13 (core 1, socket 0)
[  384.017780] Code: 71 0c 8b 19 89 45 a0 8b 41 08 89 75 b4 89 45 a4 8b 41 10 89 45 b8 8b 41 14 89 45 c0 65 a1 14 00 00 00 89 45 e4 8b 06 89 45 b0 <8b> 03 85 c0 0f 85 cb 05 00 00 8b 45 a4 85 c0 0f 84 a2 07 00 00 8b
Comment 5 Zamundaaa 2024-07-01 12:48:29 UTC
Please report this to https://gitlab.freedesktop.org/xorg/xserver/-/issues