ValveSoftware / SteamVR-for-Linux

Issue tracker for the Linux port of SteamVR
919 stars 45 forks source link

Half Life Alyx repeated, location based steamvr crash #318

Open DreamingRaven opened 4 years ago

DreamingRaven commented 4 years ago

Describe the bug In city 17, after opening the combine gate, the area behind the first opened door causes steamvr beta and standard steamvr to crash, killing the headset (screen off, and reset to blue state), and then subsequently the game.

To Reproduce Steps to reproduce the behavior:

  1. Go to and open the first combine gate in the first zone after the first train
  2. Open the following door
  3. Head across/ into the room behind this now opened door
  4. Headset freeze, pause, headset reset.

Expected behavior Continued operation, allowing motion across the room, and to be able to continue the rest of the game.

System Information (please complete the following information):

Screenshots This image is the last thing rendered before steamvr crashes every time, in the exact same location. image

Additional context here is the core dump in journalctl that is given. https://gist.github.com/DreamingRaven/5b88bc0f192b285a679fcf86e4b99ec6 Teminal output at the point of failure:

shaders/vulkan/linepixelsim_cs.spv
shaders/vulkan/linepixelsim2_cs.spv
shaders/vulkan/testgrid_cs.spv
shaders/vulkan/motionvector_cost_cs.spv
c:\buildslave\steam_main_win64\build\src\common\video\videoplayer.cpp (235) : Assertion Failed: !m_strURL.IsEmpty() || m_bufFromMemory.TellPut() > 0
crash_20200323235434_1.dmp[6502]: Uploading dump (out-of-process)
/tmp/dumps/crash_20200323235434_1.dmp
crash_20200323235434_1.dmp[6502]: Finished uploading minidump (out-of-process): success = yes
crash_20200323235434_1.dmp[6502]: response: CrashID=bp-78fe6ebf-6e45-4e87-88ea-8212a2200323
crash_20200323235434_1.dmp[6502]: file ''/tmp/dumps/crash_20200323235434_1.dmp'', upload yes: ''CrashID=bp-78fe6ebf-6e45-4e87-88ea-8212a2200323''
Warning: The game hasn't rendered a frame from us in over 10 seconds
Warning: The game hasn't rendered a frame from us in over 10 seconds

Note: Commenters who are also experiencing this issue are encouraged to include the "System Information" section in their replies.

CarloWood commented 4 years ago

Unless you are that friend, a friend of me also ran into this ;). Are you? :). PS I didn't reach this point yet,.. The frame rate is too low to enjoy the game :( .. and that while I bought an RTX 2080 Super for this.

DreamingRaven commented 4 years ago

Unless you are that friend, a friend of me also ran into this ;). Are you? :). PS I didn't reach this point yet,.. The frame rate is too low to enjoy the game :( .. and that while I bought an RTX 2080 Super for this.

Fraid not @CarloWood . However im surprised you have an FPS issue with a RTX 2080 super, im running with a 2070 and its pretty smooth for the most part with minor head turn stutter, and this weird steamvr crash.

llamasking commented 4 years ago

From my understanding of the situation, there appears to be a memory leak in Alyx when ran with Proton that causes your vram to get filled up regardless of how powerful your system is. Then, when the game tries to load something new, it somehow manages to cause SteamVR, and by extension, itself, to crash.

https://github.com/ValveSoftware/Proton/issues/3681

I found that saving immediately before entering a loading menu then restarting the game generally manages to be fast enough to evade a crash.

Head stuttering seems to be rather common and I experienced it during the early stages of the game myself. It does seem to stabilize later on though. As of current, apart from the loading issue, the game runs well enough to be very much playable.

System Info:

OS: Arch Linux x86_64 Kernel: 5.5.11-zen1-1-zen GPU: GTX 980 running 440.64 SteamVR: Version 1.10.32 (1584924836) HMD: Vive

DreamingRaven commented 4 years ago

I tried your workaround, and thus far it is working to let me get through the loading screens as you said it might. Thanks, at-least I can continue playing somewhat (to experience the fear, the evil devs! :D).

mnn commented 4 years ago

The frame rate is too low to enjoy the game :( .. and that while I bought an RTX 2080 Super for this.

However im surprised you have an FPS issue with a RTX 2080 super, im running with a 2070 and its pretty smooth for the most part with minor head turn stutter

I have 2080ti and it's also unplayable. Even on lowest details average FPS is barely enough for 120Hz and what's worse, FPS drops frequently (I guess few times a minute). :frowning_face: After first crash in the train, I stopped playing, the stuttering was making me sick.

Zamundaaa commented 4 years ago

Reduce the resolution. It's the only way to have a fluid experience. I put it down to 40% at 90Hz on my 5700 XT and everything's smooth until the VRAM fills or a loading screen crashes. It's quite disappointing that it runs so badly but I imagine the native Vulkan version will be much better.

Edit: there goes that... next section, horrible lag spikes despite setting the resolution even lower.

rstrube commented 4 years ago

I can also confirm that I get a consistent crash after boarding the first train (during a loading transition). Other than this the game is running really well for me. I have a relatively moderate machine (Ryzen 3600 + RTX 2070) and the performance has been really good!

rstrube commented 4 years ago

Unless you are that friend, a friend of me also ran into this ;). Are you? :). PS I didn't reach this point yet,.. The frame rate is too low to enjoy the game :( .. and that while I bought an RTX 2080 Super for this.

Fraid not @CarloWood . However im surprised you have an FPS issue with a RTX 2080 super, im running with a 2070 and its pretty smooth for the most part with minor head turn stutter, and this weird steamvr crash.

I'm also running on o 2070 and my experience has also been positive. Perhaps try lowering the refresh rate to 90?

edwin-v commented 4 years ago

Not having any big performance issues here either (2080 Ti). I did lower my screen to 80 Hz and I assume it picked up my default for Legacy reprojection. Mostly smooth and only rarely dropping a frame. Aside from the shader compile stutters, which can only be solved by waiting for a complete pre-compiled shader download. Then I crashed again after getting the Italian achievement.

ZarathustraDK commented 4 years ago

On a 2080TI and Ryzen 3900X here. Getting both the stutters and the level-transition crash. Tried setting the refresh from 144Hz to 90Hz, same deal. Turned off advanced supersampling, same deal. Haven't tried on SteamVR beta yet, gonna give that a go tomorrow. Running through Entanglement back to back but hey, at least it's pretty :)

Heavy stutters always happen:

kisak-valve commented 4 years ago

Hello, please opt into SteamVR's beta and retest (https://steamcommunity.com/games/250820/announcements/detail/2100307193365803538).

llamasking commented 4 years ago

Just tested the latest SteamVR Beta. Alyx no longer immediately fills my gpu memory but it does eventually fill up. I am not surprised about that since I have a 980, which only has 4GB of memory.

After beating that dark part of chapter 3, the loading screen after the door still causes my game and SteamVR to crash. I am also still barely reaching 90fps looking at the performance graph.

Luckily, loading a save and immediately jumping into the loading screen still evades a crash.

Latest update to Alyx does not change anything from the looks of it.

rstrube commented 4 years ago

Firstly, thanks for all the efforts supporting Linux!

Unfortunately, the latest Steam VR beta update and the Alyx game update doesn't resolve the crashing during the loading transition between levels for me. I've also noticed a crash when attempting to load a auto save checkpoint after dying, and when attempting to quit to the main menu.

I've been using the trick of saving directly before a level transition, quiting the game, restarting and the loading the save. This has allowed me to progress through this phenomenal game.

I have an RTX 2070 with 8GB VRAM, I will report back with better logs and and system information later.

Thanks!

DerRidda commented 4 years ago

I am also still seeing vrcompositor crashes when loading.

ZarathustraDK commented 4 years ago

Opted into the beta. Same as before, heavy stutter in specific places and crash after entering the train. Gist: https://gist.github.com/ZarathustraDK/901c29aa935f4545f03e2da1d3bbf379 Waiting a bit after crash I get this error, which is strange because I'm fully up-to-date at 1.11.1 error

Any particular logs needed? I'll need to know which and where.

Edit: Here's a proton.log from a crash at a level-transition (the train). steam-546560.log

Edit 2 (SLIGHT SPOILER AHEAD): I also get the crash if I'm far enough into a chapter, save the game and then reload the save without exiting the game. Here's a proton-log where I saved just before entering the vort's place then tried to reload it: steam-546560.log

DerRidda commented 4 years ago

I think similar behaviour to that of Alyx crashing on load can be seen in other games. Compound (615120) for example also gets progressively more choppy the more loading screens there are.

It's actually a very good example because for VR it's very low on resources and loads maps that are of very similar visual complexity as long as you are progressive within the same "theme". Yet the performance keeps degrading with every new map.

ZarathustraDK commented 4 years ago

I think similar behaviour to that of Alyx crashing on load can be seen in other games. Compound (615120) for example also gets progressively more choppy the more loading screens there are.

It doesn't really get progressively more choppy for me (Well I stopped progressing at chapter 3 waiting for a fix), it's more like it always get choppy at particular points whether or not you just loaded in prior to that point. The crashing-bug feels more like something in the game goes "Oh, I see you've loaded this much into vRAM, I'll let you play smoothly for now, but next level-transition I'll crash your HMD".

It's actually a very good example because for VR it's very low on resources and loads maps that are of very similar visual complexity as long as you are progressive within the same "theme". Yet the performance keeps degrading with every new map.

Yeah, there's a painfully obvious shader-compiling-stutter when you open up the quarantine zone and the scenery goes from City 17 to Xen-like biome.

rstrube commented 4 years ago

Hi everyone, So there's a couple things that I've noticed that I think might shed some light on the problem.

If I set my texture quality down from High to Medium, I can play longer before the crashes occur. Today I was able to get through a couple loading screens, but then on the third the game crashed. This does seem to support the theory that the GPU VRAM just fills up and eventually the game crashes - lowering the texture quality just gives you more time before this occurs.

I'd also like to share some logs:

vrserver.txt vrmonitor.txt vrcompositor.txt

The key line in the vrcompositor.txt file that I noticed was:

Sun Mar 29 2020 11:47:06.981780 - CVulkanVRRenderer::CreateTexture - Unable to allocate memory
ZarathustraDK commented 4 years ago

My logs are pretty much identical to yours @rstrube vrserver.txt vrmonitor.txt vrcompositor.txt

I wonder if it is related to this https://www.gitmemory.com/issue/doitsujin/dxvk/1100/508604155

llamasking commented 4 years ago

It doesn't really get progressively more choppy for me (Well I stopped progressing at chapter 3 waiting for a fix), it's more like it always get choppy at particular points whether or not you just loaded in prior to that point. The crashing-bug feels more like something in the game goes "Oh, I see you've loaded this much into vRAM, I'll let you play smoothly for now, but next level-transition I'll crash your HMD".

It doesn't really get choppy for me, at all. I only have issues when looking at activated upgrade stations or when looking at the weapon select menu, but only after a few mins in game. Other than that, my game manages to just barely maintain, or just barely drop below 90fps, regardless of the visual complexity of the scene.

rstrube commented 4 years ago

Loading crash unfortunately still occurs with the latest Steam VR (1.11.4).

I've also been able to monitor my VRAM usage during the game, and I noticed what appears to be very high memory pressure. Perhaps this is by design though and games should consume as much VRAM as possible? Not sure.

When using the nvidia-smi utility I witnessed 7959 out of 7979 MB consumed.

rstrube commented 4 years ago

Loading crash unfortunately still occurs with the Nvidia Beta 440.66.07 drivers :(

Performance is definitely better with these drivers though! So there is progress being made!

rstrube commented 4 years ago

Loading crash still occurs with the Nvidia Beta 440.66.08 drivers. Performance improvements are still there though! Overall I would say the game runs perfectly now, it's just the loading crashes that make it frustrating to play.

rstrube commented 4 years ago

Still having the loading transition crash with Steam VR Beta (1.11.5) and Proton 5.0-6 RC :(

llamasking commented 4 years ago

The latest HL:Alyx update (1.2.1) and SteamVR Beta (1.11.6) seem to have completely fixed all performance and crashing issues.

I no longer experience the crash when loading levels and my performance actually changes depending on what I look at rather than being pinned at just about 90 fps.

Edit: Never mind on the crashing bit. The game did crash eventually. It just took a lot more play time than it used to before it did. It originally crashed after just a few seconds, but now it takes several minutes before a load crashed the game.

llamasking commented 4 years ago

Update: The game does still crash on loading screens. It just takes significantly longer than it used to. I can now go from the autosave before the crash in the original post, to the loading screen and not crash. Before, I had to jump into the loading screen in no more than a few seconds or I would crash.

ZarathustraDK commented 4 years ago

Game still reliably crashes on loading screens.

SteamVR 1.11.6 HL Alyx 1.2.1 Proton 5.0-5 [next] (also tried regular 5.0-5) Nvidia RTX 2080ti

Crashed at the Train at the end of chapter 1, and then again at the end of the first area of chapter 2. steam-546560.log vrcompositor.txt vrmonitor.txt vrserver.txt

Crash happens around 22:17 in the logs.

rstrube commented 4 years ago

Unfortunately I'm still experiencing the issue with crashing on the loading screens.

After the crash the game continues to run in the background (you can see it on the spectator view and hear the sounds). It seems like Steam VR has crashed (perhaps the compositor?), not necessarily the game.

Edit: I checked my kernel logs and found this:

[ 1115.972947] RenderThread[4392]: segfault at 8 ip 000000000058fd5d sp 00007f3778a01ed0 error 4 in vrcompositor[400000+36f000]
[ 1115.972953] Code: 01 00 00 00 0f 84 73 02 00 00 8b 80 10 01 00 00 48 8d 44 10 10 48 8b 44 c7 10 48 85 c0 48 89 85 40 ff ff ff 0f 84 6a 02 00 00 <41> 8b 47 08 83 f8 14 0f 87 76 02 00 00 48 8d 15 2f 2b 12 00 45 8b
[ 1118.054242] nvidia-modeset: ERROR: GPU:0: Idling display engine timed out: 0x0000c57e:0:0:982
[ 1120.050415] nvidia-modeset: ERROR: GPU:0: Idling display engine timed out: 0x0000c57e:0:0:982
[ 1122.046745] nvidia-modeset: ERROR: GPU:0: Idling display engine timed out: 0x0000c57e:0:0:982
[ 1124.043280] nvidia-modeset: ERROR: GPU:0: Idling display engine timed out: 0x0000c57e:0:0:982
[ 1971.349776] RenderThread[7934]: segfault at 8 ip 000000000058fd5d sp 00007f51f123aed0 error 4 in vrcompositor[400000+36f000]
[ 1971.349780] Code: 01 00 00 00 0f 84 73 02 00 00 8b 80 10 01 00 00 48 8d 44 10 10 48 8b 44 c7 10 48 85 c0 48 89 85 40 ff ff ff 0f 84 6a 02 00 00 <41> 8b 47 08 83 f8 14 0f 87 76 02 00 00 48 8d 15 2f 2b 12 00 45 8b
rstrube commented 4 years ago

Here are all my logs, hopefully this will help troubleshoot the issue:

vrserver.txt vrclient_vrstartup.txt vrclient_steam.txt vrclient_vrcompositor.txt vrclient_vrwebhelper_main.txt vrcompositor.txt vrmonitor.txt

frostworx commented 4 years ago

with both tickets still open here and https://github.com/ValveSoftware/Proton/issues/3681 I wonder where the better place is to report VR related (game specific) issues generally? or are they all followed equally anyway?

Zamundaaa commented 4 years ago

@frostworx That's rather simple: If the issue lies with SteamVR (misbehaving or crashing, like here) then the place to report it is obviously here. If the issue lies with Proton / with the game then it belongs to Proton. HL:A has problems on its own in Proton but also causes problems for SteamVR, thus the two issues.

frostworx commented 4 years ago

it is obviously not always clear if it is a proton or steamvr issue. that's why I ask, and that's probably why both issues are still open

benrob0329 commented 4 years ago

Can confirm location-based crash.

Ubuntu 20.04, SteamVR Beta, Proton 5.0-7, Nvidia 440, Steam Stable.

Will retest with Steam Client Beta.

EDIT: Steam Client Beta seems to have made it work. EDIT2: Likes to crash once at every loading screen. EDIT3: Loading After Death Crashes

Zamundaaa commented 4 years ago

No crashes at all with the native version :+1:

llamasking commented 4 years ago

Can confirm. No crash is present in the native version. Played through from the start to the train with no issues whatsoever.

Performance is also significantly better. I can play the game on Ultra (though the textures stay at low) and stay at or above 90fps except for when in a menu or looking at Russel's hologram.

I'm still pinned for vram on low textures. Playing on medium is possible but you're very close to the 90fps line with that. High and Ultra drop frames quite significantly. No surprises there since I have a 980.

ZarathustraDK commented 4 years ago

Another native-confirmed fixed from here (2080ti), have played 3 hours straight and nothing but the odd stutter duriing shader-generation, which I guess is an Nvidia-driver issue. Thanks a lot ^^.

llamasking commented 4 years ago

Was doing some testing. Since the latest Alyx update doesn't launch on the latest Proton, I had to use https://github.com/stevenlafl/Proton/releases/tag/proton-5.0-7-alyx to get the game (and workshop tools) to launch at all.

Proton with DX11: On Low settings, the game barely maintains 90fps and the crash issue remains. Proton with Vulkan doesn't launch at all. The process is there but it doesn't appear to anything. Native: See two messages above. This version of the game doesn't appear to have any issues at all.

SlyBrood7 commented 3 years ago

After reading this thread and many others, using FPSVR to analyze my vram memory and doing the save game and reload each time it got so high it was about to crash again, I thought to myself, I wonder where that overflow of vram should go. Many years ago once I started building gaming rigs with 32+ gb of memory I would always disable my paging file. I went ahead and re-enabled it(make sure to have it enabled on the HDD you have Alyx installed on). Guessing that somewhere in the Alyx programming the vram overflow goes into the paging file. Once I re-enabled and configured back my paging file, my game would get up to 9.6gb vram, right at the moment where it would crash normally, and just stay there, with no issues at all. Hope this helps some other people. It was really frustrating me that I needed to save and reload just about every 5-10 minutes, was starting to drive me crazy.

j0sk commented 2 years ago

Here is FIX for crash that happens quite often when you load save games. Fix is for Linux if you are using Plasma desktop.

This happends if you are using VULKAN api and native linux runtime (Not Proton). Somehow game screen on monitor needs to minimized to avoid the crash.

Steps to do:

Launch Steam and Steam VR

Launch the game and stay on the menu

ALT+TAB to your Plasma desktop

Open Plasma SETTINGS > WINDOW MANAGEMENT > WINDOW RULES > ADD NEW

Fill the form: Description: Half Life Alyx fix Window class (application): Exact Match hlvr Match whole window class: no Window types: All selecteted

Add property: Size and Minimized

Settings for size: Apply initially 800 600 (It may be good that it is running on small window)

Settings for minimized: Force Yes

Press APPLY

Now Half Life game should be minimized on monitor

Put your VR Helmet and start playing. Now it shouldn't crash any more during the loading the save games