GPUOpen-LibrariesAndSDKs / Radeon-ReLive-VR

156 stars 19 forks source link

sucessfully connected to SteamVR, but black screen in Quest #44

Closed botomica closed 3 years ago

botomica commented 4 years ago

My Quest is sucessfully connected to SteamVR, however I can only see a black screen through the headset. I open the VR view from the SteamVR software, head and controller tracking all work fine. So what may be the problem? Have tried radeon driver 20.2.1 and 20.2.2. Attached is the log. AMDWirelessVR.log

MikhailAMD commented 4 years ago

Your network connection seems slow.

botomica commented 4 years ago

Connect via 5Ghz. Reboot doesn’t fix the problem.

MikhailAMD commented 4 years ago

If you can, try to borrow another router and another headset. Try log in into your router, find headset IP address and on PC from CMD try to ping the IP address. What kind of time do you have?

botomica commented 4 years ago

If you can, try to borrow another router and another headset. Try log in into your router, find headset IP address and on PC from CMD try to ping the IP address. What kind of time do you have?

min = 24ms, max = 251ms

botomica commented 4 years ago

Strangely, I tried to connect my PC wirelessly to router and problem is solved

botomica commented 4 years ago

Strangely, I tried to connect my PC wirelessly to router and problem is solved

I forgot to mention that I connected my pc via a homeplug to the router before. Is it what caused the problem?

GennadiyAMD commented 4 years ago

@botomica - Homeplug could definitely be and most likely is the source of your problem. It is very dependent on the quality and the length of your electrical wiring between the adapters. Personally, I could never get them to work reliably. Direct gigabit Ethernet connection between the PC and the router is the way to go.

botomica commented 4 years ago

@botomica - Homeplug could definitely be and most likely is the source of your problem. It is very dependent on the quality and the length of your electrical wiring between the adapters. Personally, I could never get them to work reliably. Direct gigabit Ethernet connection between the PC and the router is the way to go.

Interesting, my homeplug is rated 1200mb and I always think that powerline is more stable than wireless. And I have tried both Virtual Desktop and ALVR, both work ok using homeplug.

GennadiyAMD commented 4 years ago

@botomica - in my experience I could never reach 0% packet loss with power line networks at multiple locations and the fact that you could get it to work over WiFi points in this direction. I would suggest that you run a continuous ping from the PC to the router with a larger packet size for 5 minutes to see if you would be looking any packets over time. Try the following command on the Windows command line: ping /t /l 65000 and leave it running for a few minutes. Then press Ctrl+C to interrupt and look at the number of lost packets. If it's anything but 0, your network is not very reliable. Also try switching to streaming over TCP - you can do so from Radeon Settings to see if you manage to connect - TCP would take care of occasionally lost packets, but you might see higher latency. Or, since you have a WiFi card in your PC, you might try to turn it into a WiFi hotspot, as described here and connect the Quest to it instead of the router. Your mileage with this might vary, but we've seen reports of people using this functionality successfully, so it might be worth trying.

It is interesting that VD and ALVR worked. While I don't have a good explanation for this, I would be curious to see the output of your ipconfig /all and route print commands.

And yes, 24ms latency is very high for VR. See usually see sub-10ms over WiFi.

MikhailAMD commented 4 years ago

Also you may try to experiment with one parameter in %LOCALAPPDATA%\AMD\OpenVR\settings\settings.json file: "DatagramSize" : 65507 . Try to lower it up to 1500.

GilDev commented 3 years ago

Same issue with SteamVR v1.16.10 and Adrenalin v21.3.2 on a Quest v27. It worked a few days ago before I updated everything (it was with Quest v25 and Adrenalin 21.3.1). I tried towering the datagram to 1 500 and restarting SteamVR but same thing, tracking works but black screen. Connected over the same 5 GHz network (connects fine actually)

GennadiyAMD commented 3 years ago

@GilDev - please attach c:\Program Files (x86)\Steam\logs\AMDWirelessVR.log

You can also try switching to streaming over TCP as an experiment.

GilDev commented 3 years ago

Here it is, the log from when I sent my comment: AMDWirelessVR.log

TCP does work fine! Next I will try with a dedicated router directly plugged into my computer via Ethernet.

And just to specify I use an RX 5700 XT.

GennadiyAMD commented 3 years ago

@GilDev - how did you have your computer connected to the router? "Next I will try with a dedicated router directly plugged into my computer via Ethernet" implies that you have some other type of connection... is it WiFi from PC to the router? Or something like HomeLink (Powerline)? If yes, that would explain it - those links are too slow and unreliable, causing packet loss. A direct Ethernet from the PC to the router is the way to go. Mesh routers also do not perform very well in this scenario either.

The Wiki has a lot of useful information on how to set up the network for VR streaming.

GilDev commented 3 years ago

Indeed I had my computer connected via WiFi 5 GHz to my router (that is what I was implying with “ Connected over the same 5 GHz network”, sorry it wasn’t clear enough).

I had tried directly with another dedicated router connected to the PC, enabling internet sharing and connecting only the Quest to that router, but the ReLive app just wouldn’t connect. It was a few days ago, I will check my router’s configuration as an access point and try again soon.

GennadiyAMD commented 3 years ago

@GilDev - make sure that both the PC and the headset get their IP addresses on the same IP subnet. Look at the IP address and the mask - you'll see something like 192.168.0.x and mask 255.255.255.0. The .x in the address of the PC and the headset would be different, but the 192.168.0. part (where you have the non-zero values in the mask) must be the same. If they're not the same, the devices are on different subnets.

Very important - you can only have one DHCP server on the network. So if you leave both routers connected, you must disable the DHCP server in one of them (doesn't matter which one, as long as both are connected together).

Hope this helps.

GilDev commented 3 years ago

Thank you for those precisions, I will try all of this out soon.

I think this may change depending on the dedicated router’s configuration (also maybe the internet sharing configuration in Windows, one interface can share internet, or a bridge can be created between two interfaces). The router can be a simple “client” in the network and create its own personal network and subnet, in this case having the router address IPs through DHCP would work. If it is set up in “bridge” mode then indeed only one DHCP server can be enabled as devices connected to the dedicated router will have their IPs assigned by the original network’s router. In the first case though, I guess AMD ReLive would need to know it has to use the dedicated router’s subnet, and I don’t know yet if this is configurable or if it uses the main network adapter, which is the one with internet access.

GennadiyAMD commented 3 years ago

@GilDev - the headset finds the PC using a UDP broadcast, this would only work within a single subnet - that's the main point.

You can connect multiple routers together by simply running an Ethernet cable between their LAN ports. They don't have to be in bridge or AP mode for that, they would still work. But if you leave multiple DHCP servers active, you have no control over which one would assign the address to each client. If they're configured for the same subnet with overlapping DHCP ranges, you might run into IP address conflict when the same address is assigned to two different devices. You can configure each router to assign an address from non-overlapping ranges (like one router would be 192.168.0.100-120 and the other one would do 192.168.0.130-150 with the 255.255.255.0 subnet mask) - this would actually work fine.

You could also cascade the routers - the WAN port of the second router connected to a LAN port of the first router. In this case as long as your PC and the headset are connected to the same router, it would work fine, but they would not see each other when connected to different routers as they would be put on different subnets and would have to traverse the NAT.

The Wiki article I refered to earlier explains all this in great detail - it's rather long, but it covers all these scenarios.

GilDev commented 3 years ago

Thank you for the details, I will explore all of this.

My setup will be like this: my PC connected via 5 GHz WiFi to my main router, giving it access to the local network and internet, as usual. Then a dedicated VR router will be plugged into the PC’s Ethernet port and the Quest will connect to this router over 5 GHz, so it will be the only client, and only a few meters away, thus optimizing the VR streaming as much as I can.

GilDev commented 3 years ago

I managed to connect my Quest to Relive through my dedicated router on the setup I explained but I had to disable my main Wi-Fi internet connection for the Quest to discover the computer and connect to it properly.

Anyway, this can probably be fixed but it was just a test, and the performance wasn’t that great (UDP, 50 Mbps) with my Xiaomi AX5 router so I guess this solution won’t work for me until I go with a better access point.

Thank you for the help!