Conversation
- if GPU is detected, creates a panel between CPU usage and Memory to display available GPU stats. - Added GPU% column - Filter by GPU usage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
GPU monitoring has been added: if a graphics card is detected, a panel is created between 'CPU usage' and 'Memory' to display available GPU stats. A column and filtering for the GPU were added as well.
I tested it on AMD cards. I believe it should work with NVIDIA as well.
Fixes #169
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
Test configuration
OS Tuxedo OS (Ubuntu 24.04 based), X11, KDE.
No new dependencies were added, in either
Cargo.tomlorpackage.json.Unit tests.
cd src-tauri && cargo test→ 12 passed, 0 failed. Eight are new: three ingpu_monitor(discovery succeeds with or without a GPU; readings stay within documented ranges;pci.idsmodel-name shortening), five ingpu_process_monitor(fdinfo parsing,drm-engine-capacity-*exclusion, non-DRM descriptor rejection, first-sample-has-no-baseline, percentages finite and non-negative). The GPU tests are written to pass on a machine with no GPU, so they are safe for CI.System panel matches the kernel. Compared each rendered value against its source while the app ran:
gpu_busy_percent,mem_info_vram_total/_used, and the hwmontemp*_input/power1_average/freq1_inputfiles under/sys/class/drm/card1/device/. Reproduce with:Under load.
glxgearsrunning: the GPU panel moved from 0% to 65–73% core utilisation, with power and clock rising in step and returning to idle afterwards.DPer-process
GPU %column. Withglxgearsrunning, the column reported glxgears at 29.8–31.4% and Xorg at 44–50%.GPU %filter. Set to> 1, the table narrowed from thousands of rows to exactly 3 — glxgears 30.2%, Xorg 49.0%, kwin_x11 1.4%. Clear All restores the full list and the active-filter count behaves like the existing CPU/RAM/Runtime filters.Formatting and types.
npm run format:checkpasses (Prettier andcargo fmt).svelte-checkreports only the 4Cannot find namespace 'NodeJS'errors already present onmain.(Didn't test on macOS, Windows, NVIDIA or multi-GPU)
Checklist:
My code follows the style guidelines of this project
I have performed a self-review of my code
I have commented my code, particularly in hard-to-understand areas
I have made corresponding changes to the documentation
My changes generate no new warnings
I have added tests that prove my fix is effective or that my feature works
New and existing unit tests pass locally with my changes
Any dependent changes have been merged and published in downstream modules — n/a, this PR is self-contained