Not able to set CPU clock frequency on Emulated Orin Nano
Issue Overview
Users are experiencing difficulty in setting the CPU clock frequency on the Nvidia Jetson Orin Nano Dev board, specifically when emulating the AGX Orin 32 GB module as the Jetson Orin Nano 8 GB module. The symptoms include:
-
Inconsistent CPU Frequencies: While attempting to set the maximum clock frequency to 1510 MHz in MaxN mode (15W), users observe that cores 4 and 5 report a default frequency around 1900 MHz instead of the intended value.
-
Logs Indicating Frequency Mismatch: The
tegrastats
command shows discrepancies betweencpuinfo_cur_freq
andscaling_cur_freq
, indicating that while some cores can be manipulated successfully, others cannot. -
Context of Issue: This issue arises during setup and configuration, particularly when adjusting CPU frequency settings. It has been noted that similar issues were not observed with the NX emulated module, suggesting a potential specific problem with the Nano emulation.
-
Frequency Consistency: The problem appears to be consistent across multiple attempts and is specifically noted for cores 4 and 5.
-
User Experience Impact: This issue impacts performance tuning and resource management, leading to potential inefficiencies in applications relying on precise CPU frequency settings.
Possible Causes
Several potential causes for this issue have been identified:
-
Hardware Incompatibilities or Defects: The emulation of the AGX Orin module as a Nano may introduce discrepancies in how frequencies are reported or set.
-
Software Bugs or Conflicts: The issue may stem from bugs within the JetPack software versions being used, particularly versions 5.1.1 and possibly 5.1.2.
-
Configuration Errors: Incorrect configurations in setting
scaling_max_freq
andscaling_min_freq
may lead to unexpected behavior in core frequency settings. -
Driver Issues: Outdated or incompatible drivers could prevent proper manipulation of CPU frequencies.
-
User Errors or Misconfigurations: Users may inadvertently misconfigure settings, leading to failures in setting desired frequencies.
Troubleshooting Steps, Solutions & Fixes
To diagnose and resolve this issue, users can follow these steps:
-
Check JetPack Version:
- Run the command:
dpkg -l | grep jetpack
- Ensure you are using JetPack version 5.1.2 or later, as earlier versions may contain bugs affecting CPU frequency settings.
- Run the command:
-
Verify Scaling Maximum Frequency:
- Check the current maximum scaling frequency for problematic cores using:
cat /sys/devices/system/cpu/cpu5/cpufreq/scaling_max_freq
- Check the current maximum scaling frequency for problematic cores using:
-
Set Scaling Frequencies:
- Attempt to set both
scaling_max_freq
andscaling_min_freq
for all cores:echo "1510400" | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq echo "1510400" | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
- Repeat for cores 4 and 5 specifically.
- Attempt to set both
-
Use Updated Software:
- If issues persist on JetPack 5.1.1, upgrade to JetPack 5.1.2 as it may contain fixes for known issues:
sudo apt update && sudo apt upgrade
- If issues persist on JetPack 5.1.1, upgrade to JetPack 5.1.2 as it may contain fixes for known issues:
-
Check Logs for Errors:
- Review system logs for any errors related to CPU frequency scaling:
dmesg | grep cpufreq
- Review system logs for any errors related to CPU frequency scaling:
-
Test with Different Configurations:
- If possible, test with different hardware configurations or revert to a prior known stable configuration to isolate the issue further.
-
Documentation & Resources:
- Refer to Nvidia’s official documentation for detailed guidance on CPU frequency settings and troubleshooting:
-
Best Practices:
- Regularly update software and drivers.
- Document changes made during configuration for easier troubleshooting in the future.
- Engage with community forums for shared experiences and solutions.
Unresolved Aspects
While several solutions have been proposed, further investigation may be needed into whether this issue is inherent to the emulation process itself or if it can be resolved through software updates or configuration changes. Users are encouraged to report back on their findings after attempting these troubleshooting steps.