QT Graphics Program Fails to Run on Jetson Orin Nano Developer Kit
Issue Overview
Users are experiencing difficulties running QT-based graphics programs on the Jetson Orin Nano Developer Kit. The main symptoms include:
- Inability to open keyboard and mouse input devices
- "No screens available" error message
- Program aborts with a core dump
This issue occurs during the initial setup and execution of QT applications on the Jetson platform. The problem appears to be consistent across multiple attempts and affects the basic functionality of graphical applications.
Possible Causes
-
Incorrect Display Configuration: The DISPLAY environment variable may be set incorrectly, pointing to a non-existent or inaccessible X server.
-
Permission Issues: The user may lack the necessary permissions to access input devices (/dev/input/event*).
-
X Server Configuration: There might be problems with the X server configuration, particularly related to input device drivers.
-
QT Compilation: The QT framework may not have been compiled correctly for the Jetson Orin Nano platform.
-
JetPack Version Compatibility: The use of JetPack 6.0, which is a developer preview, could introduce compatibility issues.
-
Remote Access Complications: Attempting to run graphical applications over SSH or other remote connections without proper X forwarding setup.
Troubleshooting Steps, Solutions & Fixes
-
Verify X Server Log:
- Identify the correct X server log:
ls -ltr /var/log/Xorg.*.log | tail -n 1
- Review the log file for errors or warnings related to input devices and display configuration.
- Identify the correct X server log:
-
Set Correct DISPLAY Variable:
- Determine the correct display number from the X server log filename (e.g., if Xorg.1.log, use :1).
- Set the DISPLAY variable accordingly:
export DISPLAY=:1
-
Check and Fix Permissions:
- Verify permissions on input devices:
ls -l /dev/input/event*
- Ensure the user is part of the "input" group:
sudo usermod -a -G input $USER
- Log out and log back in for group changes to take effect.
- Verify permissions on input devices:
-
Rebuild QT for Jetson:
- Ensure you’re using the correct QT version compatible with your JetPack version.
- Follow NVIDIA’s guidelines for cross-compiling QT for Jetson platforms.
-
Use Stable JetPack Version:
- Consider downgrading to JetPack 5.x for better stability if you’re encountering issues with JetPack 6.0.
-
Verify Local Execution:
- Ensure you’re running the QT application locally on the Jetson device, not over SSH.
- If using SSH, properly set up X forwarding:
ssh -X user@jetson-ip
-
Check udev Rules:
- Verify that udev rules for input devices are correctly set up:
ls /etc/udev/rules.d/
- Consider adding custom udev rules if necessary.
- Verify that udev rules for input devices are correctly set up:
-
Reinstall X Server Components:
- If X server configuration seems corrupted:
sudo apt update sudo apt install --reinstall xserver-xorg
- If X server configuration seems corrupted:
-
Verify Graphics Drivers:
- Ensure NVIDIA drivers are correctly installed:
nvidia-smi
- If issues persist, consider reinstalling the NVIDIA drivers using the SDK Manager.
- Ensure NVIDIA drivers are correctly installed:
-
Test with a Simple QT Application:
- Create and run a basic QT application to isolate whether the issue is specific to your complex application or a general QT problem.
If these steps do not resolve the issue, consider posting the complete X server log (Xorg.1.log or similar) and the output of nvidia-smi
to the NVIDIA Developer Forums for further assistance. Additionally, ensure you’re using the stock JetPack image without custom modifications to rule out configuration issues.