SteamVR Developer Hardware

SteamVR Developer Hardware

SteamVR Home causing HMD initialization failure
Hey everyone, I noticed a few other people having some issues with SteamVR Home and I had to dig into it so I thought I'd post what my current theory because I got it to work properly in most cases now. I'm using UE4 but the same solution should apply for any engine. Small disclaimer that this is theory crafting based on my findings but I'm not having any issues anymore =P

So there's two issues I ran across, one was the steamworks API failing to initialize and then the HMD itself failing to initialize.

Steamworks API:
The problem here is that SteamGameServer_Init returns false for us. Unfortunately this function is internal to Steam I can't see what it's doing or how exactly it's failing but my assumption is that at the time SteamVR home is still running, the separate process is detected, so its permission is used. The permission doesn't allow for SteamGameServer to initialize, which then causes you to not have access to any backend Steam function.
Solution - Initialize Steamworks API later. Make sure it's a time once SteamTours.exe is no longer in task manager. I find in UE4 that it's safe to initialize in a package after the splash screen goes away and you have your game window up. This seems to be very reliable so far and not causing any bugs I've found so far.

Steam HMD:
I'm seeing a few issues pop up because of this, please do not try to implement this fix in your build unless you're comfortable debugging issues in the VR Plugin and/or engine. I just wanted to verify a potential fix and further support my theory.
After the first attempt to fix the problem I started to notice I would get into some cases where the HMD would not connect to our program as I tried to launch it. The headset would just display the Home and I'd have a game window on the monitor of our program and no VR console commands would be recognized. Checking the logs I had two errors initializing the SteamVR plugin for UE4: VRInitError_IPC_ConnectFailed (301) and VRInitError_Init_AnotherAppLaunching (117). I decided to try apply the same principle from the last solution to this one as well. Especially since the logs straight up told me that another app was detected, which I presume is SteamVR Home.
Solution - I commented out the initialization in UnrealEngine.cpp (the failed attempt seems to activate some flags which causes UE4 to ignore further initialization attempts) and call it myself (by default the function is private so I had to do a minor change in the UnrealEngine class) at a time when SteamTours wasn't running in the background. This solution is fairly reliable, it's worked 9/10 times I tried it so far only failing when I tried to launch the program right after waking the machine up; which is far more stable than we I didn't have this change. Although it does cause other bugs in UE4 related to VR. No controllers visible, post process in only one eye and maybe more!

tl;dr:
It's a timing issue. SteamVR Home is a background process named "Steam Tours" and if that is still running then the Steam initialization processes will fail.
< >
Showing 1-10 of 10 comments
steevekilhoffer Aug 27, 2017 @ 5:59am 
Hey, I might be experiencing the same issue on the UE4 VR game I'm developping. Steamworks API is failing due to SteamGameServer_Init returning false. Would you mine telling me how you delayed Steamworks initialization exactly? It would save me some precious time. Thanks!
Sir Kermitton Aug 29, 2017 @ 11:42am 
Hey there, sorry for the delay, didn't notice the notification until now.

I still wouldn't recommend it. Due to time constraints and other issues deemed more important we considered it acceptable to just disable Steam VR Home and called it a day. I know most other teams won't have this luxury though.

So at this point I only vaguely remeber the exact process I did. But it involved commenting out the Initialization function for FOnlineSubsystemSteam::Init()* and calling it elsewhere that would be executed later. Perhaps GameMode BeginPlay()?

This is a hacky solution and most likely will lead to other bugs unfortunately.

*I don't remember the exact function init. This one looks about right but it may be another function.
steevekilhoffer Aug 30, 2017 @ 7:08am 
Thanks for the details. Unfortunately this "disable Steam VR Home" workaround is only good for development. It needs to be fixed properly. I posted another Bug Report on UE4 AnswerHub to have Epic open a bug about it.
Curs0 Nov 14, 2017 @ 3:50pm 
same problem here, disabling steamvr home beta solve the problem...

Steeve, have you found any solutions?
Last edited by Curs0; Nov 14, 2017 @ 3:53pm
steevekilhoffer Nov 15, 2017 @ 6:28am 
Hi Curs0,

No I haven't got time to look into this, and probably won't (I'm a one man team). Plus SteamVR Home is open to everyone now :o\

And it seems Epic didn't even open a bug about it :o(
Curs0 Nov 15, 2017 @ 7:48am 
bumped your post on epic forum
Curs0 Dec 12, 2017 @ 2:00pm 
did you manage to find a fix?
steevekilhoffer Dec 13, 2017 @ 12:05am 
No, and still no sign of movement from Epic.
Curs0 Dec 23, 2017 @ 8:39am 
it seems that configuring game as VR in steamworks settings solved the problem.... can you confirm that?

Launch Options
To configure an app with VR support, start by defining a VR Launch Option. From your app landing page, click Edit Steamworks Settings, then find the Installation tab and click on General. There are three options:
Launch Steam VR App: Use this for VR apps that use SteamVR
steevekilhoffer Dec 23, 2017 @ 11:39am 
Hi Curs0! I just tried. I confirm. If SteamVR is not running, and you press the PLAY button of Steam, the game successfully initialize Steamworks API.

There is still one case in which the game fails initializing Steamworks API. It is when SteamVR is not running and you run the *.exe directly from Windows Explorer.
< >
Showing 1-10 of 10 comments
Per page: 1530 50

Date Posted: Jun 9, 2017 @ 1:00pm
Posts: 10