henrygd/beszel · warning

nvml not supported on this platform

Error message

nvml not supported on this platform

What it means

This is the build-tag-gated stub nvmlCollector used on platforms where NVML support is not compiled in (non-Linux/non-NVIDIA targets). Its init always returns this error, so selecting the NVML collector on such a platform deterministically fails.

Source

Thrown at agent/gpu_nvml_unsupported.go:12

//go:build (!linux && !windows) || !amd64 || (linux && !glibc)

package agent

import "fmt"

type nvmlCollector struct {
	gm *GPUManager
}

func (c *nvmlCollector) init() error {
	return fmt.Errorf("nvml not supported on this platform")
}

func (c *nvmlCollector) start() {}

View on GitHub (pinned to b38fb7dafa)

Solutions

  1. Deploy the Linux amd64/arm64 build of the agent that includes NVML support.
  2. Remove GPU_COLLECTOR=nvml and let auto-detection pick a platform-appropriate collector.
  3. On non-NVIDIA hardware use the appropriate collector (Intel sysfs, etc.).
  4. Rebuild with the correct build tags/files (gpu_nvml.go) if compiling from source for Linux.

Example fix

// before
GPU_COLLECTOR=nvml  # on a macOS/BSD build
// after
unset GPU_COLLECTOR  # let auto-detection choose a supported collector
Defensive patterns

Strategy: fallback

Validate before calling

// pick collector by platform before selecting nvml:
USE_NVML=$([ "$(uname -s)" = Linux ] && [ -x /usr/bin/nvidia-smi ] && echo yes || echo no)

Try / catch

collector, err := startNvmlCollector(gm)
if err != nil && strings.Contains(err.Error(), "not supported on this platform") {
    collector = startFallbackCollector(gm) // e.g. sysfs-based
}

Prevention

When it happens

Trigger: startNvmlCollector or GPU_COLLECTOR=nvml resolves to the unsupported-platform build of nvmlCollector (gpu_nvml_unsupported.go) and calls init().

Common situations: Running the agent on macOS, BSD, or a Windows/Linux build where the NVML file was excluded; setting GPU_COLLECTOR=nvml on a host with no NVIDIA support compiled; accidentally deploying a wrong-OS binary.

Related errors


AI-assisted analysis of henrygd/beszel@b38fb7dafa (2026-08-31). Data as JSON: /api/errors/6a5973376fe6d9ee. Report an issue: GitHub.