microsoft / MixedReality-HolographicRemoting-Samples

Code samples for using Microsoft's Holographic Remoting library.
Other
141 stars 47 forks source link

Multi GPU environment, Holographic space select always the first compatible GPU #88

Closed almoga296 closed 8 months ago

almoga296 commented 1 year ago

Describe the bug In advance to #84 Running holographic remoting on a PC with multiple GPUs, selects always the same GPU (Primary).

I've 1 PC with 2 NVIDIA RTX A5000 GPUs, running any holographic remote app causes the runtime to use NVENC of the primary GPU.

Reason I think the problematic behavior is in DeviceResourcesD3D11Holographic.cpp line 59. As I can see it select the first adapter that support holograms capabilities.

Suggestion Add ability to select GPU index as an argument.

To Reproduce Steps to reproduce the behavior:

  1. Make sure you have PC with 2 GPUs
  2. Run 2 instances of any remoting app
  3. Open task manager and go to performance tab
  4. See that both of the applications used the same GPU encoder

Screenshots / videos Screenshot 2023-06-01 144652

Screenshot 2023-06-01 144717

Remote side (Windows PC) OS version: Win10 Pro 22H2 Unity version: 2021.3.12f1 We are using OpenXR. Graphics card(s) / graphics driver version: 2 GPUs - NVIDIA RTX A5000 x2, driver version: 528.49 Player side (e.g. your HoloLens 2) your system - a laptop with integrated and discrete graphics for example]

Player side (e.g. your HoloLens 2) OS version: 20348.1535.arm64fre.fe_release_svc_sydney_rel_prod.230106-1454 We use the store player version 2.8.1

lappelsmeier commented 1 year ago

Hi @almoga296,

thanks for the report and the details. We're looking at possible solutions at the moment. Can't promise anything so far but we hopefully have an update sooner than later for you.

chairobl commented 8 months ago

Hi @almoga296, the Unity Open Xr Plugin now supports the GPU Selection feature we implemented in our latest release. You should be able to select which GPU to use through the use of the force-device-index commandline parameter, as documented here.

If you encounter any issues, feel free to reopen this issue and I'll be happy to help 😄