-
-
Notifications
You must be signed in to change notification settings - Fork 300
Description
Issue Summary:
Running jtop fails due to the jtop.service not starting correctly. Restarting the service is suggested but it doesn't fix the issue. The service encounters an error during the initialization of the NVPModel object, which leads to a service crash and a subsequent auto-restart attempt every 10 seconds.
The jtop.service in not active. Please run:
sudo systemctl restart jtop.service.
Steps to Reproduce:
- Run
$ jtopin terminal. - Jtop doesn't start and the following is displayed:
The jtop.service in not active. Please run:
sudo systemctl restart jtop.service.
- Running
$ sudo systemctl restart jtop.serviceas suggested doesn't fix the problem - Use
$ sudo journalctl -u jtop.service -f --no-pagerto monitor service logs
Service starts briefly and shows active status but then it fails during NVPModel initialization. After crashing, it subsequently auto-restarts the attempts. The automatic restart needs to be explicitly stopped.
Environment:
- Jetson AGX Orin 64GB developer kit
- L4T R36.4.4
- Ubuntu 22.04 Jammy Jellyfish
- JetPack = 6.2.1
- nvpmodel (NVIDIA Power Model Tool) = 1.1.4
Technical Details:
The bug originates from jtop/core/nvpmodel.py
The nvpmodel tool manages the power modes on NVDIA Jetson devices. In order to visualize power mode information, jtop intializes NVPModel object, when jtop.service starts. This involves querying the system for its current power mode by using $ nvpmodel -q (run by the nvpmodel_query() function) and then using regex to match the pattern "NV Power Mode: " from the output to parse a value (e.g. "NV Power Mode: MODE_30W"). However, if the default power mode is used and the user hasn't explicitly switched it, the result is:
$ nvpmodel -q
`NVP WARN: power mode is not set !`
so a regex match is not found and the function nvpmodel_query() returns None instead of a dictionary to _nvpmodel_now. This makes _nvpmodel_now["name"] to crash.
Possible workaround:
Suppressing the visualization of the power mode information in jtop is a temporary workaround and this doesn't resolve the issue. Apply the changes here
To fully fix the bug, modifications to the nvpmodel_query() function needs to be made to cover the case where the default power mode is used. It is possible that L4T R36.4.4 which isn't currently supported by jetson-stats, comes with an upgraded version of the nvpmodel tool library which introduces some differences in how it outputs the information when the default power mode is used compared to the previously supported versions.