Commit Graph

369 Commits

Author SHA1 Message Date
rezky_nightky
cb7babefb3 Fix typos across documentation and source
- Correct dependency spelling in README for multiple distro instructions @README.markdown#193-276
- Clean up misspellings in CMake helpers and GPU info sources (temperature, PCIe, queries, etc.) @cmake/modules/FindCurses.cmake#50-58 @cmake/modules/sanitize-helpers.cmake#103-118 @src/extract_gpuinfo_amdgpu.c#444-637 @src/extract_gpuinfo_intel.c#225-234 @src/extract_gpuinfo_metax.c#100-512 @src/nvtop.c#70-77
- Fix header comments and struct field names for allocations, callbacks, and utilize fields @src/extract_processinfo_fdinfo.c#97-104 @include/nvtop/common.h#44-52 @include/nvtop/extract_processinfo_fdinfo.h#59-63 @include/ascend/dcmi_interface_api.h#75-455 @include/nvtop/interface_options.h#43-54 @src/interface.c#792-800

Author: rezky_nightky <with.rezky@gmail.com>
Timestamp: 2025-12-01T18:21:25Z
Repository: nvtop
Branch: master
Signing: GPG (989AF9F0)
Performance: 13 files, +31/-31 lines
2026-01-16 10:59:16 +01:00
Andrii Manzhola
c48d0586bc Fix assertion failure when duplicate client_id encountered
The assertion "We should not be processing a client id twice per update"
can fail when a process has multiple file descriptors referencing the
same DRM client (e.g., via dup(), fork(), or DRM master operations).

The kcmp syscall filters duplicate file descriptions but not distinct
file descriptions that report the same underlying DRM client_id.

This change converts the debug assertion into a runtime check that
gracefully skips duplicate entries and frees any newly allocated
cache entries to prevent memory leaks.

Fixes the crash:
  nvtop: ./src/extract_gpuinfo_amdgpu.c:964: parse_drm_fdinfo_amd:
  Assertion `!cache_entry_check && "We should not be processing a
  client id twice per update"' failed.

Applied to all affected drivers:
- AMDGPU
- Intel i915
- Intel Xe
- Qualcomm MSM (also fixed incorrect hash key usage)
- ARM Mali
2026-01-16 10:57:21 +01:00
Mario Limonciello (AMD)
16e0f1d843 When running on an AMD APU add VRAM + GTT together
The MEM display currently shows just VRAM (which is the carveout
of system memory).  However amdgpu will use VRAM or GTT interchangeably
on APUs.  That is this isn't really useful for most APU users.

Detect that an APU is in use and add the two together.

Closes: https://github.com/Syllo/nvtop/issues/399
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
2025-12-13 08:39:28 -06:00
Maxime Schmitt
5f6d3df19c Merge pull request #411 from sbhavani/master
Add unified memory support for NVIDIA DGX Spark
2025-10-25 14:50:39 +02:00
Maxime Schmitt
0131238c03 Merge pull request #406 from KaeLL/master
Add device_field for memory clock
2025-10-25 14:42:58 +02:00
Maxime Schmitt
2005d0bb7e Merge pull request #401 from cipri-tom/master
Add F5 and Ctrl+L screen refresh functionality
2025-10-25 14:40:20 +02:00
Maxime Schmitt
79de353cdc Merge pull request #398 from zhenyu-xu-metax/add-feature-support-metax
Feat: add support for METAX GPU
2025-10-25 14:32:20 +02:00
Santosh Bhavani
667860919c Fix unified memory GPU reporting to use actual GPU allocations
Query running processes to sum actual GPU memory usage instead of
reporting system-wide memory consumption (MemTotal - MemAvailable).
2025-10-15 21:00:08 -07:00
Santosh Bhavani
d955f945a3 Fix unified memory reporting to use MemAvailable
Use /proc/meminfo MemAvailable instead of sysinfo freeram to properly
account for reclaimable cache. Now matches free -h output accurately.
2025-10-10 21:06:29 -07:00
nvmd
62f753f51c Add device_field for memory clock
Currently, GPU clocks and GPU memory clocks have
the same same field width size in the interface,
which is presumed to be in the thousands of MHz.
However, memory clocks reported by the GPU can be
in the tens of thousands range, presumably to
account for memory features such as PAM4 (like on
the RTX 4090). This causes the GPU memory clock
field to be one byte short when 5 digit clocks
are reported, cutting the 'z' from MHz.
This commit fixes that by adding a new
device_field for the memory clock that's one char
longer than the device_field for the GPU clocks,
and makes the appropriate changes in usage and
calculations that rely on these values.
2025-09-13 01:48:27 -03:00
Ciprian Tomoiaga
86fe3a7da6 Add automatic screen redraw on tmux reconnection
Implements comprehensive terminal state handling to fix display
corruption when reconnecting to tmux sessions:

- Add SIGCONT signal handler to detect process resumption
- Add KEY_RESIZE event handling for ncurses-detected state changes
- Both events trigger complete window reinitialization
- Eliminates garbage display issues after tmux disconnect/reconnect

This matches the behavior of well-behaved terminal applications
like htop that properly handle terminal state transitions.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-15 21:05:20 +00:00
Ciprian Tomoiaga
aca612ddcf Add F5 and Ctrl+L screen refresh functionality
Implements keyboard shortcuts to manually refresh the display:
- F5: Refresh screen and redraw all interface elements
- Ctrl+L: Same as F5, common terminal refresh shortcut

Uses complete window reinitialization to ensure proper redraw
of all elements including window borders and frames.

Fixes #394

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-15 20:52:40 +00:00
mintyleaf
df62414555 add rich memory stats 2025-08-11 11:47:56 +04:00
zxu
ac29e8e9a0 Feat: add support for METAX GPU 2025-07-21 19:43:28 +08:00
Maxime Schmitt
339ee0b10a Merge pull request #393 from Steve-Tech/xe2
Fix power draw metrics on Intel Battlemage (Xe)
2025-06-28 15:30:10 +02:00
Maxime Schmitt
a48ce79234 Merge pull request #387 from larunbe/utilisation-rate-use-engine-count
Use fdinfo's engine count when refreshing utilisation rate
2025-06-28 15:24:46 +02:00
Stephen Horvath
8e731910a4 Fix power draw metrics on Intel Battlemage 2025-06-18 20:39:28 +10:00
Adrián Larumbe
54e301ab5f Use fdinfo's engine count when refreshing utilisation rate
I originally moved gpuinfo_refresh_utilisation_rate() from Mali code
into src/extract_gpuinfo.c when I realised utilisation rate could be
calculated in a device-independent way simply by following the
percentage utilisation guidelines given in
Documentation/gpu/drm-usage-stats.rst

However, I forgot to replace the magic number '2' which stood for the
engine count in Mali GPUs with a value that make sense for different
devices.

Source the engine count from gpu_info's static information values.

Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
2025-05-23 02:40:06 +01:00
FeiLong
192aaaeac6 Add support for Rockchip NPU
Rockchip is a Chinese fabless semiconductor company based in Fuzhou, Fujian province.
This commit adds the load monitoring capabilities of Rockchip's NPU products to NVTOP.
2025-05-17 00:52:25 -04:00
Maxime Schmitt
a280e5f0da Fix division by zero on intel xe
Fixes: #354
2025-03-23 17:40:52 +01:00
Maxime Schmitt
72312d89b0 Reorder percentage associativity and max to 100
Fixes: #361
2025-03-23 13:18:29 +01:00
Maxime Schmitt
25d475cb5a Fix cpu fan selection 2025-03-23 12:56:05 +01:00
Maxime Schmitt
13963beca6 Merge pull request #360 from rdyro/libtpuinfo
Adding TPU support via libtpuinfo
2025-03-23 12:32:16 +01:00
Robert Dyro
c412a67d28 adding TPU metrics via libtpuinfo 2025-03-22 11:26:06 -07:00
Maxime Schmitt
ca52d04f2e Merge pull request #358 from jwilkins88/master 2025-03-22 14:22:19 +01:00
Joel Wilkins
f439a2f89b Convert output to json 2025-02-22 08:42:09 -06:00
Maxime Schmitt
33cf46840f Merge pull request #357 from YoussefEssDS/npu_support
Fix minor build issue for ascend nvtop
2025-02-20 10:54:38 +01:00
Maxime Schmitt
2fd2250335 Merge pull request #344 from Steve-Tech/intel-pcie
Workaround broken PCIe speeds on Intel Arc
2025-02-20 10:54:12 +01:00
Stephen Horvath
949d62895c Add Intel Xe driver temp support
Requires drm-xe-next commit dac328dea701 (drm/xe/hwmon: expose package and vram temperature) which hasn't been mainlined yet
2025-02-18 20:58:49 +10:00
Joel Wilkins
286b912d67 One more accidental formatting fix 2025-02-11 08:45:05 -06:00
Joel Wilkins
5e07499688 Revert added spaces 2025-02-11 08:44:12 -06:00
Joel Wilkins
9784d78c1d Add snapshot command to nvtop for scripting purposes 2025-02-11 08:42:44 -06:00
YoussefEssDS
782a9eaa7f Fix build issue for ascend nvtop 2025-02-10 12:23:01 -05:00
Maxime Schmitt
f901275e5b Merge pull request #351 from peter15914/fix_no_va_end
Add missing va_end() call
2025-01-19 09:13:14 +01:00
Stephen Horvath
cff83faee2 Make shared encoder/decoder utilisation longer
Previously "ENC/DEC" took up most of the space leaving only 2 characters for the percentage & bar.
2025-01-16 17:04:54 +10:00
Stephen Horvath
35b8e44743 Fix some compiler warnings
Fix some compiler warnings that didn't show on my desktop.
2025-01-16 11:44:59 +10:00
Stephen Horvath
6d7bb9cd03 AMD: Fix encode/decode usage being dropped when it is shared 2025-01-16 11:37:54 +10:00
Malcolm Lewis
354f3f439f Control reaches end of non-void function error. #350 2025-01-15 15:11:50 +10:00
Stephen Horvath
cd8dd8803d Improve PCI bridge checks 2025-01-14 10:49:43 +10:00
peter15914
7d8ad680ce Add missing va_end() call 2025-01-03 02:27:32 +05:00
Stephen Horvath
9c3181f5f2 Add Intel to libdrm detection in CMakeLists.txt
Also move AMDGPU and MSM support out of if since CMake will exit anyway.
2024-12-17 18:16:30 +10:00
Stephen Horvath
85542b5a21 Intel: Fix some very minor stuff 2024-12-14 19:29:31 +10:00
Stephen Horvath
d296b6a70e Workaround broken Intel PCIe speeds 2024-12-14 19:29:31 +10:00
Maxime Schmitt
19382d9308 Add missing declaration for Ubuntu 20.04 2024-12-13 23:39:32 +01:00
Maxime Schmitt
908c99ca62 Add missing i915_drm.h structs/definitions
Ubuntu 22.04 ships with a version of libdrm-dev that doesn't have the
recent i915_drm.h development. The kernel seems supports them when
inspecting /usr/include/drm/i915_drm.h though!

This patch provides the two missing structures and definitions when they
are not available through i915_drm.h

Fixes #343
2024-12-13 23:34:39 +01:00
Maxime Schmitt
c9bfedcc3a Fix AMDGPU free memory calculation
Fixes: #333
2024-12-12 14:48:35 +01:00
Maxime Schmitt
56b78f1e8e Include xe_drm.h until it mades it into libdrm 2024-12-11 15:41:16 +01:00
Stephen Horvath
9a986a1703 Apply suggestions from code review
Also clean up includes that I forgot to remove.
2024-12-11 10:06:58 +10:00
Stephen Horvath
b525f120dd Display total memory if available 2024-12-10 09:03:03 +10:00
Stephen Horvath
29a8e2fb23 Add gtt to memory usage 2024-12-10 09:03:03 +10:00