Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux: Rotated playspace breaks ALVR #2013

Closed
galister opened this issue Feb 29, 2024 · 16 comments · Fixed by #2017
Closed

Linux: Rotated playspace breaks ALVR #2013

galister opened this issue Feb 29, 2024 · 16 comments · Fixed by #2017

Comments

@galister
Copy link
Collaborator

When SteamVR playspace is rotated, the headset image stutters heavily. During a stutter, the eye images freeze in place, in a way that the frozen image follows head movement.

image

This happens when using SetWorkingStandingZeroPoseToRawTrackingPose or the Seated variant with a matrix where the basis is not identity.

Can also be triggered using OVR Advanced Settings' space rotate functionality.

Does not happen with wired headsets.

Some older titles use this as a way to recenter during gameplay, in some cases even automatically, so it's really hard to work around. For example, Subnautica does this when entering player-built structures.

Resetting the matrix's basis to identity fixes the issue. For example, if the game breaks your view, you can use wlx-overlay-s's Reset Offset button on the Settings panel and the views will be fixed instantly.

I have not tested on Windows, but I would expect this to be a well known issue by now if it broke the same way on Windows.

@galister
Copy link
Collaborator Author

I also found a very similar behavior when using ALVR in conjunction with lighthouse devices, and starting a lighthouse device before connecting the HMD for the first time. Once the HMD has been connected at least once, only then the trackers are safe to be powered on.

@XenoPL
Copy link

XenoPL commented Mar 2, 2024

+1 on the matter, it causes stutters and small, but constant jumps of camera fov. For me it happens both on Linux and Windows when I'm entering 3D world in Falcon BMS. The difference between Linux and Windows is: under Linux/Proton once it starts it happens all the time, under Windows it's visible when game goes back to 2D mode.
As far as I observed VirtualDesktop is not affected.

@Vixea
Copy link
Collaborator

Vixea commented Mar 2, 2024

So let's say we workaround this by just checking if the Matrix isn't an identity matrix and resetting it to one. Would this break playspace movers?

@galister
Copy link
Collaborator Author

galister commented Mar 2, 2024

if @XenoPL says they also had this on windows, i would test it further there. if it's broken on windows too, then it's likely not a steamvr bug

@galister
Copy link
Collaborator Author

galister commented Mar 2, 2024

@Vixea i was actually thinking to implement this in wlxoverlay for the time being. i think it'll be fine, but will definitely impact titles that rely on this working

@XenoPL
Copy link

XenoPL commented Mar 2, 2024

Confirm. My test case is an app with 2D UI and 3D world with VR being initiated when 3D world is loading. App (for now) is using OpenVR, so SteamVR is mandatory here.
Under Windows when 3D world is loading but still not ready, I can see SteamVR player space starts those small jumps, and stutters. Once I'm in 3D world it seems normal, ie no camera jumps, no stutters, no jumps in latency in ALVR statistics.
When I exit 3D world and go back to 2D UI it starts to be really bad, frozen picture in headset, blank background behind 2D window, playerspace jumps with almost every head movement huge, stuttering and frequent spikes of latency.
When the same game on the same hardware is running under Linux those jumps/stutters happen also when I'm in 3D world.

From my limited testing, if game is run on Windows with VirtualDesktop+SteamVR, it seem to be fine.
If this one could be fixed could drop Windows and be back to use Linux exclusively ... so my hopes are solution of some sort can be found.

@galister
Copy link
Collaborator Author

galister commented Mar 2, 2024

@XenoPL can you try this on windows?

  • install OpenVR-AdvancedSettings
  • get in vr with alvr
  • start OVR advanced settings via steam
  • open OVR advanced settings panel from bottom of steamvr dashboard
  • on offsets tab, change the y rotation (rotate space)
  • see if it breaks the same way

this is known to work ok with VD and SteamLink

@XenoPL
Copy link

XenoPL commented Mar 3, 2024

Rotating space in OVR AS under Windows didn't trigger the bug, but it's definitely there:
ALVR_space_move_bug

@galister
Copy link
Collaborator Author

galister commented Mar 3, 2024

@XenoPL does the Seated recenter button on the same offsets page trigger it?

@XenoPL
Copy link

XenoPL commented Mar 3, 2024

With OVR AS I coulnd't trigger the bug with any setting present on offset tab, rotating, moving space on x/y/z axis nor seated recenter option is unable to make alvr stutter. I've tried latest stable: 5.7.4 and 5.8.6 beta.
I mean that's under W10, under Linux it breaks things quite reliably.

@Vixea
Copy link
Collaborator

Vixea commented Mar 3, 2024

Could you link us to your test case app so we could try reproducing the bug on windows?

@galister
Copy link
Collaborator Author

galister commented Mar 3, 2024

if you have subnautica, i think that's also worth trying on windows with the vr mod. on linux, this breaks right on the main menu.

@XenoPL
Copy link

XenoPL commented Mar 3, 2024

Falcon BMS itself https://www.falcon-bms.com/downloads/
For legal reason you need to have original Falcon 4 installed to proceed with installation of BMS.
Falcon 4 is available on
Steam: https://store.steampowered.com/app/429530/Falcon_40/
GoG: https://www.gog.com/pl/game/falcon_collection Falcon 4 is in extra downloads

Short installation instruction:

  • install Falcon 4
  • if steam version is used, run it once to let steam installer create all the registry entries
  • install Falcon BMS

Steps to reproduce
Use game shortcut to start its Launcher, enable VR with a switch/slider below Theater selection dropdown list and start actual game with Launch button
In main UI select Dogfight, then click commit in game type selection window. On next page click TAKEOFF button (bottom right) to enter 3D world. Exit 3D world with Esc then E to end mission. Once back to UI all the said problems should manifest themself quite clearly.

If needed I'l drop 10$ extra to cover Falcon4 cost.

@galister
Copy link
Collaborator Author

galister commented Mar 4, 2024

@XenoPL we managed to track down the issue, but it is very Linux specific. Your BMS issue is caused by another bug and is not related to the original topic of this ticket. you might want to open a new ticket with the details.

@XenoPL
Copy link

XenoPL commented Mar 4, 2024

Thanks for headsup, if it'll fix stutter, pov jumps and latency spikes under Linux, then I'd more than happy. Actually issues with running BMS under Linux are only reason I've installed Windows on my bare metal system first time for last 15 years.
But still, I'm gonna test t both on Linux and Windows. If issues will persist on any of those I'll report back :)

@XenoPL
Copy link

XenoPL commented Mar 11, 2024

I did some testing with alvr-streamer build from today master. I'm happy to report changes made fixed my issues with Falcon BMS on Linux. Nice steady latency in 80-100ms range and no jumps or shifts in playerspace. Very pleasant experience in general.
I'll do more testing on Windows side once there'll be new nightly build available and report back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants