Collecting data for Magic Leap support
Included with Remote Rendering are powershell scripts that can collect information helpful to our engineers when diagnosing an issue. These scripts are signed cryptographically to prevent tampering, and can be viewed in plain text.
Prerequisites
Ensure that:
- You have administrator rights on your machine.
- PowerShell scripts are permitted to run on your system. Depending on your organization’s security policies, this may require IT approval.
- Android Debug Bridge (ADB) is installed and added to your system’s PATH environment variable.
PowerShell Execution Policy
In some cases, PowerShell script execution might be restricted due to security policies. To successfully run the debugger script, you may need to adjust the execution policy to Bypass or Unrestricted.
Changing the execution policy may have security implications. Consult your IT administrator before making changes.
Use the following command to allow script execution just for the current session:
Set-ExecutionPolicy Bypass -Scope Process
More about PowerShell Execution Policies
If you'd like to remove restrictions temporarily for a specific script instead of the current session, you can run run the following command in PowerShell:
powershell.exe -ExecutionPolicy Bypass -File "C:\Path\To\Your\Script.ps1"
Replace "C:\Path\To\Your\Script.ps1"
with the actual path to the script you want to run.
Logging System Info using DebuggerScript.ps1
The DebuggerScript attempts to collect various information about your system, and is particularly useful in diagnosing connection issues. If adb.exe
is in your PATH (Or a path to it is passed via the --AdbPath
argument). After running the script, the information is printed directly to the console, so that you may elect to censor it as needed before sending to us.
The script collects the current information at the time of writing:
- Information about adb, if available
- The current ipconfig status of your PC, to list IP adddresses
- A similar query of available IP addresses.
- The default OpenXR runtime
- The properties of your Magic Leap Remote Rendering installation
- The script execution policy of your PC
- A list of OpenXR applications active on your PC that are correctly loading the Remote Rendering DLL
- If the Remote Rendering service is active
- The status of the Remote Viewer installed on your ML2
- The IP address of the ML2
- The results of pinging the ML2 from your PC
- The results of pinging your PC from the ML2
- The ML2 OS
- The status of your Nvidia driver installation
- A scripted attempt to force pairing of Remote Rendering
- The status of the environment variable
XR_RUNTIME_JSON
- This environment variable should not be set, though some OpenXR runtimes have historically set this improperly, breaking OpenXR applications for afflicted PCs.
Script location
The DebuggerScript is installed by default at the following location:
C:\Program Files\Magic Leap Remote Rendering\DebuggerScript.ps1
Running the DebuggerScript
- Open PowerShell as an administrator.
- Execute the script:
& 'C:\Program Files\Magic Leap Remote Rendering\DebuggerScript.ps1'
Ensure that the path in the command accurately points to the DebuggerScript.ps1
script location on your PC.
For additional diagnostic information, make sure ADB is installed and your Magic Leap 2 is connected before running the script. This will allow the script to gather details about your device and its configuration.
Collecting metrics with FetchLogs.ps1
The FetchLogs.ps1 script collects detailed performance metrics from a Remote Rendering session, including frame timings and network latency. This information is critical for understanding performance-related issues such as lag, jitter, or dropped frames.
Make sure to run this script immediately after a problematic session to capture the most relevant data.
Script location
The metrics collection script is installed at:
C:\Program Files\Magic Leap Remote Rendering\FetchLogs.ps1
Running the FetchLogs script
- Open PowerShell as an administrator.
- Run the script with the following command to collect host metrics:
& 'C:\Program Files\Magic Leap Remote Rendering\FetchLogs.ps1' -HostMetrics
Ensure that the path in the command accurately points to the FetchLogs.ps1
script location on your PC.
Saved Output
After the script completes, it will create a zip archive containing the collected logs. By default, this archive is saved in the following location:
~/MagicLeap/remote-rendering-logs
Metrics collected by the script
The script collects frame-by-frame metrics, including:
- Frame timings: Information on how long it takes to render each frame.
- Network latency: Details on the latency between your ML2 device and your PC.
- Rendering performance: Performance data for the Remote Rendering session, including bandwidth usage and dropped frames.
Additional tips for using diagnostic scripts
Ensure ADB is in your system’s PATH
Several troubleshooting steps require the use of Android Debug Bridge (ADB). To simplify these steps, ensure that ADB is added to your system’s PATH. This allows you to run ADB commands from any directory in the command line.
To check if ADB is available in your PATH, run the following command:
adb version
Verifying network connectivity
For any connectivity issues, always start by verifying that both your ML2 device and PC can communicate over the network. Use the ping
command from the DebuggerScript or manually to confirm this.
adb shell ping <PC_IP>
Replace <PC_IP>
with the IP address of your PC, obtained via the ipconfig
command.
For more network troubleshooting instructions, see the Remote Render Network Configuration guide.