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:
Set GPU governor to performance mode.
Ex. echo performance > /sys/devices/17000000.ga10b/devfreq/17000000.ga10b/governor
Start jtop
Switch to 'GPU' page by pressing '2'
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:
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:
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.
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: