Skip to content

fix(xsysinfo): report system RAM in /api/resources when a GPU is present - #12861

Open
bercedev wants to merge 1 commit into
mudler:masterfrom
bercedev:fix/resources-ram-with-gpu
Open

bercedev wants to merge 1 commit into
mudler:masterfrom
bercedev:fix/resources-ram-with-gpu

Conversation

@bercedev

@bercedev bercedev commented Oct 23, 2026 •

Copy link
Copy Markdown

Description

When a GPU was detected, GetResourceInfo() returned RAM: nil, so /api/resources always had "ram": null on GPU machines. System RAM was only read in the no-GPU fallback. The UI already expects both: HomeMemoryStrip draws a RAM bar for isGpu && host.ram, and the model fit and placement code read resources.ram for CPU offload.

The GPU branch now also calls GetSystemRAMInfo() and fills RAM. Type and Aggregate stay on the VRAM numbers, so the memory reclaimer (GetResourceAggregateInfo) behaves as before.

This PR fixes #12834

Notes for Reviewers

go vet ./pkg/xsysinfo/ and go test ./pkg/xsysinfo/ pass, and gofmt is clean. I didn't add a test: GPU detection has no seam to stub in this package. I also didn't run it on a GPU machine.

AI disclosure: written with Claude Code (Assisted-by trailer on the commit). The commit has no Signed-off-by, since CONTRIBUTING.md leaves that to the human submitter.

Signed commits

  • Yes, I signed my commits.
  • Documentation updated (docs/content/) for user-facing changes, or not applicable

@localai-org-maint-bot

Copy link
Copy Markdown
Collaborator

@mudler source-review sign-off at d1d7d5c6f: good to merge once required CI checks and human DCO certification are satisfied. No blocking code findings.

The GPU branch now reports system RAM while preserving the VRAM aggregate used by the reclaimer. I pushed the missing docs update as d1d7d5c6f, including the shared-memory caveat for integrated GPUs.

Validation: go test ./pkg/xsysinfo/ -count=1 -timeout=60s and go vet ./pkg/xsysinfo/ pass; integration with master 3934ee8e3 and whitespace checks pass. GPU hardware behavior was not tested here. The docs commit includes Assisted-by attribution; repository policy reserves Signed-off-by certification for the human contributor.

Fixes mudler#12834

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: berce <75228263+bercedev@users.noreply.github.com>
@bercedev
bercedev force-pushed the fix/resources-ram-with-gpu branch from d1d7d5c to 01fcd6b Compare October 23, 2026 18:32

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ram is always null in /api/resources ("My Machine" panel) whenever a GPU is present

2 participants