Files
Yi-111-a cca03e6baf fix(gpu): report an Intel GPU as unsupported instead of healthy
The health probe's fallback branch set status 'ok' and
ollamaGpuAccessible: true purely because si.graphics() returned a
controller. On an Intel-only box that is the Core Ultra case in #1325:
the controller is there, but NOMAD only ships CUDA and ROCm paths and
Ollama has no Intel backend, so inference runs CPU-only while Settings
> System reports a healthy GPU.

Adds an 'unsupported' status, set only when no reported controller
belongs to a vendor NOMAD can accelerate. NVIDIA and AMD boxes keep the
existing behaviour, and an unrecognised vendor string is deliberately not
flagged so a healthy card behind a newer pci.ids is never turned into a
false alarm.
2026-11-17 22:18:30 +00:00

179 lines
4.4 KiB
TypeScript

import { Systeminformation } from 'systeminformation'
export type GpuHealthStatus = {
status: 'ok' | 'passthrough_failed' | 'no_gpu' | 'ollama_not_installed' | 'unsupported'
hasNvidiaRuntime: boolean
hasRocmRuntime: boolean
ollamaGpuAccessible: boolean
/**
* 'intel' only ever accompanies status 'unsupported': a GPU is present but
* NOMAD ships no acceleration path for it, so inference runs on CPU.
*/
gpuVendor?: 'nvidia' | 'amd' | 'intel'
/**
* AMD passthrough_failed only. Whether a reinstall would change the running
* container. When false, a reinstall rebuilds the same CPU-bound container and
* the fix is an HSA override (ai.amdHsaOverride).
*/
amdReinstallWouldChange?: boolean
/** gfx target Ollama reported for an unsupported AMD GPU, e.g. 'gfx1103'. */
amdGfxTarget?: string
/** HSA_OVERRIDE_GFX_VERSION the running container has, if any. */
currentHsaOverride?: string
/** Override the gfx mapping recommends for amdGfxTarget, if it knows one. */
suggestedHsaOverride?: string
}
export type SystemInformationResponse = {
cpu: Systeminformation.CpuData
mem: Systeminformation.MemData
os: Systeminformation.OsData
disk: NomadDiskInfo[]
currentLoad: Systeminformation.CurrentLoadData
fsSize: Systeminformation.FsSizeData[]
uptime: Systeminformation.TimeData
graphics: Systeminformation.GraphicsData
gpuHealth?: GpuHealthStatus
}
// Type inferrence is not working properly with usePage and shared props, so we define this type manually
export type UsePageProps = {
appVersion: string
environment: string
}
export type LSBlockDevice = {
name: string
size: string
type: string
model: string | null
serial: string | null
vendor: string | null
rota: boolean | null
tran: string | null
children?: LSBlockDevice[]
}
export type NomadDiskInfoRaw = {
diskLayout: {
blockdevices: LSBlockDevice[]
}
fsSize: {
fs: string
size: number
used: number
available: number
use: number
mount: string
}[]
}
export type NomadDiskInfo = {
name: string
model: string
vendor: string
rota: boolean
tran: string
size: string
totalUsed: number
totalSize: number
percentUsed: number
filesystems: {
fs: string
mount: string
used: number
size: number
percentUsed: number
}[]
}
export type SystemUpdateStatus = {
stage: 'idle' | 'starting' | 'pulling' | 'pulled' | 'recreating' | 'complete' | 'error'
progress: number
message: string
timestamp: string
}
export type CheckLatestVersionResult = {
success: boolean,
updateAvailable: boolean,
currentVersion: string,
latestVersion: string,
message?: string
}
export type AutoUpdateEligibleTarget = {
version: string
tag: string
publishedAt: string
}
export type AutoUpdateStatus = {
enabled: boolean
windowStart: string
windowEnd: string
cooloffHours: number
currentVersion: string
withinWindow: boolean
eligibleTarget: AutoUpdateEligibleTarget | null
lastAttemptAt: string | null
lastResult: string | null
lastError: string | null
consecutiveFailures: number
autoDisabledReason: string | null
}
export type AppAutoUpdateAppStatus = {
service_name: string
friendly_name: string | null
auto_update_enabled: boolean
current_version: string
available_update_version: string | null
first_seen_at: string | null
eligible: boolean
reason: string
cooloff_remaining_hours: number | null
consecutive_failures: number
auto_disabled_reason: string | null
}
export type AppAutoUpdateStatus = {
enabled: boolean
windowStart: string
windowEnd: string
cooloffHours: number
withinWindow: boolean
lastAttemptAt: string | null
lastResult: string | null
apps: AppAutoUpdateAppStatus[]
}
export type ContentAutoUpdateResourceStatus = {
resource_id: string
resource_type: 'zim' | 'map'
current_version: string
available_update_version: string | null
size_bytes: number | null
eligible: boolean
reason: string
cooloff_remaining_hours: number | null
exceeds_cap: boolean
consecutive_failures: number
auto_disabled_reason: string | null
}
export type ContentAutoUpdateStatus = {
enabled: boolean
windowStart: string
windowEnd: string
cooloffHours: number
maxBytesPerWindow: number
withinWindow: boolean
windowBytesUsed: number
lastAttemptAt: string | null
lastResult: string | null
lastError: string | null
autoDisabledReason: string | null
resources: ContentAutoUpdateResourceStatus[]
}