Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jtop exits with stacktrace from "GPU" tab when 3d_scaling is disabled #501

Open
subhachandrachandra opened this issue Mar 13, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@subhachandrachandra
Copy link

Describe the bug

When 3d_scaling is disabled by setting GPU governor to 'performance' mode, jtop will exit with a stack trace when switched to the 'GPU' page

To Reproduce

Steps to reproduce the behavior:

  1. Set GPU governor to performance mode.
    Ex. echo performance > /sys/devices/17000000.ga10b/devfreq/17000000.ga10b/governor
  2. Start jtop
  3. Switch to 'GPU' page by pressing '2'
  4. jtop will exit with a stacktrace

Screenshots

Traceback (most recent call last):
File "/usr/local/bin/jtop", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.8/dist-packages/jtop/main.py", line 160, in main
curses.wrapper(JTOPGUI, jetson, pages, init_page=args.page,
File "/usr/lib/python3.8/curses/init.py", line 105, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/local/lib/python3.8/dist-packages/jtop/gui/jtopgui.py", line 100, in init
self.run(loop, seconds)
File "/usr/local/lib/python3.8/dist-packages/jtop/gui/jtopgui.py", line 129, in run
self.draw()
File "/usr/local/lib/python3.8/dist-packages/jtop/gui/jtopgui.py", line 143, in draw
page.draw(self.key, self.mouse)
File "/usr/local/lib/python3.8/dist-packages/jtop/gui/pgpu.py", line 164, in draw
scaling_string = "Active" if gpu_status['3d_scaling'] else "Disable"
KeyError: '3d_scaling'

Expected behavior

The dict in python should be accessed using 'get' in a safe manner.
Changing the 2 lines where it crashed to use 'get' like below fixes the problem.

        # 3D scaling
        scaling_string = "Active" if gpu_status.get('3d_scaling') else "Disable"
        scaling_status = NColors.green() if gpu_status.get('3d_scaling') else curses.A_NORMAL

Board

Output from jetson_release -v:
Software part of jetson-stats 4.2.6 - (c) 2024, Raffaello Bonghi
Model: Jetson AGX Orin - Jetpack 5.1 [L4T 35.2.1]
NV Power Mode[0]: MAXN
Serial Number: [XXX Show with: jetson_release -s XXX]
Hardware:

  • 699-level Part Number: 699-13701-0005-500 M.0
  • P-Number: p3701-0005
  • Module: NVIDIA Jetson AGX Orin (64GB ram)
  • SoC: tegra23x
  • CUDA Arch BIN: 8.7
  • Codename: Concord
    Platform:
  • Machine: aarch64
  • System: Linux
  • Distribution: Ubuntu 20.04 focal
  • Release: 5.10.104-tegra
  • Python: 3.8.10
    jtop:
  • Version: 4.2.6
  • Service: Active
    Libraries:
  • CUDA: 11.4.315
  • cuDNN: 8.6.0.166
  • TensorRT: 8.5.2.2
  • VPI: 2.2.4
  • Vulkan: 1.3.204
  • OpenCV: 4.5.4 - with CUDA: NO
@subhachandrachandra subhachandrachandra added the bug Something isn't working label Mar 13, 2024
@subhachandrachandra
Copy link
Author

When GPU is in performance mode the path "/sys/devices/17000000.ga10b/enable_3d_scaling" will not exist as that feature is disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant