protonscr

[BUG] Starting SteamVR Crashes KWin

steamvrclosed bug
ValveSoftware/SteamVR-for-Linux#747 · opened 2024-10-26 by Flimsy-Fox · updated 2024-11-08 · 6 comments · github
FFlimsy-Fox 2024-10-26 github

Describe the bug
Starting SteamVR blanks my monitor and crashes KWin. Started after one of the updates made to my system recently (or so I suspect) and before SteamVR 2.8 release. Interestingly, SteamVR without connection to my headset does not crash anything.

To Reproduce
Steps to reproduce the behavior:

  1. Open Steam
  2. Start SteamVR
  3. KWin crash

Expected behavior
SteamVR does not crash my GUI

System Information (please complete the following information):
Please use the latest Steam beta client and SteamVR beta for your bug reports!

  • Steam client version (build number or date): 1726604483

  • SteamVR version: 2.8

  • Distribution (e.g. Ubuntu): Arch Linux

  • Steam runtime diagnostics: Gist

  • Steam and SteamVR logs: steam-logs.tar.gz

  • Minidumps: steam-minidumps.tar.gz

Screenshots
Doubt I could capture footage, as I don't have a capture card.

Additional context
My system is able to automatically recover after each crash. Similar to #586. I have checked journalctl. I do see coredumps from kwin_wayland, vrwebhelper, Main Thread, vrcompositor, and AppRun. I do not see any of the error messages like here.

FFlimsy-Fox 2024-10-26 github

After some investigation, this is in fact a duplicate of #586. I suspect downgrading my kernel is the hotfix.

FFlimsy-Fox 2024-10-28 github

Reopening this issue, as downgrading my kernel did not resolve the issue. I also looked at closer at my journalctl logs and realized I was looking in the wrong spot. Here are the journalctl logs surrounding the crash:
steamvr-journalctl-crash.txt

FFlimsy-Fox 2024-10-28 github

This issue with LLVM seems to suggest that one of the errors in my logs can be fixed by downgrading until 19 series comes out. Here's the error I had (included in the previous log I submitted): kwin_wayland_wrapper[10132]: /usr/include/c++/14.2.1/bits/stl_vector.h:1213: constexpr std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::front() [with _Tp = std::unique_ptr<KWin::DrmAtomicCommit>; _Alloc = std::allocator<std::unique_ptr<KWin::DrmAtomicCommit> >; reference = std::unique_ptr<KWin::DrmAtomicCommit>&]: Assertion '!this->empty()' failed.

After downgrading LLVM by installing clang17 from the AUR and uninstalling clang with pacman -Rsdd clang (NOT recommended), this crashing issue persisted with the same journalctl logs as before.

FFlimsy-Fox 2024-10-30 github

Disabling "Adaptive sync" in my monitor settings seems to be the hotfix so far. I'm however leaving this issue open as I do not know who should fix this.

Ccaseif 2024-11-02 github

I'm experiencing this same crash (in DrmCommitThread::submit) as well on Fedora 41. Disabling adaptive sync in Plasma resolves the issue as @Flimsy-Fox suggested (ty!), but it seems like there are still issues with frame submission resulting in a stuttering effect and windows freezing until another window is focused.

Edit: It looks like this has already been addressed in KWin for the upcoming 6.2.3 release in a few days. I don't have time right now to build from source to determine if this fixes the stuttering issue but I suspect it probably won't.

Edit 2: The stuttering/freezing seems to be a known issue as well and is a regression in KWin 6.2.2.

FFlimsy-Fox 2024-11-08 github

I'm experiencing this same crash (in DrmCommitThread::submit) as well on Fedora 41. Disabling adaptive sync in Plasma resolves the issue as @Flimsy-Fox suggested (ty!), but it seems like there are still issues with frame submission resulting in a stuttering effect and windows freezing until another window is focused.

Edit: It looks like this has already been addressed in KWin for the upcoming 6.2.3 release in a few days. I don't have time right now to build from source to determine if this fixes the stuttering issue but I suspect it probably won't.

Edit 2: The stuttering/freezing seems to be a known issue as well and is a regression in KWin 6.2.2.

I can confirm that the KWin 6.2.3 update has fixed this issue when it was brought into stable on Arch. I can now have "Adaptive sync" enabled on my monitor while SteamVR is running.

For reference, here are my journalctl logs surrounding starting and stopping SteamVR:
steamvr-journalctl-fixed.txt

Nothing extracted yet.