Meister1593 / ALVR-Distrobox-Linux-Guidance

Repository for guidance and collection of scripts to make playing ALVR on linux easier
MIT License
9 stars 0 forks source link

Slight texture/block glitching in games (and steamvr home) #1

Open xenanthropy opened 1 year ago

xenanthropy commented 1 year ago

hello! First of all, i'd like to say thank you for setting up these scripts - i'd been messing around for a solid week trying to get steamvr and alvr working in a chroot, and I just couldn't manage it. This seems to work good!

.. I did notice some issues though. once i'm in VR, the the view is a bit... glitchy? It's hard to describe. It's 100% not game-ruining, but when i'm moving my vision around, I notice blocky artifacting when looking around - i'm not sure if it's a resolution issue or some sort of problem with steamvr, i'm not sure.

When I would run VR in my other distro (void linux) I used steamvr beta with alvr and it looked and worked great - I do remember having some slight graphic issues with non-beta steamvr - but beta doesn't seem to work with this setup, I just get a black screen in my quest 2. I'm not sure on settings, as in my other setup I didn't touch any of alvr's settings (other than turning on async reprojection, as I have an AMD card)

(Ah, some extra information here: interestingly, I actually ran alvr/steamvr WITHOUT turning on legacy reprojection, and the games worked just fine! That was of course with steamvr beta though, maybe that's only an option needed when using non-beta?)

Anyways, gonna provide some system info here:

OS: Source Mage GNU/Linux, 64-bit (no multilib, hence the need for this setup) CPU: AMD Ryzen 7 5700X Card: AMD rx 5700xt ram: 32gb kernel version: 6.2.11 DE: XFCE

Any help is appreciated! Again, thank you for the scripts!

Meister1593 commented 1 year ago

Hello! Thank you for providing feedback. So about the glitchyness, i'm not 100% certain atm but it could be just alvr configuration, as blockyness and artifacting almost entirely encoder settings fault. I haven't finished with basic configuration feedback so far (nvidia is a pain point at the moment), but if that helps for now, heres basically my configuration on RX 6600 XT:

  1. adaptive bitrate 100 min 150 max (i actually have 200 but i don't think quest 2 can handle that)
  2. HEVC + Reduce color banding (this especially helped with blockyness, h264 looked like a mess and often with glitched colors for a bit)
  3. Quality preset for encoder (not sure if that really does anything, but i did anyway)
  4. Low/Medium resolution (usually low)
  5. TCP (reduces artifacting close to zero)

Steamvr beta is universally broken on linux right now for alvr users unless you specifically remove wayland from it's environment variables (breaks wlxoverlay autostart in this case) since they added drm leasing on wayland and that doesn't play well with alvr.

The legacy reprojection thing only helps you if you happen to have <native hz. So if you have less than 72/90/120hz set in ALVR, it might produce rubberband/uneven frametime or simply lock you at half the framerate if it's less than that. If you use async reprojection, it might not be relevant in this case, but it's sort of broken at the moment and misses reprojection frequently, just unreliable overall, so legacy reprojection (which is, basically no reprojection) works better, as it happens on client-side better anyway.

xenanthropy commented 1 year ago

Ah ok, thank you - I will try with those settings! Ah also sorry, I completely forgot to mention - i'm using Xorg currently, both in my current distro and in my void linux install, so I don't have any wayland issues (although I was planning on switching to wayland soon so this is good information) and ah, I see. I think i'll go ahead and turn off async reprojection then and make sure legacy reprojection is on, then. Hopefully those settings help! I will report back later (gonna have to reinstall, installing steam beta messed everything up heh)

Meister1593 commented 1 year ago

Yeah sure, just use uninstall script from repository and setup again, i made everything as portable/easy to use as possible so shouldn't be any problems with resetting whole thing. Other than waiting that is of course :smile:

Meister1593 commented 1 year ago

As for Xorg, understandable, it might not be an issue on it then, but i wouldn't go for beta personally, just not worth it. Beta seems to be in sort of transition process at the moment and not that stable.

Meister1593 commented 1 year ago

Just noticed you mentioned steamvr home - i usually disable it, it's not working great on linux, sometimes outright crashing just because...

xenanthropy commented 1 year ago

Ok so I changed those settings and... it does work better! But it's still not perfect unfortunately :( The video quality is definitely lower than in void (I kept it set to medium, that's what it's set on in void too) but it just looks more... blurry I guess? I am being nitpicky because it's 100% playable, but I feel the difference in experience is a bigger pain than the pain of having to dual boot lol :( But with those settings, I can confirm (most of) the artifacting is gone! And I didn't notice any latency difference. It's a shame though that this won't run as well as my other setup! I thank you for the help though. Hopefully running steamvr/alvr in a container can be improved in the future. Still not sure why it works better in my other setup though...

Meister1593 commented 1 year ago

Oh right I definitely forgot one more thing, in color correction I turned sharpening to 1.

xenanthropy commented 1 year ago

ah ok, I will try that out and see if it makes a difference!

Meister1593 commented 1 year ago

I recently updated repo, it should have solved problems with opening steamvr overlay and make build even more portable, recommend resetting container

xenanthropy commented 1 year ago

All right, will do! Thanks for the heads up

xenanthropy commented 1 year ago

EDIT: Ok so i've actually figured out what's causing the blackscreen on steamvr beta: it's HEVC! I can do h264 just fine with steamvr beta, but HEVC gives a black screen. So so far i've dropped back to regular steamvr (with async turned off, and legacy reprojection turned on for all games) and I feel like this is a better experience (although it honestly is a little hard to tell the difference between h264 and HEVC if i'm being honest)

@Meister1593 Ah interesting developments!! I was thinking about what was different on my void linux machine and realized I was using a different version of ALVR (nightly version april 7th) I notice the script uses a newer nightly - I decided to try out 04-07 and... everything works mostly perfectly now! I'm now back on on UDP, and i'm also able to use async reprojection (with legacy reprojection NOT turned on in per-game settings) i'm also successfully using the steam beta as well! I am noticing a very SLIGHT drop in framerate (will have to work that out) and the controller tracking feels maybe a little more sluggish (could probably fix this by switching some settings) but the graphics are perfect in-game!

The only thing this ALVR regression struggles with is the steam menu, it's very glitchy looking. I ran into the same problem with Half Life Alyx in void linux - in between map loading (where it showed the little topographical city layout) it would be incredibly glitchy, as well as the "press right trigger to continue" text, but the game would be perfect otherwise. So, not happy to have those issues back.

If I have some time, I might have to do a bisect on ALVR nightly to figure out which changes broke compatibility with steamvr beta (shouldn't be too hard, just the span of nightlies between 04/07 and 04/14)

Meister1593 commented 1 year ago

Sorry, i haven't noticed comment until now, if you happen to have black screen with HEVC but not with h264, i would consider checking out logs in case you're using SW (software) encoder.

At the moment i pushed bunch of changes related to portability and simplifying things, so if you happen to update, i would uninstall it using older script (as many paths have changed)