{"record":{"id":"6a5973376fe6d9ee","repo":"henrygd/beszel","slug":"nvml-not-supported-on-this-platform","errorCode":null,"errorMessage":"nvml not supported on this platform","messagePattern":"nvml not supported on this platform","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"agent/gpu_nvml_unsupported.go","lineNumber":12,"sourceCode":"//go:build (!linux && !windows) || !amd64 || (linux && !glibc)\n\npackage agent\n\nimport \"fmt\"\n\ntype nvmlCollector struct {\n\tgm *GPUManager\n}\n\nfunc (c *nvmlCollector) init() error {\n\treturn fmt.Errorf(\"nvml not supported on this platform\")\n}\n\nfunc (c *nvmlCollector) start() {}\n","sourceCodeStart":1,"sourceCodeEnd":16,"githubUrl":"https://github.com/henrygd/beszel/blob/b38fb7dafa60812cc22e6a84ce313e94f1ce0a32/agent/gpu_nvml_unsupported.go#L1-L16","documentation":"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.","triggerScenarios":"startNvmlCollector or GPU_COLLECTOR=nvml resolves to the unsupported-platform build of nvmlCollector (gpu_nvml_unsupported.go) and calls init().","commonSituations":"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.","solutions":["Deploy the Linux amd64/arm64 build of the agent that includes NVML support.","Remove GPU_COLLECTOR=nvml and let auto-detection pick a platform-appropriate collector.","On non-NVIDIA hardware use the appropriate collector (Intel sysfs, etc.).","Rebuild with the correct build tags/files (gpu_nvml.go) if compiling from source for Linux."],"exampleFix":"// before\nGPU_COLLECTOR=nvml  # on a macOS/BSD build\n// after\nunset GPU_COLLECTOR  # let auto-detection choose a supported collector","handlingStrategy":"fallback","validationCode":"// pick collector by platform before selecting nvml:\nUSE_NVML=$([ \"$(uname -s)\" = Linux ] && [ -x /usr/bin/nvidia-smi ] && echo yes || echo no)","typeGuard":null,"tryCatchPattern":"collector, err := startNvmlCollector(gm)\nif err != nil && strings.Contains(err.Error(), \"not supported on this platform\") {\n    collector = startFallbackCollector(gm) // e.g. sysfs-based\n}","preventionTips":["Deploy the correct OS/arch build of beszel-agent","Don't set GPU_COLLECTOR=nvml on non-Linux or non-NVIDIA builds","Let auto-detection choose collectors unless you know the platform supports NVML","Document per-platform GPU collector support in your deployment configs"],"tags":["gpu","nvidia","platform","build"],"backgroundTag":"unsupported-platform-feature","analyzedSha":"b38fb7dafa60812cc22e6a84ce313e94f1ce0a32","analyzedAt":"2026-08-31T15:10:10.149Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}