Overlay Plane Issue on Nvidia Jetson Orin Nano
Issue Overview
Users are experiencing difficulties when attempting to use the Nvidia DRM API with the Jetson Orin Nano, specifically when trying to utilize multiple display planes. The issue manifests when calling drmModeSetPlane
on plane ID 1 (presumed to be the overlay plane), which returns an -EINVAL error. Conversely, calling drmModeSetPlane
on plane ID 0 (presumed to be the primary plane) succeeds, and graphics are displayed as expected.
This problem affects the functionality of sample applications like "08_video_dec_drm" and impacts the ability to render overlays, such as logos or moving color blocks, on top of video content. The issue appears to be specific to the Orin Nano, as the same code works correctly on the original Jetson Nano dev kit.
Possible Causes
-
Hardware Limitations: The Orin Nano may have different display capabilities compared to other Jetson models, potentially limiting the number of available display planes.
-
Driver Issues: The current Nvidia DRM driver for the Orin Nano might not fully support multiple planes or have bugs related to overlay plane management.
-
Kernel Configuration: The kernel (version 5.10.104-tegra) may not be properly configured to enable all DRM planes on the Orin Nano.
-
Software Incompatibility: The Multimedia API (R35.3.1) used in the sample might not be fully compatible with the Orin Nano’s hardware capabilities.
-
Incorrect Plane Indexing: The assumption that plane ID 1 is the overlay plane might be incorrect for the Orin Nano, leading to the -EINVAL error.
Troubleshooting Steps, Solutions & Fixes
-
Verify Hardware Support:
- Confirm that the Orin Nano supports multiple display planes. Use the following command to check available planes:
drmModeGetResources()
- If it returns only one plane, this may indicate a hardware limitation.
- Confirm that the Orin Nano supports multiple display planes. Use the following command to check available planes:
-
Enable Nvidia DRM Module:
- Load the Nvidia DRM module with modesetting enabled:
sudo modprobe nvidia-drm modeset=1
- Add this command to
/etc/modules-load.d/nvidia-drm.conf
for persistence across reboots.
- Load the Nvidia DRM module with modesetting enabled:
-
Check for Driver Updates:
- Ensure you have the latest Jetpack and driver versions installed for your Orin Nano.
- Visit the Nvidia Developer website for any available updates.
-
Isolate the Issue:
- Modify the sample code to test each plane individually:
// Test primary plane ctx->drm_renderer->setPlane(primary_plane_index, ...); // Test overlay plane int ret = ctx->drm_renderer->setPlane(overlay_plane_index, ...); if (ret != 0) { fprintf(stderr, "Overlay plane setup failed with error: %d\n", ret); }
- Modify the sample code to test each plane individually:
-
Disable Desktop Environment:
- Before running the sample, stop the display manager:
sudo systemctl stop gdm sudo loginctl terminate-seat seat0
- Before running the sample, stop the display manager:
-
Single Plane Workaround:
- As confirmed by Nvidia, single video plane is supported on Orin series. Modify your application to use only one plane for video playback in full screen.
-
Debug Information:
- Add debug output to your application:
int ret = ctx->drm_renderer->setPlane(overlay_plane_index, ...); if (ret != 0) { fprintf(stderr, "setPlane failed for overlay_plane_index %d with error %d\n", overlay_plane_index, ret); }
- Add debug output to your application:
-
Check for Kernel Parameters:
- Review and modify kernel boot parameters if necessary to enable additional display features.
-
File a Bug Report:
- If the issue persists, file a detailed bug report with Nvidia, including:
- Jetson Orin Nano model and revision
- JetPack version
- Kernel version
- Detailed steps to reproduce the issue
- Any error messages or logs
- If the issue persists, file a detailed bug report with Nvidia, including:
-
Consider Alternative APIs:
- If overlay support is crucial for your application, consider using alternative rendering methods like OpenGL ES or Vulkan, which might offer more flexibility in rendering overlays.
-
Monitor for Updates:
- Keep an eye on Nvidia’s developer forums and documentation for any announcements regarding improved multi-plane support for the Orin Nano in future releases.