alvr-org / ALVR

Stream VR games from your PC to your headset via Wi-Fi
MIT License
5.27k stars 472 forks source link

Client App starting losing packets after random time #6

Closed FingrMastr closed 4 years ago

FingrMastr commented 5 years ago

First of all, thanks to you and to Polygraphene for such awesome work.

I’m playing lone echo. After LOTS of hours in game, in different sessions, I think I isolated a strange behavior of the app. After a random amount of time, It starts losing packets, especially with steam audio when there are loud sounds. This strange “state” in my opinion is completely caused by the app. These are my arguments:

  1. If I restart the app, it returns to completely fluid, without any packet drop, for another random amount of time.

  2. When the app is in this “packet loss” state, if I press the right oculus menu button, and then click on “resume”, the visor image is black. If I resume the app when it has no packet loss, it resumes completely fine.

  3. In this “packet loss” state, even restarting the app is difficult. If I close it and then restart, the visor says that the app was unexpectedly closed, after some flickering.

For completeness, my system is pretty high-end. GeForce RTX2070 heavy oc’d, cpu i5 8-series (six cores), 16 gigs ram, solid disks.

Networking side, I have a high end 5Ghz Linksys router dedicated to ALVR, 2 mts distance, and I’m the only one in the room. On steamvr, I disabled reprojection and I’m at 100% res on SteamVR and on ALVR.

Before entering the strange “packet loss” state, ALVR app and server are OUTSTANDING, steady 72fps, without artifacts of any kind.

Hope this details can help you isolating the problem

JackD83 commented 5 years ago

I encountered the same problem as you, but could not trace it (yet). For me, it happened only at home and at times where everyone around me is using their wifi. At work with a dedicated router connected to an additional lan port, I never had the same problem. I suspect some kind of network congestion.

Closing the app (where it crashes some times) on the HMD and restarting it helps most of the time.

FingrMastr commented 5 years ago

The only kind of “congestion” I could have is internet connection, since the oculus quest uses that same WiFi to connect itself to internet. The PC uses the cabled connection to connect itself to internet. I will try to separate completely the two networks and report here.

JackD83 commented 5 years ago

Hmm, my quest at work does not have a internet connection.

JackD83 commented 5 years ago

I made an observation:

-> results in

ALVR Native: Sent packet loss report. ret=16 09-10 16:11:43.844 28543 30280 E ALVR Native: SoundPacket loss 8 (46 -> 53) 09-10 16:11:43.844 28543 30280 I ALVR Native: Sent packet loss report. ret=16 09-10 16:11:43.877 28543 30280 I ALVR Native: Got frame=32 86, Codec=1 09-10 16:11:43.979 28543 30280 E ALVR Native: VideoPacket loss 115 (1323 -> 1437) 09-10 16:11:43.980 28543 30280 I ALVR Native: Sent packet loss report. ret=16 09-10 16:11:43.985 28543 30280 I ALVR Native: Sent packet loss report. ret=16 09-10 16:11:43.985 28543 30280 E ALVR Native: SoundPacket loss 6 (74 -> 79) 09-10 16:11:43.985 28543 30280 I ALVR Native: Sent packet loss report. ret=16 09-10 16:11:44.000 28543 30280 I ALVR Native: Sending timesync. 09-10 16:11:44.000 28543 30280 I ALVR Native: Decoder latency: 0 09-10 16:11:44.000 28543 30280 I ALVR Native: Sending broadcast hello. 09-10 16:11:44.000 28543 30280 E ALVR Native: Received packet from invalid source address. Address=192.168.1.168:9944 09-10 16:11:44.006 28543 30280 I ALVR Native: TimeSync: server - client = -7051699 us RTT = 6414 us 09-10 16:11:44.151 28543 30280 E ALVR Native: VideoPacket loss 252 (2065 -> 2316) 09-10 16:11:44.151 28543 30280 I ALVR Native: Sent packet loss report. ret=16 09-10 16:11:44.159 28543 30280 I ALVR Native: Sent packet loss report. ret=16 09-10 16:11:44.159 28543 30280 E ALVR Native: SoundPacket loss 10 (106 -> 115) 09-10 16:11:44.159 28543 30280 I ALVR Native: Sent packet loss report. ret=16 09-10 16:11:44.376 28543 30280 E ALVR Native: VideoPacket loss 526 (2859 -> 3384) 09-10 16:11:44.376 28543 30280 I ALVR Native: Sent packet loss report. ret=16 09-10 16:11:44.378 28543 30280 I ALVR Native: Sent packet loss report. ret=16 09-10 16:11:44.378 28543 30280 E ALVR Native: SoundPacket loss 18 (138 -> 155) 09-10 16:11:44.379 28543 30280 I ALVR Native: Sent packet loss report. ret=16 09-10 16:11:44.596 28543 30280 E ALVR Native: VideoPacket loss 562 (3915 -> 4476) 09-10 16:11:44.596 28543 30280 I ALVR Native: Sent packet loss report. ret=16 09-10 16:11:44.602 28543 30280 I ALVR Native: Sent packet loss report. ret=16 09-10 16:11:44.602 28543 30280 E ALVR Native: SoundPacket loss 22 (182 -> 203) 09-10 16:11:44.603 28543 30280 I ALVR Native: Sent packet loss report. ret=16 09-10 16:11:44.820 28543 30280 E ALVR Native: VideoPacket loss 528 (5009 -> 5536) 09-10 16:11:44.820 28543 30280 I ALVR Native: Sent packet loss report. ret=16 09-10 16:11:44.832 28543 30280 I ALVR Native: Sent packet loss report. ret=16 09-10 16:11:44.832 28543 30280 E ALVR Native: SoundPacket loss 22 (226 -> 247)

and a very unresponsive HMD. Picking up the Quest without shaking works fine. I'm maybe on to something. I added the output ALVR Native: Decoder latency: 0 to this testbuild because I had a hunch.

JackD83 commented 5 years ago

@FingrMastr could you please test release experimental v6?

FingrMastr commented 5 years ago

Today I’ll test in similar condition of the previous version. However, I can already say that I have a problem, with v6 the sound tab is saying “no sound devices are found”. Is there anything I can do to restore sound stream?

JackD83 commented 5 years ago

Its only a UI issue. If you delete your configuration in %localappdata%\ALVR it reverts and you can set it again.

Here is patched ALVR.exe whre the sound settings work ALVR_fix.zip

FingrMastr commented 5 years ago

Ok here are results of testing of V6:

Tested with Valve's "The Lab", and with Spiderman far from home vr. After 1,5 hours of testing, I experienced again the strange "packet loss" behavior, for three times. However packet loss was very small, but I noted that traslation movement (not rotation) was very jittery when entering this state. Normally is possible to press the right controller oculus button to pause and then resume ALVR app. As I noted in the previous tests, when the app is in this strange state, if I pause and resume, I can hear audio but image is black. Also, If I close the app and then restart, it reports me a crash.

For the rest, the experience is absolutely smooth, at H265, 100% res, 50Mbps and around 300kb buffer.

About Spiderman Far From Home, it seems the game does not correctly recognize controllers with standard oculus touch mapping. I could see my hands, but all buttons were unresponsive. I had to remap Index Knuckles controls in the steamVR interface to play correctly...

Hope this helps.

FingrMastr commented 5 years ago

Ok another little update after some other time in VR with V6:

Tested with "Groundhog day", for about an hour. (Great idea for a game indeed, but technically poor). Experienced two times the strange state with jittery translation and little packet loss.

The BIG very very BIG problem is new, however: For two times the app was completely freezed in video. Audio was fine. I could not even close it with right oculus button. I saw from the pc mirror view that ALVR server was correctly detecting movements. I was forced to restart the Oculus Quest by holding power button. This happened two times, and has not ever happened with previous ALVR versions.

JackD83 commented 4 years ago

Please continue the discussion in #70